Commit 318d2ce1 by Liv Haapala

changes to MoyaAdminUI

1 parent 6f4de988
namespace MoyaAdminUI
{
partial class FindUserForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.userTextBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// userTextBox
//
this.userTextBox.Location = new System.Drawing.Point(115, 30);
this.userTextBox.Name = "userTextBox";
this.userTextBox.Size = new System.Drawing.Size(100, 20);
this.userTextBox.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(74, 33);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 13);
this.label1.TabIndex = 1;
this.label1.Text = "User";
//
// button1
//
this.button1.Location = new System.Drawing.Point(230, 27);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "Find";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// FindUserForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.button1);
this.Controls.Add(this.label1);
this.Controls.Add(this.userTextBox);
this.Name = "FindUserForm";
this.Text = "FindUserForm";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox userTextBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
}
}
\ No newline at end of file
using MoyaAdminLib;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Windows.Forms;
namespace MoyaAdminUI
{
public partial class FindUserForm : Form
{
public FindUserForm()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
RestClient client = new RestClient(Properties.Settings.Default.ApiURL);
try
{
string json = client.MakeRequest("user", "login=" + userTextBox.Text);
var ser = new JavaScriptSerializer();
Console.WriteLine("Response: " + json);
}
catch
{
Console.WriteLine("Failed to fetch user card");
}
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
...@@ -76,6 +76,7 @@ ...@@ -76,6 +76,7 @@
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.placesCountTimer = new System.Windows.Forms.Timer(this.components); this.placesCountTimer = new System.Windows.Forms.Timer(this.components);
this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
this.toolStripButton5 = new System.Windows.Forms.ToolStripButton();
this.placesContextMenuStrip.SuspendLayout(); this.placesContextMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.MapPictureBox)).BeginInit();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
...@@ -212,7 +213,8 @@ ...@@ -212,7 +213,8 @@
this.getListOfUnlinkedComputerPlacesToolStripButton, this.getListOfUnlinkedComputerPlacesToolStripButton,
this.generateBacksidesToolStripButton, this.generateBacksidesToolStripButton,
this.toolStripButton4, this.toolStripButton4,
this.toolStripButton3}); this.toolStripButton3,
this.toolStripButton5});
this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Location = new System.Drawing.Point(0, 0);
this.toolStrip1.Name = "toolStrip1"; this.toolStrip1.Name = "toolStrip1";
this.toolStrip1.Size = new System.Drawing.Size(1078, 25); this.toolStrip1.Size = new System.Drawing.Size(1078, 25);
...@@ -522,6 +524,16 @@ ...@@ -522,6 +524,16 @@
this.placesCountTimer.Interval = 600000000; this.placesCountTimer.Interval = 600000000;
this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick); this.placesCountTimer.Tick += new System.EventHandler(this.placesCountTimer_Tick);
// //
// toolStripButton5
//
this.toolStripButton5.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.toolStripButton5.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton5.Image")));
this.toolStripButton5.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripButton5.Name = "toolStripButton5";
this.toolStripButton5.Size = new System.Drawing.Size(23, 22);
this.toolStripButton5.Text = "Find user";
this.toolStripButton5.Click += new System.EventHandler(this.toolStripButton5_Click);
//
// MainForm // MainForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
...@@ -600,6 +612,7 @@ ...@@ -600,6 +612,7 @@
private System.Windows.Forms.ToolStripMenuItem moveSelectedPlacesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem moveSelectedPlacesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem getCSVForSelectedToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem getCSVForSelectedToolStripMenuItem;
private System.Windows.Forms.SaveFileDialog saveFileDialog1; private System.Windows.Forms.SaveFileDialog saveFileDialog1;
private System.Windows.Forms.ToolStripButton toolStripButton5;
} }
} }
...@@ -1666,5 +1666,11 @@ namespace MoyaAdminUI ...@@ -1666,5 +1666,11 @@ namespace MoyaAdminUI
} }
} }
} }
private void toolStripButton5_Click(object sender, EventArgs e)
{
FindUserForm frm = new FindUserForm();
frm.Show();
}
} }
} }
...@@ -116,6 +116,12 @@ ...@@ -116,6 +116,12 @@
<Compile Include="CSVGeneratorForItemCollectionForm.Designer.cs"> <Compile Include="CSVGeneratorForItemCollectionForm.Designer.cs">
<DependentUpon>CSVGeneratorForItemCollectionForm.cs</DependentUpon> <DependentUpon>CSVGeneratorForItemCollectionForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="FindUserForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FindUserForm.Designer.cs">
<DependentUpon>FindUserForm.cs</DependentUpon>
</Compile>
<Compile Include="GetListOfUsersWithUnlinkedPlacesForm.cs"> <Compile Include="GetListOfUsersWithUnlinkedPlacesForm.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
...@@ -228,6 +234,9 @@ ...@@ -228,6 +234,9 @@
<EmbeddedResource Include="CSVGeneratorForItemCollectionForm.resx"> <EmbeddedResource Include="CSVGeneratorForItemCollectionForm.resx">
<DependentUpon>CSVGeneratorForItemCollectionForm.cs</DependentUpon> <DependentUpon>CSVGeneratorForItemCollectionForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="FindUserForm.resx">
<DependentUpon>FindUserForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="GetListOfUsersWithUnlinkedPlacesForm.resx"> <EmbeddedResource Include="GetListOfUsersWithUnlinkedPlacesForm.resx">
<DependentUpon>GetListOfUsersWithUnlinkedPlacesForm.cs</DependentUpon> <DependentUpon>GetListOfUsersWithUnlinkedPlacesForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!