Login dialogs moved to TBF.Forms namesspace.

This commit is contained in:
Milan Hanajik
2016-12-21 08:06:42 +01:00
parent 1a0b2ee975
commit 12053b4531
9 changed files with 29 additions and 32 deletions
+110
View File
@@ -0,0 +1,110 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
namespace TBF.Forms
{
partial class LoginDlg
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlg));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.passwordTextBox = new System.Windows.Forms.TextBox();
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.userNameTextBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.Name = "label2";
//
// passwordTextBox
//
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
this.passwordTextBox.Name = "passwordTextBox";
this.passwordTextBox.UseSystemPasswordChar = true;
//
// cancelButton
//
resources.ApplyResources(this.cancelButton, "cancelButton");
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.Name = "cancelButton";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.Name = "okButton";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// userNameTextBox
//
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
this.userNameTextBox.Name = "userNameTextBox";
//
// LoginDlg
//
this.AcceptButton = this.okButton;
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.cancelButton;
this.Controls.Add(this.userNameTextBox);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.passwordTextBox);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "LoginDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Load += new System.EventHandler(this.LoginDlg_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox userNameTextBox;
private System.Windows.Forms.TextBox passwordTextBox;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
}
}
+140
View File
@@ -0,0 +1,140 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TBF.Resources;
namespace TBF.Forms
{
/// <summary>
/// Provides login dialog as well as user authorization using TBF.User.Authorize(...)
/// (i.e. when DialogResult is OK, user was authorized).
/// </summary>
public partial class LoginDlg : Form
{
// Private fields
string user;
string password;
Config.Grp.GID requiredGroupMembership = Config.Grp.GID.Invalid;
bool noDatabase;
/// <summary>
/// Constructor.
/// </summary>
public LoginDlg()
{
InitializeComponent();
}
/// <summary>
/// Constructor with a predefined user.
/// </summary>
public LoginDlg(string predefinedUser)
: this()
{
user = predefinedUser;
userNameTextBox.Text = predefinedUser;
}
/// <summary>
/// Constructor with 'no Database' flag.
/// </summary>
public LoginDlg(bool noDatabase)
: this()
{
this.noDatabase = noDatabase;
}
/// <summary>
/// Constructor when a specific group membership is required.
/// </summary>
public LoginDlg(Config.Grp.GID requiredGroupMembership)
: this()
{
this.requiredGroupMembership = requiredGroupMembership;
}
/// <summary>
/// Constructor with a predefined user when a specific group membership is required.
/// </summary>
public LoginDlg(string predefinedUser, Config.Grp.GID requiredGroupMembership)
: this()
{
user = predefinedUser;
userNameTextBox.Text = predefinedUser;
this.requiredGroupMembership = requiredGroupMembership;
}
private void LoginDlg_Load(object sender, EventArgs e)
{
Text = Strings.User_Login + " TBF v." + Program.Version;
label1.Text = Strings.Username;
label2.Text = Strings.Password;
okButton.Text = Strings.OkBtnText;
cancelButton.Text = Strings.CancelBtnText;
if (user == null) userNameTextBox.Select();
else passwordTextBox.Select();
}
/// <summary>
/// Try to authorize the user when OK clicked.
/// </summary>
private void okButton_Click(object sender, EventArgs e)
{
user = userNameTextBox.Text;
password = passwordTextBox.Text;
bool authorized = Config.Entities.User.IsPowerUser(user, password);
if (!authorized && !noDatabase)
{
Config.Entities.User loadedUser = Config.Entities.User.LoadUserByName(user);
if (loadedUser != null)
{
if (requiredGroupMembership == Config.Grp.GID.Invalid)
{
authorized = loadedUser.Authorize(user, password);
}
else
{
authorized = loadedUser.Authorize(user, password, requiredGroupMembership);
}
}
}
if (authorized)
{
DialogResult = DialogResult.OK;
Close();
if (Program.MainWnd != null) Program.MainWnd.UpdateUser();
return;
}
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
DialogResult = DialogResult.None;
return;
}
/// <summary>
/// Cancel clicked, do not try to authorize.
/// </summary>
private void cancelButton_Click(object sender, EventArgs e)
{
if (requiredGroupMembership == Config.Grp.GID.Invalid)
{
Config.Entities.User.Unauthorize();
}
DialogResult = DialogResult.Cancel;
Close();
return;
}
}
}
+300
View File
@@ -0,0 +1,300 @@
<?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>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 24</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 51</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="passwordTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 48</value>
</data>
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox.Name" xml:space="preserve">
<value>passwordTextBox</value>
</data>
<data name="&gt;&gt;passwordTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;passwordTextBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;passwordTextBox.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
<value>317, 48</value>
</data>
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 28</value>
</data>
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="cancelButton.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="&gt;&gt;cancelButton.Name" xml:space="preserve">
<value>cancelButton</value>
</data>
<data name="&gt;&gt;cancelButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cancelButton.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;cancelButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="okButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
<value>317, 14</value>
</data>
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 28</value>
</data>
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="&gt;&gt;okButton.Name" xml:space="preserve">
<value>okButton</value>
</data>
<data name="&gt;&gt;okButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;okButton.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;okButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="userNameTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 22</value>
</data>
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;userNameTextBox.Name" xml:space="preserve">
<value>userNameTextBox</value>
</data>
<data name="&gt;&gt;userNameTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;userNameTextBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;userNameTextBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>434, 88</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>User login</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>LoginDlg</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>
@@ -0,0 +1,124 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using TBF.Resources;
namespace TBF.Forms
{
/// <summary>
/// Provides login dialog that includes test bench selection.
/// It is used only once on program startup. Does not do authorisation
/// as User.users have not been loadded from the DB yet.
/// </summary>
public partial class LoginDlgWithBenchSelection : Form
{
// Private fields
string user;
string password;
string benchName = null;
// Readonly public properties to do the authorization.
public string User { get { return user; } }
public string Password { get { return password; } }
public string BenchName { get { return benchName; } }
/// <summary>
/// Constructor.
/// </summary>
public LoginDlgWithBenchSelection()
{
InitializeComponent();
}
/// <summary>
/// Constructor with a predefined bench.
/// </summary>
public LoginDlgWithBenchSelection(string predefinedBench)
: this()
{
benchName = predefinedBench;
}
private void LoginDlgWithBenchSelection_Load(object sender, EventArgs e)
{
Localize();
#if DEBUG
userNameTextBox.Text = "milan";
passwordTextBox.Text = "napajedla";
#endif
for (int i = 0; i < Program.LocalSettings.BenchesCount; i++)
{
testBenchComboBox.Items.Add(Program.LocalSettings.TestBenches[i].BenchName);
if (benchName != null && benchName == Program.LocalSettings.TestBenches[i].BenchName)
{
testBenchComboBox.Text = benchName;
}
}
}
void Localize()
{
Text = Strings.User_Login + " TBF v." + Program.Version;
label1.Text = Strings.Username;
label2.Text = Strings.Password;
label3.Text = Strings.Test_bench;
okButton.Text = Strings.OkBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
/// <summary>
/// OK clicked (authorization is done outside this dialog).
/// </summary>
private void okButton_Click(object sender, EventArgs e)
{
if (testBenchComboBox.SelectedItem != null)
{
user = userNameTextBox.Text;
password = passwordTextBox.Text;
benchName = testBenchComboBox.SelectedItem.ToString();
DialogResult = DialogResult.OK;
Close();
return;
}
else
{
MessageBox.Show(Strings.PLs_select_testbench, Strings.Warning, MessageBoxButtons.OK);
}
}
/// <summary>
/// Cancel clicked.
/// </summary>
private void cancelButton_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
return;
}
private void passwordTextBox_TextChanged(object sender, EventArgs e)
{
if (passwordTextBox.Text != "")
{
this.AcceptButton = okButton;
}
}
private void userNameTextBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
passwordTextBox.Focus();
}
}
}
}
@@ -0,0 +1,133 @@
///
/// Copyright (c) 2013-2016 Sensus Metering Systems
///
namespace TBF.Forms
{
partial class LoginDlgWithBenchSelection
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlgWithBenchSelection));
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.testBenchComboBox = new System.Windows.Forms.ComboBox();
this.passwordTextBox = new System.Windows.Forms.TextBox();
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.userNameTextBox = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
resources.ApplyResources(this.label1, "label1");
this.label1.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
this.label1.Name = "label1";
//
// label2
//
resources.ApplyResources(this.label2, "label2");
this.label2.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
this.label2.Name = "label2";
//
// label3
//
resources.ApplyResources(this.label3, "label3");
this.label3.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
this.label3.Name = "label3";
//
// testBenchComboBox
//
resources.ApplyResources(this.testBenchComboBox, "testBenchComboBox");
this.testBenchComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.testBenchComboBox.FormattingEnabled = true;
this.testBenchComboBox.Name = "testBenchComboBox";
//
// passwordTextBox
//
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
this.passwordTextBox.Name = "passwordTextBox";
this.passwordTextBox.UseSystemPasswordChar = true;
this.passwordTextBox.TextChanged += new System.EventHandler(this.passwordTextBox_TextChanged);
//
// cancelButton
//
resources.ApplyResources(this.cancelButton, "cancelButton");
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancelButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
this.cancelButton.Name = "cancelButton";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
//
// okButton
//
resources.ApplyResources(this.okButton, "okButton");
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
this.okButton.ImageKey = global::TBF.Resources.Strings.Closing_the_tank;
this.okButton.Name = "okButton";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.okButton_Click);
//
// userNameTextBox
//
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
this.userNameTextBox.Name = "userNameTextBox";
this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress);
//
// LoginDlgWithBenchSelection
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.userNameTextBox);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.passwordTextBox);
this.Controls.Add(this.testBenchComboBox);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "LoginDlgWithBenchSelection";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Load += new System.EventHandler(this.LoginDlgWithBenchSelection_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox userNameTextBox;
private System.Windows.Forms.TextBox passwordTextBox;
private System.Windows.Forms.ComboBox testBenchComboBox;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
}
}
@@ -0,0 +1,351 @@
<?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>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="label1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="label1.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 17</value>
</data>
<data name="label1.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="label1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="label1.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;label1.Name" xml:space="preserve">
<value>label1</value>
</data>
<data name="&gt;&gt;label1.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
<value>7</value>
</data>
<data name="label2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label2.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 44</value>
</data>
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="label2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="label2.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;label2.Name" xml:space="preserve">
<value>label2</value>
</data>
<data name="&gt;&gt;label2.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="label3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="label3.Location" type="System.Drawing.Point, System.Drawing">
<value>8, 70</value>
</data>
<data name="label3.Size" type="System.Drawing.Size, System.Drawing">
<value>61, 13</value>
</data>
<data name="label3.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="label3.Text" xml:space="preserve">
<value>Test bench</value>
</data>
<data name="&gt;&gt;label3.Name" xml:space="preserve">
<value>label3</value>
</data>
<data name="&gt;&gt;label3.Type" xml:space="preserve">
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;label3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="testBenchComboBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="testBenchComboBox.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 67</value>
</data>
<data name="testBenchComboBox.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 21</value>
</data>
<data name="testBenchComboBox.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;testBenchComboBox.Name" xml:space="preserve">
<value>testBenchComboBox</value>
</data>
<data name="&gt;&gt;testBenchComboBox.Type" xml:space="preserve">
<value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;testBenchComboBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;testBenchComboBox.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="passwordTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 41</value>
</data>
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;passwordTextBox.Name" xml:space="preserve">
<value>passwordTextBox</value>
</data>
<data name="&gt;&gt;passwordTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;passwordTextBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;passwordTextBox.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
<value>317, 48</value>
</data>
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 28</value>
</data>
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="cancelButton.Text" xml:space="preserve">
<value>Cancel</value>
</data>
<data name="&gt;&gt;cancelButton.Name" xml:space="preserve">
<value>cancelButton</value>
</data>
<data name="&gt;&gt;cancelButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cancelButton.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;cancelButton.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="okButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
<value>317, 14</value>
</data>
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 28</value>
</data>
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="&gt;&gt;okButton.Name" xml:space="preserve">
<value>okButton</value>
</data>
<data name="&gt;&gt;okButton.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;okButton.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;okButton.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="userNameTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
<value>128, 15</value>
</data>
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;userNameTextBox.Name" xml:space="preserve">
<value>userNameTextBox</value>
</data>
<data name="&gt;&gt;userNameTextBox.Type" xml:space="preserve">
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;userNameTextBox.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;userNameTextBox.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>434, 102</value>
</data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>User login</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>LoginDlgWithBenchSelection</value>
</data>
<data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root>