SharedDatabase : DoubleLoginDlg, TripleLoginDlg.

This commit is contained in:
Milan Hanajik 2022-01-06 23:26:26 +01:00
parent 068aee3cbd
commit 9a7ed9668b
13 changed files with 3100 additions and 3 deletions

View File

@ -18,7 +18,10 @@ namespace Common
public static DBSettings LocalUsersDB = null;
public static IUser CurrentUser;
public static Common.AuthorizedAs AuthorizedAs;
public static IUser CurrentUser2;
public static IUser CurrentUser3;
public static Common.AuthorizedAs AuthorizedAs;
public static DateTime LastAuthorization = DateTime.Now;
public static int MinPasswdLength = 0;
@ -26,7 +29,14 @@ namespace Common
public static string GetCurrentUserName()
{
return (CurrentUser != null && CurrentUser.UserName != null) ? CurrentUser.UserName : string.Empty;
if (CurrentUser == null || CurrentUser.UserName == null)
return string.Empty;
else if (CurrentUser2 == null || CurrentUser2.UserName == null)
return CurrentUser.UserName;
else if (CurrentUser3 == null || CurrentUser3.UserName == null)
return string.Format("{0},{1}", CurrentUser.UserName, CurrentUser2.UserName);
else
return string.Format("{0},{1},{2}", CurrentUser.UserName, CurrentUser2.UserName, CurrentUser3.UserName);
}
}
}

View File

@ -0,0 +1,199 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
namespace SharedDatabase.Forms
{
partial class DoubleLoginDlg
{
/// <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(DoubleLoginDlg));
this.aliasLabel1 = new System.Windows.Forms.Label();
this.passwordLabel1 = new System.Windows.Forms.Label();
this.passwordTextBox1 = new System.Windows.Forms.TextBox();
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.userNameTextBox1 = new System.Windows.Forms.TextBox();
this.workplaceGroupBox1 = new System.Windows.Forms.GroupBox();
this.loginStatePictureBox1 = new System.Windows.Forms.PictureBox();
this.workplaceGroupBox2 = new System.Windows.Forms.GroupBox();
this.loginStatePictureBox2 = new System.Windows.Forms.PictureBox();
this.userNameTextBox2 = new System.Windows.Forms.TextBox();
this.aliasLabel2 = new System.Windows.Forms.Label();
this.passwordLabel2 = new System.Windows.Forms.Label();
this.passwordTextBox2 = new System.Windows.Forms.TextBox();
this.workplaceGroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox1)).BeginInit();
this.workplaceGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox2)).BeginInit();
this.SuspendLayout();
//
// aliasLabel1
//
resources.ApplyResources(this.aliasLabel1, "aliasLabel1");
this.aliasLabel1.Name = "aliasLabel1";
this.aliasLabel1.Click += new System.EventHandler(this.aliasLabel1_Click);
//
// passwordLabel1
//
resources.ApplyResources(this.passwordLabel1, "passwordLabel1");
this.passwordLabel1.Name = "passwordLabel1";
//
// passwordTextBox1
//
resources.ApplyResources(this.passwordTextBox1, "passwordTextBox1");
this.passwordTextBox1.Name = "passwordTextBox1";
this.passwordTextBox1.UseSystemPasswordChar = true;
this.passwordTextBox1.TextChanged += new System.EventHandler(this.passwordTextBox1_TextChanged);
this.passwordTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox1_KeyPress);
//
// 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);
//
// userNameTextBox1
//
resources.ApplyResources(this.userNameTextBox1, "userNameTextBox1");
this.userNameTextBox1.Name = "userNameTextBox1";
this.userNameTextBox1.TextChanged += new System.EventHandler(this.userNameTextBox1_TextChanged);
this.userNameTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox1_KeyPress);
//
// workplaceGroupBox1
//
this.workplaceGroupBox1.Controls.Add(this.loginStatePictureBox1);
this.workplaceGroupBox1.Controls.Add(this.userNameTextBox1);
this.workplaceGroupBox1.Controls.Add(this.aliasLabel1);
this.workplaceGroupBox1.Controls.Add(this.passwordLabel1);
this.workplaceGroupBox1.Controls.Add(this.passwordTextBox1);
resources.ApplyResources(this.workplaceGroupBox1, "workplaceGroupBox1");
this.workplaceGroupBox1.Name = "workplaceGroupBox1";
this.workplaceGroupBox1.TabStop = false;
//
// loginStatePictureBox1
//
resources.ApplyResources(this.loginStatePictureBox1, "loginStatePictureBox1");
this.loginStatePictureBox1.Name = "loginStatePictureBox1";
this.loginStatePictureBox1.TabStop = false;
//
// workplaceGroupBox2
//
this.workplaceGroupBox2.Controls.Add(this.loginStatePictureBox2);
this.workplaceGroupBox2.Controls.Add(this.userNameTextBox2);
this.workplaceGroupBox2.Controls.Add(this.aliasLabel2);
this.workplaceGroupBox2.Controls.Add(this.passwordLabel2);
this.workplaceGroupBox2.Controls.Add(this.passwordTextBox2);
resources.ApplyResources(this.workplaceGroupBox2, "workplaceGroupBox2");
this.workplaceGroupBox2.Name = "workplaceGroupBox2";
this.workplaceGroupBox2.TabStop = false;
//
// loginStatePictureBox2
//
resources.ApplyResources(this.loginStatePictureBox2, "loginStatePictureBox2");
this.loginStatePictureBox2.Name = "loginStatePictureBox2";
this.loginStatePictureBox2.TabStop = false;
//
// userNameTextBox2
//
resources.ApplyResources(this.userNameTextBox2, "userNameTextBox2");
this.userNameTextBox2.Name = "userNameTextBox2";
this.userNameTextBox2.TextChanged += new System.EventHandler(this.userNameTextBox2_TextChanged);
this.userNameTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox2_KeyPress);
//
// aliasLabel2
//
resources.ApplyResources(this.aliasLabel2, "aliasLabel2");
this.aliasLabel2.Name = "aliasLabel2";
this.aliasLabel2.Click += new System.EventHandler(this.aliasLabel2_Click);
//
// passwordLabel2
//
resources.ApplyResources(this.passwordLabel2, "passwordLabel2");
this.passwordLabel2.Name = "passwordLabel2";
//
// passwordTextBox2
//
resources.ApplyResources(this.passwordTextBox2, "passwordTextBox2");
this.passwordTextBox2.Name = "passwordTextBox2";
this.passwordTextBox2.UseSystemPasswordChar = true;
this.passwordTextBox2.TextChanged += new System.EventHandler(this.passwordTextBox2_TextChanged);
this.passwordTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox2_KeyPress);
//
// DoubleLoginDlg
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.LightGray;
this.CancelButton = this.cancelButton;
this.Controls.Add(this.workplaceGroupBox2);
this.Controls.Add(this.workplaceGroupBox1);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "DoubleLoginDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LoginDlg_FormClosing);
this.Load += new System.EventHandler(this.LoginDlg_Load);
this.workplaceGroupBox1.ResumeLayout(false);
this.workplaceGroupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox1)).EndInit();
this.workplaceGroupBox2.ResumeLayout(false);
this.workplaceGroupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox2)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label aliasLabel1;
private System.Windows.Forms.Label passwordLabel1;
private System.Windows.Forms.TextBox userNameTextBox1;
private System.Windows.Forms.TextBox passwordTextBox1;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox workplaceGroupBox1;
private System.Windows.Forms.PictureBox loginStatePictureBox1;
private System.Windows.Forms.GroupBox workplaceGroupBox2;
private System.Windows.Forms.PictureBox loginStatePictureBox2;
private System.Windows.Forms.TextBox userNameTextBox2;
private System.Windows.Forms.Label aliasLabel2;
private System.Windows.Forms.Label passwordLabel2;
private System.Windows.Forms.TextBox passwordTextBox2;
}
}

View File

@ -0,0 +1,525 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.Windows.Forms;
using Common;
using GemCard;
using SharedDatabase.Entities;
using SharedDatabase.Resources;
namespace SharedDatabase.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 DoubleLoginDlg : Form
{
// Private fields
string predefinedUser;
GID[] requiredGroupMembership;
bool noDatabase;
Color oriBackColor;
/// Smart card support, card S/N is used as user.Tag
GemCard.CardNative card;
string[] cardReaders;
string smartCardReader;
User authorizedUser1; /// Authorized user 1 or null
User authorizedUser2; /// Authorized user 2 or null
public LoginMethod Method1;
public LoginMethod Method2;
public string VersionString;
/// <summary>
/// Constructor.
/// </summary>
public DoubleLoginDlg()
{
InitializeComponent();
loginStatePictureBox1.Image = Properties.Resources.questionMark;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
authorizedUser1 = null;
authorizedUser2 = null;
oriBackColor = BackColor;
}
/// <summary>
/// Constructor with a predefined user.
/// </summary>
public DoubleLoginDlg(string predefinedUser)
: this()
{
this.predefinedUser = predefinedUser;
userNameTextBox1.Text = predefinedUser;
}
/// <summary>
/// Constructor with two owrkplace names.
/// </summary>
/// <param name="workplace1">Name of workplace A</param>
/// <param name="workplace2">Name of workplace B</param>
public DoubleLoginDlg(string workplace1, string workplace2)
: this()
{
workplaceGroupBox1.Text = workplace1;
workplaceGroupBox2.Text = workplace2;
}
/// <summary>
/// Constructor with 'no Database' flag.
/// </summary>
public DoubleLoginDlg(bool noDatabase)
: this()
{
this.noDatabase = noDatabase;
}
/// <summary>
/// Constructor when a specific group membership is required.
/// </summary>
public DoubleLoginDlg(GID[] requiredGroupMembership)
: this()
{
this.requiredGroupMembership = requiredGroupMembership;
}
/// <summary>
/// Constructor with a predefined user when a specific group membership is required.
/// </summary>
public DoubleLoginDlg(string predefinedUser, GID[] requiredGroupMembership)
: this()
{
this.predefinedUser = predefinedUser;
userNameTextBox1.Text = predefinedUser;
this.requiredGroupMembership = requiredGroupMembership;
}
private void LoginDlg_Load(object sender, EventArgs e)
{
Localize();
if (predefinedUser == null)
{
userNameTextBox1.Select();
}
else
{
passwordTextBox1.Select();
}
///
/// Smart card reader detection
///
smartCardReader = null; /// null = No smart card reader detected
try
{
card = new CardNative();
/// Find NFC smart card reader
cardReaders = card.ListReaders();
foreach (var crd in cardReaders)
{
if (crd.Contains("NFC"))
{
smartCardReader = crd; /// NFC smart card reader detected
break;
}
}
if (!string.IsNullOrEmpty(smartCardReader))
{
/// Reader found, initialize NFC smart card reader
card.OnCardInserted += delegate(object sndr, CardInsertedEventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<CardInsertedEventArgs>(OnCardInserted), sndr, args); }
else OnCardInserted(sndr, args);
};
card.OnCardRemoved += delegate(object sndr, CardRemovedEventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<CardRemovedEventArgs>(OnCardRemoved), sndr, args); }
else OnCardRemoved(sndr, args);
};
card.StartCardEvents(smartCardReader);
Text += " (NFC)";
}
}
catch (Exception)
{
smartCardReader = null;
}
}
void Localize()
{
Text = Strings.User_Login + (string.IsNullOrEmpty(VersionString) ? "" : (" " + VersionString));
aliasLabel1.Text = GetAliasLabel(Method1);
aliasLabel2.Text = GetAliasLabel(Method2);
passwordLabel1.Text = Strings.Password;
passwordLabel2.Text = Strings.Password;
okButton.Text = Strings.OkBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
string GetAliasLabel(LoginMethod method)
{
switch (method)
{
default:
case LoginMethod.UserName: return Strings.User_name;
case LoginMethod.FullName: return Strings.Full_name;
case LoginMethod.Number: return Strings.User_code;
}
}
/// <summary>
/// Try to authorize the user when OK clicked.
/// </summary>
private void okButton_Click(object sender, EventArgs e)
{
User tempUser;
if (authorizedUser1 == null)
{
if (string.IsNullOrEmpty(userNameTextBox1.Text) || string.IsNullOrEmpty(passwordTextBox1.Text))
{
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox1.Text, passwordTextBox1.Text, Method1)) != null)
{
authorizedUser1 = tempUser;
loginStatePictureBox1.Image = Properties.Resources.accepted;
}
else
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.rejected;
}
}
if (authorizedUser2 == null)
{
if (string.IsNullOrEmpty(userNameTextBox2.Text) || string.IsNullOrEmpty(passwordTextBox2.Text))
{
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox2.Text, passwordTextBox2.Text, Method2)) != null)
{
authorizedUser2 = tempUser;
loginStatePictureBox2.Image = Properties.Resources.accepted;
}
else
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.rejected;
}
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
DialogResult = DialogResult.None;
return;
}
User TryAuthorize(string user, string password, LoginMethod method)
{
if (Common.Utils.IsPowerUser(user, password))
{
return new User(user, 6, true);
}
User loadedUser = null;
bool authorized = false;
if (!noDatabase)
{
DBSettings db = GlobalData.LocalUsersDB;
loadedUser = User.LoadUserByName(user, db);
if (loadedUser != null)
{
switch (method)
{
default:
case LoginMethod.UserName:
authorized = loadedUser.Authorize(user, password, requiredGroupMembership);
break;
case LoginMethod.FullName:
authorized = loadedUser.AuthorizeFullName(user, password, requiredGroupMembership);
break;
case LoginMethod.Number:
int number;
if (!int.TryParse(user, out number)) break;
authorized = loadedUser.AuthorizeNumber(number, password, requiredGroupMembership);
break;
}
}
}
return authorized ? loadedUser : null;
}
/// <summary>
/// Cancel clicked, do not try to authorize.
/// </summary>
private void cancelButton_Click(object sender, EventArgs e)
{
if (requiredGroupMembership == null)
{
Entities.User.Unauthorize();
}
DialogResult = DialogResult.Cancel;
Close();
return;
}
private void aliasLabel1_Click(object sender, EventArgs e)
{
if (++Method1 == LoginMethod.Count) Method1 = 0;
aliasLabel1.Text = GetAliasLabel(Method1);
}
private void aliasLabel2_Click(object sender, EventArgs e)
{
if (++Method2 == LoginMethod.Count) Method2 = 0;
aliasLabel2.Text = GetAliasLabel(Method2);
}
void OnCardInserted(object sender, CardInsertedEventArgs args)
{
BackColor = Color.Green;
card.Connect(smartCardReader, SHARE.Shared, PROTOCOL.T0orT1);
/// Read the serial number of the card
APDUResponse response = card.Transmit(new APDUCommand(0xFF, 0xCA, 0x00, 0x00, null, 7));
string tag = response.ToString();
card.Disconnect(DISCONNECT.Leave);
bool authorized = false;
DBSettings db = GlobalData.LocalUsersDB;
IUser oriUser = GlobalData.CurrentUser;
User loadedUser = User.LoadUserByTag(tag, db);
if (loadedUser != null)
{
authorized = loadedUser.AuthorizeTag(tag, requiredGroupMembership);
}
if (ActiveControl == userNameTextBox1 || ActiveControl == passwordTextBox1)
{
if (authorized)
{
userNameTextBox1.Text = loadedUser.UserName;
passwordTextBox1.Text = string.Empty;
authorizedUser1 = loadedUser;
loginStatePictureBox1.Image = Properties.Resources.accepted;
userNameTextBox2.Focus();
}
else
{
userNameTextBox1.Text = string.Empty;
passwordTextBox1.Text = string.Empty;
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.rejected;
}
}
else if (ActiveControl == userNameTextBox2 || ActiveControl == passwordTextBox2)
{
if (authorized)
{
userNameTextBox2.Text = loadedUser.UserName;
passwordTextBox2.Text = string.Empty;
authorizedUser2 = loadedUser;
loginStatePictureBox2.Image = Properties.Resources.accepted;
userNameTextBox1.Focus();
}
else
{
userNameTextBox2.Text = string.Empty;
passwordTextBox2.Text = string.Empty;
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.rejected;
}
}
if (authorizedUser1 == null && !string.IsNullOrEmpty(userNameTextBox1.Text) && !string.IsNullOrEmpty(passwordTextBox1.Text))
{
authorizedUser1 = TryAuthorize(userNameTextBox1.Text, passwordTextBox1.Text, Method1);
loginStatePictureBox1.Image = (authorizedUser1 != null) ? Properties.Resources.accepted : Properties.Resources.rejected;
}
if (authorizedUser2 == null && !string.IsNullOrEmpty(userNameTextBox2.Text) && !string.IsNullOrEmpty(passwordTextBox2.Text))
{
authorizedUser2 = TryAuthorize(userNameTextBox2.Text, passwordTextBox2.Text, Method2);
loginStatePictureBox2.Image = (authorizedUser2 != null) ? Properties.Resources.accepted : Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
//MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
DialogResult = DialogResult.None;
return;
}
void OnCardRemoved(object sender, CardRemovedEventArgs args)
{
BackColor = oriBackColor;
}
private void LoginDlg_FormClosing(object sender, FormClosingEventArgs e)
{
if (!string.IsNullOrEmpty(smartCardReader))
{
card.StopCardEvents();
}
}
///
/// 1st user / password TextBox processing
///
private void userNameTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
passwordTextBox1.Focus();
}
}
private void passwordTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
User tempUser;
if (string.IsNullOrEmpty(userNameTextBox1.Text) || string.IsNullOrEmpty(passwordTextBox1.Text))
{
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox1.Text, passwordTextBox1.Text, Method1)) != null)
{
authorizedUser1 = tempUser;
loginStatePictureBox1.Image = Properties.Resources.accepted;
}
else
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
userNameTextBox2.Focus();
}
}
private void userNameTextBox1_TextChanged(object sender, EventArgs e)
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
private void passwordTextBox1_TextChanged(object sender, EventArgs e)
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
///
/// 2nd user / password TextBox processing
///
private void userNameTextBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
passwordTextBox2.Focus();
}
}
private void passwordTextBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
User tempUser;
if (string.IsNullOrEmpty(userNameTextBox2.Text) || string.IsNullOrEmpty(passwordTextBox2.Text))
{
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox2.Text, passwordTextBox2.Text, Method2)) != null)
{
authorizedUser2 = tempUser;
loginStatePictureBox2.Image = Properties.Resources.accepted;
}
else
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
userNameTextBox1.Focus();
}
}
private void userNameTextBox2_TextChanged(object sender, EventArgs e)
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
private void passwordTextBox2_TextChanged(object sender, EventArgs e)
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
/// <summary>
/// Returns true when both users are already logged in
/// </summary>
bool AreAllUsersKnown()
{
return (authorizedUser1 != null) && (authorizedUser2 != null);
}
/// <summary>
/// Actions before closing this dialog on successful login of all users
/// </summary>
void PrepareClosingDlg()
{
GlobalData.CurrentUser = authorizedUser1;
GlobalData.CurrentUser2 = authorizedUser2;
DialogResult = DialogResult.OK;
Close();
}
}
}

View File

@ -0,0 +1,495 @@
<?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="aliasLabel1.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="aliasLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 26</value>
</data>
<data name="aliasLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="aliasLabel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="aliasLabel1.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;aliasLabel1.Name" xml:space="preserve">
<value>aliasLabel1</value>
</data>
<data name="&gt;&gt;aliasLabel1.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;aliasLabel1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;aliasLabel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="passwordLabel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="passwordLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 53</value>
</data>
<data name="passwordLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="passwordLabel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="passwordLabel1.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;passwordLabel1.Name" xml:space="preserve">
<value>passwordLabel1</value>
</data>
<data name="&gt;&gt;passwordLabel1.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;passwordLabel1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;passwordLabel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="passwordTextBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 50</value>
</data>
<data name="passwordTextBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox1.Name" xml:space="preserve">
<value>passwordTextBox1</value>
</data>
<data name="&gt;&gt;passwordTextBox1.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;passwordTextBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;passwordTextBox1.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="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>405, 62</value>
</data>
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 37</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>3</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>405, 16</value>
</data>
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 37</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>2</value>
</data>
<data name="userNameTextBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 24</value>
</data>
<data name="userNameTextBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;userNameTextBox1.Name" xml:space="preserve">
<value>userNameTextBox1</value>
</data>
<data name="&gt;&gt;userNameTextBox1.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;userNameTextBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;userNameTextBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="loginStatePictureBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="loginStatePictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>308, 26</value>
</data>
<data name="loginStatePictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="loginStatePictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Name" xml:space="preserve">
<value>loginStatePictureBox1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="workplaceGroupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
</data>
<data name="workplaceGroupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 86</value>
</data>
<data name="workplaceGroupBox1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="workplaceGroupBox1.Text" xml:space="preserve">
<value>Work place A</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.Name" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="loginStatePictureBox2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="loginStatePictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="loginStatePictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>308, 26</value>
</data>
<data name="loginStatePictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="loginStatePictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Name" xml:space="preserve">
<value>loginStatePictureBox2</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="userNameTextBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 24</value>
</data>
<data name="userNameTextBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.Name" xml:space="preserve">
<value>userNameTextBox2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.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;userNameTextBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="aliasLabel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="aliasLabel2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="aliasLabel2.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 26</value>
</data>
<data name="aliasLabel2.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="aliasLabel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="aliasLabel2.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;aliasLabel2.Name" xml:space="preserve">
<value>aliasLabel2</value>
</data>
<data name="&gt;&gt;aliasLabel2.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;aliasLabel2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;aliasLabel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="passwordLabel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="passwordLabel2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="passwordLabel2.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 53</value>
</data>
<data name="passwordLabel2.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="passwordLabel2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="passwordLabel2.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;passwordLabel2.Name" xml:space="preserve">
<value>passwordLabel2</value>
</data>
<data name="&gt;&gt;passwordLabel2.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;passwordLabel2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;passwordLabel2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="passwordTextBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 50</value>
</data>
<data name="passwordTextBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox2.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox2.Name" xml:space="preserve">
<value>passwordTextBox2</value>
</data>
<data name="&gt;&gt;passwordTextBox2.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;passwordTextBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;passwordTextBox2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="workplaceGroupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 106</value>
</data>
<data name="workplaceGroupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 86</value>
</data>
<data name="workplaceGroupBox2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="workplaceGroupBox2.Text" xml:space="preserve">
<value>Work place B</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.Name" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.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>525, 204</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>DoubleLoginDlg</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>

View File

@ -0,0 +1,260 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
namespace SharedDatabase.Forms
{
partial class TripleLoginDlg
{
/// <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(TripleLoginDlg));
this.aliasLabel1 = new System.Windows.Forms.Label();
this.passwordLabel1 = new System.Windows.Forms.Label();
this.passwordTextBox1 = new System.Windows.Forms.TextBox();
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.userNameTextBox1 = new System.Windows.Forms.TextBox();
this.workplaceGroupBox1 = new System.Windows.Forms.GroupBox();
this.loginStatePictureBox1 = new System.Windows.Forms.PictureBox();
this.workplaceGroupBox2 = new System.Windows.Forms.GroupBox();
this.loginStatePictureBox2 = new System.Windows.Forms.PictureBox();
this.userNameTextBox2 = new System.Windows.Forms.TextBox();
this.aliasLabel2 = new System.Windows.Forms.Label();
this.passwordLabel2 = new System.Windows.Forms.Label();
this.passwordTextBox2 = new System.Windows.Forms.TextBox();
this.workplaceGroupBox3 = new System.Windows.Forms.GroupBox();
this.loginStatePictureBox3 = new System.Windows.Forms.PictureBox();
this.userNameTextBox3 = new System.Windows.Forms.TextBox();
this.aliasLabel3 = new System.Windows.Forms.Label();
this.passwordLabel3 = new System.Windows.Forms.Label();
this.passwordTextBox3 = new System.Windows.Forms.TextBox();
this.workplaceGroupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox1)).BeginInit();
this.workplaceGroupBox2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox2)).BeginInit();
this.workplaceGroupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox3)).BeginInit();
this.SuspendLayout();
//
// aliasLabel1
//
resources.ApplyResources(this.aliasLabel1, "aliasLabel1");
this.aliasLabel1.Name = "aliasLabel1";
this.aliasLabel1.Click += new System.EventHandler(this.aliasLabel1_Click);
//
// passwordLabel1
//
resources.ApplyResources(this.passwordLabel1, "passwordLabel1");
this.passwordLabel1.Name = "passwordLabel1";
//
// passwordTextBox1
//
resources.ApplyResources(this.passwordTextBox1, "passwordTextBox1");
this.passwordTextBox1.Name = "passwordTextBox1";
this.passwordTextBox1.UseSystemPasswordChar = true;
this.passwordTextBox1.TextChanged += new System.EventHandler(this.passwordTextBox1_TextChanged);
this.passwordTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox1_KeyPress);
//
// 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);
//
// userNameTextBox1
//
resources.ApplyResources(this.userNameTextBox1, "userNameTextBox1");
this.userNameTextBox1.Name = "userNameTextBox1";
this.userNameTextBox1.TextChanged += new System.EventHandler(this.userNameTextBox1_TextChanged);
this.userNameTextBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox1_KeyPress);
//
// workplaceGroupBox1
//
this.workplaceGroupBox1.Controls.Add(this.loginStatePictureBox1);
this.workplaceGroupBox1.Controls.Add(this.userNameTextBox1);
this.workplaceGroupBox1.Controls.Add(this.aliasLabel1);
this.workplaceGroupBox1.Controls.Add(this.passwordLabel1);
this.workplaceGroupBox1.Controls.Add(this.passwordTextBox1);
resources.ApplyResources(this.workplaceGroupBox1, "workplaceGroupBox1");
this.workplaceGroupBox1.Name = "workplaceGroupBox1";
this.workplaceGroupBox1.TabStop = false;
//
// loginStatePictureBox1
//
resources.ApplyResources(this.loginStatePictureBox1, "loginStatePictureBox1");
this.loginStatePictureBox1.Name = "loginStatePictureBox1";
this.loginStatePictureBox1.TabStop = false;
//
// workplaceGroupBox2
//
this.workplaceGroupBox2.Controls.Add(this.loginStatePictureBox2);
this.workplaceGroupBox2.Controls.Add(this.userNameTextBox2);
this.workplaceGroupBox2.Controls.Add(this.aliasLabel2);
this.workplaceGroupBox2.Controls.Add(this.passwordLabel2);
this.workplaceGroupBox2.Controls.Add(this.passwordTextBox2);
resources.ApplyResources(this.workplaceGroupBox2, "workplaceGroupBox2");
this.workplaceGroupBox2.Name = "workplaceGroupBox2";
this.workplaceGroupBox2.TabStop = false;
//
// loginStatePictureBox2
//
resources.ApplyResources(this.loginStatePictureBox2, "loginStatePictureBox2");
this.loginStatePictureBox2.Name = "loginStatePictureBox2";
this.loginStatePictureBox2.TabStop = false;
//
// userNameTextBox2
//
resources.ApplyResources(this.userNameTextBox2, "userNameTextBox2");
this.userNameTextBox2.Name = "userNameTextBox2";
this.userNameTextBox2.TextChanged += new System.EventHandler(this.userNameTextBox2_TextChanged);
this.userNameTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox2_KeyPress);
//
// aliasLabel2
//
resources.ApplyResources(this.aliasLabel2, "aliasLabel2");
this.aliasLabel2.Name = "aliasLabel2";
this.aliasLabel2.Click += new System.EventHandler(this.aliasLabel2_Click);
//
// passwordLabel2
//
resources.ApplyResources(this.passwordLabel2, "passwordLabel2");
this.passwordLabel2.Name = "passwordLabel2";
//
// passwordTextBox2
//
resources.ApplyResources(this.passwordTextBox2, "passwordTextBox2");
this.passwordTextBox2.Name = "passwordTextBox2";
this.passwordTextBox2.UseSystemPasswordChar = true;
this.passwordTextBox2.TextChanged += new System.EventHandler(this.passwordTextBox2_TextChanged);
this.passwordTextBox2.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox2_KeyPress);
//
// workplaceGroupBox3
//
this.workplaceGroupBox3.Controls.Add(this.loginStatePictureBox3);
this.workplaceGroupBox3.Controls.Add(this.userNameTextBox3);
this.workplaceGroupBox3.Controls.Add(this.aliasLabel3);
this.workplaceGroupBox3.Controls.Add(this.passwordLabel3);
this.workplaceGroupBox3.Controls.Add(this.passwordTextBox3);
resources.ApplyResources(this.workplaceGroupBox3, "workplaceGroupBox3");
this.workplaceGroupBox3.Name = "workplaceGroupBox3";
this.workplaceGroupBox3.TabStop = false;
//
// loginStatePictureBox3
//
resources.ApplyResources(this.loginStatePictureBox3, "loginStatePictureBox3");
this.loginStatePictureBox3.Name = "loginStatePictureBox3";
this.loginStatePictureBox3.TabStop = false;
//
// userNameTextBox3
//
resources.ApplyResources(this.userNameTextBox3, "userNameTextBox3");
this.userNameTextBox3.Name = "userNameTextBox3";
this.userNameTextBox3.TextChanged += new System.EventHandler(this.userNameTextBox3_TextChanged);
this.userNameTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox3_KeyPress);
//
// aliasLabel3
//
resources.ApplyResources(this.aliasLabel3, "aliasLabel3");
this.aliasLabel3.Name = "aliasLabel3";
this.aliasLabel3.Click += new System.EventHandler(this.aliasLabel3_Click);
//
// passwordLabel3
//
resources.ApplyResources(this.passwordLabel3, "passwordLabel3");
this.passwordLabel3.Name = "passwordLabel3";
//
// passwordTextBox3
//
resources.ApplyResources(this.passwordTextBox3, "passwordTextBox3");
this.passwordTextBox3.Name = "passwordTextBox3";
this.passwordTextBox3.UseSystemPasswordChar = true;
this.passwordTextBox3.TextChanged += new System.EventHandler(this.passwordTextBox3_TextChanged);
this.passwordTextBox3.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox3_KeyPress);
//
// TripleLoginDlg
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.LightGray;
this.CancelButton = this.cancelButton;
this.Controls.Add(this.workplaceGroupBox3);
this.Controls.Add(this.workplaceGroupBox2);
this.Controls.Add(this.workplaceGroupBox1);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "TripleLoginDlg";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LoginDlg_FormClosing);
this.Load += new System.EventHandler(this.LoginDlg_Load);
this.workplaceGroupBox1.ResumeLayout(false);
this.workplaceGroupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox1)).EndInit();
this.workplaceGroupBox2.ResumeLayout(false);
this.workplaceGroupBox2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox2)).EndInit();
this.workplaceGroupBox3.ResumeLayout(false);
this.workplaceGroupBox3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.loginStatePictureBox3)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label aliasLabel1;
private System.Windows.Forms.Label passwordLabel1;
private System.Windows.Forms.TextBox userNameTextBox1;
private System.Windows.Forms.TextBox passwordTextBox1;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
private System.Windows.Forms.GroupBox workplaceGroupBox1;
private System.Windows.Forms.PictureBox loginStatePictureBox1;
private System.Windows.Forms.GroupBox workplaceGroupBox2;
private System.Windows.Forms.PictureBox loginStatePictureBox2;
private System.Windows.Forms.TextBox userNameTextBox2;
private System.Windows.Forms.Label aliasLabel2;
private System.Windows.Forms.Label passwordLabel2;
private System.Windows.Forms.TextBox passwordTextBox2;
private System.Windows.Forms.GroupBox workplaceGroupBox3;
private System.Windows.Forms.PictureBox loginStatePictureBox3;
private System.Windows.Forms.TextBox userNameTextBox3;
private System.Windows.Forms.Label aliasLabel3;
private System.Windows.Forms.Label passwordLabel3;
private System.Windows.Forms.TextBox passwordTextBox3;
}
}

View File

@ -0,0 +1,633 @@
///
/// Copyright (c) 2019 Sensus Slovensko a.s.
///
using System;
using System.Drawing;
using System.Windows.Forms;
using Common;
using GemCard;
using SharedDatabase.Entities;
using SharedDatabase.Resources;
namespace SharedDatabase.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 TripleLoginDlg : Form
{
// Private fields
string predefinedUser;
GID[] requiredGroupMembership;
bool noDatabase;
Color oriBackColor;
/// Smart card support, card S/N is used as user.Tag
GemCard.CardNative card;
string[] cardReaders;
string smartCardReader;
User authorizedUser1; /// Authorized user 1 or null
User authorizedUser2; /// Authorized user 2 or null
User authorizedUser3; /// Authorized user 3 or null
public LoginMethod Method1;
public LoginMethod Method2;
public LoginMethod Method3;
public string VersionString;
/// <summary>
/// Constructor.
/// </summary>
public TripleLoginDlg()
{
InitializeComponent();
loginStatePictureBox1.Image = Properties.Resources.questionMark;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
loginStatePictureBox3.Image = Properties.Resources.questionMark;
authorizedUser1 = null;
authorizedUser2 = null;
authorizedUser3 = null;
oriBackColor = BackColor;
}
/// <summary>
/// Constructor with a predefined user.
/// </summary>
public TripleLoginDlg(string predefinedUser)
: this()
{
this.predefinedUser = predefinedUser;
userNameTextBox1.Text = predefinedUser;
}
/// <summary>
/// Constructor with two owrkplace names.
/// </summary>
/// <param name="workplace1">Name of workplace A</param>
/// <param name="workplace2">Name of workplace B</param>
public TripleLoginDlg(string workplace1, string workplace2, string workplace3)
: this()
{
workplaceGroupBox1.Text = workplace1;
workplaceGroupBox2.Text = workplace2;
workplaceGroupBox3.Text = workplace3;
}
/// <summary>
/// Constructor with 'no Database' flag.
/// </summary>
public TripleLoginDlg(bool noDatabase)
: this()
{
this.noDatabase = noDatabase;
}
/// <summary>
/// Constructor when a specific group membership is required.
/// </summary>
public TripleLoginDlg(GID[] requiredGroupMembership)
: this()
{
this.requiredGroupMembership = requiredGroupMembership;
}
/// <summary>
/// Constructor with a predefined user when a specific group membership is required.
/// </summary>
public TripleLoginDlg(string predefinedUser, GID[] requiredGroupMembership)
: this()
{
this.predefinedUser = predefinedUser;
userNameTextBox1.Text = predefinedUser;
this.requiredGroupMembership = requiredGroupMembership;
}
private void LoginDlg_Load(object sender, EventArgs e)
{
Localize();
if (predefinedUser == null)
{
userNameTextBox1.Select();
}
else
{
passwordTextBox1.Select();
}
///
/// Smart card reader detection
///
smartCardReader = null; /// null = No smart card reader detected
try
{
card = new CardNative();
/// Find NFC smart card reader
cardReaders = card.ListReaders();
foreach (var crd in cardReaders)
{
if (crd.Contains("NFC"))
{
smartCardReader = crd; /// NFC smart card reader detected
break;
}
}
if (!string.IsNullOrEmpty(smartCardReader))
{
/// Reader found, initialize NFC smart card reader
card.OnCardInserted += delegate(object sndr, CardInsertedEventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<CardInsertedEventArgs>(OnCardInserted), sndr, args); }
else OnCardInserted(sndr, args);
};
card.OnCardRemoved += delegate(object sndr, CardRemovedEventArgs args)
{
if (InvokeRequired) { Invoke(new EventHandler<CardRemovedEventArgs>(OnCardRemoved), sndr, args); }
else OnCardRemoved(sndr, args);
};
card.StartCardEvents(smartCardReader);
Text += " (NFC)";
}
}
catch (Exception)
{
smartCardReader = null;
}
}
void Localize()
{
Text = Strings.User_Login + (string.IsNullOrEmpty(VersionString) ? "" : (" " + VersionString));
aliasLabel1.Text = GetAliasLabel(Method1);
aliasLabel2.Text = GetAliasLabel(Method2);
aliasLabel3.Text = GetAliasLabel(Method3);
passwordLabel1.Text = Strings.Password;
passwordLabel2.Text = Strings.Password;
passwordLabel3.Text = Strings.Password;
okButton.Text = Strings.OkBtnText;
cancelButton.Text = Strings.CancelBtnText;
}
string GetAliasLabel(LoginMethod method)
{
switch (method)
{
default:
case LoginMethod.UserName: return Strings.User_name;
case LoginMethod.FullName: return Strings.Full_name;
case LoginMethod.Number: return Strings.User_code;
}
}
/// <summary>
/// Try to authorize the user when OK clicked.
/// </summary>
private void okButton_Click(object sender, EventArgs e)
{
User tempUser;
if (authorizedUser1 == null)
{
if (string.IsNullOrEmpty(userNameTextBox1.Text) || string.IsNullOrEmpty(passwordTextBox1.Text))
{
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox1.Text, passwordTextBox1.Text, Method1)) != null)
{
authorizedUser1 = tempUser;
loginStatePictureBox1.Image = Properties.Resources.accepted;
}
else
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.rejected;
}
}
if (authorizedUser2 == null)
{
if (string.IsNullOrEmpty(userNameTextBox2.Text) || string.IsNullOrEmpty(passwordTextBox2.Text))
{
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox2.Text, passwordTextBox2.Text, Method2)) != null)
{
authorizedUser2 = tempUser;
loginStatePictureBox2.Image = Properties.Resources.accepted;
}
else
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.rejected;
}
}
if (authorizedUser3 == null)
{
if (string.IsNullOrEmpty(userNameTextBox3.Text) || string.IsNullOrEmpty(passwordTextBox3.Text))
{
loginStatePictureBox3.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox3.Text, passwordTextBox3.Text, Method3)) != null)
{
authorizedUser3 = tempUser;
loginStatePictureBox3.Image = Properties.Resources.accepted;
}
else
{
authorizedUser3 = null;
loginStatePictureBox3.Image = Properties.Resources.rejected;
}
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
DialogResult = DialogResult.None;
return;
}
User TryAuthorize(string user, string password, LoginMethod method)
{
if (Common.Utils.IsPowerUser(user, password))
{
return new User(user, 6, true);
}
User loadedUser = null;
bool authorized = false;
if (!noDatabase)
{
DBSettings db = GlobalData.LocalUsersDB;
loadedUser = User.LoadUserByName(user, db);
if (loadedUser != null)
{
switch (method)
{
default:
case LoginMethod.UserName:
authorized = loadedUser.Authorize(user, password, requiredGroupMembership);
break;
case LoginMethod.FullName:
authorized = loadedUser.AuthorizeFullName(user, password, requiredGroupMembership);
break;
case LoginMethod.Number:
int number;
if (!int.TryParse(user, out number)) break;
authorized = loadedUser.AuthorizeNumber(number, password, requiredGroupMembership);
break;
}
}
}
return authorized ? loadedUser : null;
}
/// <summary>
/// Cancel clicked, do not try to authorize.
/// </summary>
private void cancelButton_Click(object sender, EventArgs e)
{
if (requiredGroupMembership == null)
{
Entities.User.Unauthorize();
}
DialogResult = DialogResult.Cancel;
Close();
return;
}
private void aliasLabel1_Click(object sender, EventArgs e)
{
if (++Method1 == LoginMethod.Count) Method1 = 0;
aliasLabel1.Text = GetAliasLabel(Method1);
}
private void aliasLabel2_Click(object sender, EventArgs e)
{
if (++Method2 == LoginMethod.Count) Method2 = 0;
aliasLabel2.Text = GetAliasLabel(Method2);
}
private void aliasLabel3_Click(object sender, EventArgs e)
{
if (++Method3 == LoginMethod.Count) Method3 = 0;
aliasLabel3.Text = GetAliasLabel(Method3);
}
void OnCardInserted(object sender, CardInsertedEventArgs args)
{
BackColor = Color.Green;
card.Connect(smartCardReader, SHARE.Shared, PROTOCOL.T0orT1);
/// Read the serial number of the card
APDUResponse response = card.Transmit(new APDUCommand(0xFF, 0xCA, 0x00, 0x00, null, 7));
string tag = response.ToString();
card.Disconnect(DISCONNECT.Leave);
bool authorized = false;
DBSettings db = GlobalData.LocalUsersDB;
IUser oriUser = GlobalData.CurrentUser;
User loadedUser = User.LoadUserByTag(tag, db);
if (loadedUser != null)
{
authorized = loadedUser.AuthorizeTag(tag, requiredGroupMembership);
}
if (ActiveControl == userNameTextBox1 || ActiveControl == passwordTextBox1)
{
if (authorized)
{
userNameTextBox1.Text = loadedUser.UserName;
passwordTextBox1.Text = string.Empty;
authorizedUser1 = loadedUser;
loginStatePictureBox1.Image = Properties.Resources.accepted;
userNameTextBox2.Focus();
}
else
{
userNameTextBox1.Text = string.Empty;
passwordTextBox1.Text = string.Empty;
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.rejected;
}
}
else if (ActiveControl == userNameTextBox2 || ActiveControl == passwordTextBox2)
{
if (authorized)
{
userNameTextBox2.Text = loadedUser.UserName;
passwordTextBox2.Text = string.Empty;
authorizedUser2 = loadedUser;
loginStatePictureBox2.Image = Properties.Resources.accepted;
userNameTextBox3.Focus();
}
else
{
userNameTextBox2.Text = string.Empty;
passwordTextBox2.Text = string.Empty;
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.rejected;
}
}
else if (ActiveControl == userNameTextBox3 || ActiveControl == passwordTextBox3)
{
if (authorized)
{
userNameTextBox3.Text = loadedUser.UserName;
passwordTextBox3.Text = string.Empty;
authorizedUser3 = loadedUser;
loginStatePictureBox3.Image = Properties.Resources.accepted;
userNameTextBox1.Focus();
}
else
{
userNameTextBox3.Text = string.Empty;
passwordTextBox3.Text = string.Empty;
authorizedUser3 = null;
loginStatePictureBox3.Image = Properties.Resources.rejected;
}
}
if (authorizedUser1 == null && !string.IsNullOrEmpty(userNameTextBox1.Text) && !string.IsNullOrEmpty(passwordTextBox1.Text))
{
authorizedUser1 = TryAuthorize(userNameTextBox1.Text, passwordTextBox1.Text, Method1);
loginStatePictureBox1.Image = (authorizedUser1 != null) ? Properties.Resources.accepted : Properties.Resources.rejected;
}
if (authorizedUser2 == null && !string.IsNullOrEmpty(userNameTextBox2.Text) && !string.IsNullOrEmpty(passwordTextBox2.Text))
{
authorizedUser2 = TryAuthorize(userNameTextBox2.Text, passwordTextBox2.Text, Method2);
loginStatePictureBox2.Image = (authorizedUser2 != null) ? Properties.Resources.accepted : Properties.Resources.rejected;
}
if (authorizedUser3 == null && !string.IsNullOrEmpty(userNameTextBox3.Text) && !string.IsNullOrEmpty(passwordTextBox3.Text))
{
authorizedUser3 = TryAuthorize(userNameTextBox3.Text, passwordTextBox3.Text, Method3);
loginStatePictureBox3.Image = (authorizedUser3 != null) ? Properties.Resources.accepted : Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
//MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
DialogResult = DialogResult.None;
return;
}
void OnCardRemoved(object sender, CardRemovedEventArgs args)
{
BackColor = oriBackColor;
}
private void LoginDlg_FormClosing(object sender, FormClosingEventArgs e)
{
if (!string.IsNullOrEmpty(smartCardReader))
{
card.StopCardEvents();
}
}
///
/// 1st user / password TextBox processing
///
private void userNameTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
passwordTextBox1.Focus();
}
}
private void passwordTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
User tempUser;
if (string.IsNullOrEmpty(userNameTextBox1.Text) || string.IsNullOrEmpty(passwordTextBox1.Text))
{
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox1.Text, passwordTextBox1.Text, Method1)) != null)
{
authorizedUser1 = tempUser;
loginStatePictureBox1.Image = Properties.Resources.accepted;
}
else
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
userNameTextBox2.Focus();
}
}
private void userNameTextBox1_TextChanged(object sender, EventArgs e)
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
private void passwordTextBox1_TextChanged(object sender, EventArgs e)
{
authorizedUser1 = null;
loginStatePictureBox1.Image = Properties.Resources.questionMark;
}
///
/// 2nd user / password TextBox processing
///
private void userNameTextBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
passwordTextBox2.Focus();
}
}
private void passwordTextBox2_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
User tempUser;
if (string.IsNullOrEmpty(userNameTextBox2.Text) || string.IsNullOrEmpty(passwordTextBox2.Text))
{
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox2.Text, passwordTextBox2.Text, Method2)) != null)
{
authorizedUser2 = tempUser;
loginStatePictureBox2.Image = Properties.Resources.accepted;
}
else
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
userNameTextBox3.Focus();
}
}
private void userNameTextBox2_TextChanged(object sender, EventArgs e)
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
private void passwordTextBox2_TextChanged(object sender, EventArgs e)
{
authorizedUser2 = null;
loginStatePictureBox2.Image = Properties.Resources.questionMark;
}
///
/// 3rd user / password TextBox processing
///
private void userNameTextBox3_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
passwordTextBox3.Focus();
}
}
private void passwordTextBox3_KeyPress(object sender, KeyPressEventArgs e)
{
if (Convert.ToInt32(e.KeyChar) == 13)
{
User tempUser;
if (string.IsNullOrEmpty(userNameTextBox3.Text) || string.IsNullOrEmpty(passwordTextBox3.Text))
{
loginStatePictureBox3.Image = Properties.Resources.questionMark;
}
else if ((tempUser = TryAuthorize(userNameTextBox3.Text, passwordTextBox3.Text, Method3)) != null)
{
authorizedUser3 = tempUser;
loginStatePictureBox3.Image = Properties.Resources.accepted;
}
else
{
authorizedUser3 = null;
loginStatePictureBox3.Image = Properties.Resources.rejected;
}
if (AreAllUsersKnown())
{
PrepareClosingDlg();
return;
}
userNameTextBox1.Focus();
}
}
private void userNameTextBox3_TextChanged(object sender, EventArgs e)
{
authorizedUser3 = null;
loginStatePictureBox3.Image = Properties.Resources.questionMark;
}
private void passwordTextBox3_TextChanged(object sender, EventArgs e)
{
authorizedUser3 = null;
loginStatePictureBox3.Image = Properties.Resources.questionMark;
}
/// <summary>
/// Returns true when all 3 users are already logged in
/// </summary>
bool AreAllUsersKnown()
{
return (authorizedUser1 != null) && (authorizedUser2 != null) && (authorizedUser3 != null);
}
/// <summary>
/// Actions before closing this dialog on successful login of all users
/// </summary>
void PrepareClosingDlg()
{
GlobalData.CurrentUser = authorizedUser1;
GlobalData.CurrentUser2 = authorizedUser2;
GlobalData.CurrentUser3 = authorizedUser3;
DialogResult = DialogResult.OK;
Close();
}
}
}

View File

@ -0,0 +1,720 @@
<?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="aliasLabel1.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="aliasLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 26</value>
</data>
<data name="aliasLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="aliasLabel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="aliasLabel1.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;aliasLabel1.Name" xml:space="preserve">
<value>aliasLabel1</value>
</data>
<data name="&gt;&gt;aliasLabel1.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;aliasLabel1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;aliasLabel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="passwordLabel1.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="passwordLabel1.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 53</value>
</data>
<data name="passwordLabel1.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="passwordLabel1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="passwordLabel1.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;passwordLabel1.Name" xml:space="preserve">
<value>passwordLabel1</value>
</data>
<data name="&gt;&gt;passwordLabel1.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;passwordLabel1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;passwordLabel1.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="passwordTextBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 50</value>
</data>
<data name="passwordTextBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox1.Name" xml:space="preserve">
<value>passwordTextBox1</value>
</data>
<data name="&gt;&gt;passwordTextBox1.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;passwordTextBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;passwordTextBox1.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="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>405, 62</value>
</data>
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 37</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>4</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>405, 16</value>
</data>
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
<value>105, 37</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>3</value>
</data>
<data name="userNameTextBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 24</value>
</data>
<data name="userNameTextBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox1.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;userNameTextBox1.Name" xml:space="preserve">
<value>userNameTextBox1</value>
</data>
<data name="&gt;&gt;userNameTextBox1.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;userNameTextBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;userNameTextBox1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Name" xml:space="preserve">
<value>loginStatePictureBox1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="workplaceGroupBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 12</value>
</data>
<data name="workplaceGroupBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 86</value>
</data>
<data name="workplaceGroupBox1.TabIndex" type="System.Int32, mscorlib">
<value>6</value>
</data>
<data name="workplaceGroupBox1.Text" xml:space="preserve">
<value>Work place A</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.Name" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;workplaceGroupBox1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="loginStatePictureBox1.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="loginStatePictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<value>308, 26</value>
</data>
<data name="loginStatePictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="loginStatePictureBox1.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Name" xml:space="preserve">
<value>loginStatePictureBox1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.Parent" xml:space="preserve">
<value>workplaceGroupBox1</value>
</data>
<data name="&gt;&gt;loginStatePictureBox1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Name" xml:space="preserve">
<value>loginStatePictureBox2</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="&gt;&gt;userNameTextBox2.Name" xml:space="preserve">
<value>userNameTextBox2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.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;userNameTextBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="&gt;&gt;aliasLabel2.Name" xml:space="preserve">
<value>aliasLabel2</value>
</data>
<data name="&gt;&gt;aliasLabel2.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;aliasLabel2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;aliasLabel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;passwordLabel2.Name" xml:space="preserve">
<value>passwordLabel2</value>
</data>
<data name="&gt;&gt;passwordLabel2.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;passwordLabel2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;passwordLabel2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox2.Name" xml:space="preserve">
<value>passwordTextBox2</value>
</data>
<data name="&gt;&gt;passwordTextBox2.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;passwordTextBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;passwordTextBox2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="workplaceGroupBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 106</value>
</data>
<data name="workplaceGroupBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 86</value>
</data>
<data name="workplaceGroupBox2.TabIndex" type="System.Int32, mscorlib">
<value>7</value>
</data>
<data name="workplaceGroupBox2.Text" xml:space="preserve">
<value>Work place B</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.Name" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;workplaceGroupBox2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="loginStatePictureBox2.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="loginStatePictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="loginStatePictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>308, 26</value>
</data>
<data name="loginStatePictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="loginStatePictureBox2.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Name" xml:space="preserve">
<value>loginStatePictureBox2</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;loginStatePictureBox2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="userNameTextBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 24</value>
</data>
<data name="userNameTextBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.Name" xml:space="preserve">
<value>userNameTextBox2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.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;userNameTextBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;userNameTextBox2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="aliasLabel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="aliasLabel2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="aliasLabel2.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 26</value>
</data>
<data name="aliasLabel2.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="aliasLabel2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="aliasLabel2.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;aliasLabel2.Name" xml:space="preserve">
<value>aliasLabel2</value>
</data>
<data name="&gt;&gt;aliasLabel2.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;aliasLabel2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;aliasLabel2.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="passwordLabel2.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="passwordLabel2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="passwordLabel2.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 53</value>
</data>
<data name="passwordLabel2.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="passwordLabel2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="passwordLabel2.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;passwordLabel2.Name" xml:space="preserve">
<value>passwordLabel2</value>
</data>
<data name="&gt;&gt;passwordLabel2.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;passwordLabel2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;passwordLabel2.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="passwordTextBox2.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 50</value>
</data>
<data name="passwordTextBox2.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox2.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox2.Name" xml:space="preserve">
<value>passwordTextBox2</value>
</data>
<data name="&gt;&gt;passwordTextBox2.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;passwordTextBox2.Parent" xml:space="preserve">
<value>workplaceGroupBox2</value>
</data>
<data name="&gt;&gt;passwordTextBox2.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="loginStatePictureBox3.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
<value>Top, Right</value>
</data>
<data name="loginStatePictureBox3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="loginStatePictureBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>308, 26</value>
</data>
<data name="loginStatePictureBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="loginStatePictureBox3.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;loginStatePictureBox3.Name" xml:space="preserve">
<value>loginStatePictureBox3</value>
</data>
<data name="&gt;&gt;loginStatePictureBox3.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;loginStatePictureBox3.Parent" xml:space="preserve">
<value>workplaceGroupBox3</value>
</data>
<data name="&gt;&gt;loginStatePictureBox3.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="userNameTextBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 24</value>
</data>
<data name="userNameTextBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="userNameTextBox3.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;userNameTextBox3.Name" xml:space="preserve">
<value>userNameTextBox3</value>
</data>
<data name="&gt;&gt;userNameTextBox3.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;userNameTextBox3.Parent" xml:space="preserve">
<value>workplaceGroupBox3</value>
</data>
<data name="&gt;&gt;userNameTextBox3.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="aliasLabel3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="aliasLabel3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="aliasLabel3.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 26</value>
</data>
<data name="aliasLabel3.Size" type="System.Drawing.Size, System.Drawing">
<value>58, 13</value>
</data>
<data name="aliasLabel3.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="aliasLabel3.Text" xml:space="preserve">
<value>User name</value>
</data>
<data name="&gt;&gt;aliasLabel3.Name" xml:space="preserve">
<value>aliasLabel3</value>
</data>
<data name="&gt;&gt;aliasLabel3.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;aliasLabel3.Parent" xml:space="preserve">
<value>workplaceGroupBox3</value>
</data>
<data name="&gt;&gt;aliasLabel3.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="passwordLabel3.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="passwordLabel3.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="passwordLabel3.Location" type="System.Drawing.Point, System.Drawing">
<value>28, 53</value>
</data>
<data name="passwordLabel3.Size" type="System.Drawing.Size, System.Drawing">
<value>53, 13</value>
</data>
<data name="passwordLabel3.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="passwordLabel3.Text" xml:space="preserve">
<value>Password</value>
</data>
<data name="&gt;&gt;passwordLabel3.Name" xml:space="preserve">
<value>passwordLabel3</value>
</data>
<data name="&gt;&gt;passwordLabel3.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;passwordLabel3.Parent" xml:space="preserve">
<value>workplaceGroupBox3</value>
</data>
<data name="&gt;&gt;passwordLabel3.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="passwordTextBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>115, 50</value>
</data>
<data name="passwordTextBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>168, 20</value>
</data>
<data name="passwordTextBox3.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;passwordTextBox3.Name" xml:space="preserve">
<value>passwordTextBox3</value>
</data>
<data name="&gt;&gt;passwordTextBox3.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;passwordTextBox3.Parent" xml:space="preserve">
<value>workplaceGroupBox3</value>
</data>
<data name="&gt;&gt;passwordTextBox3.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="workplaceGroupBox3.Location" type="System.Drawing.Point, System.Drawing">
<value>12, 198</value>
</data>
<data name="workplaceGroupBox3.Size" type="System.Drawing.Size, System.Drawing">
<value>370, 86</value>
</data>
<data name="workplaceGroupBox3.TabIndex" type="System.Int32, mscorlib">
<value>8</value>
</data>
<data name="workplaceGroupBox3.Text" xml:space="preserve">
<value>Work place C</value>
</data>
<data name="&gt;&gt;workplaceGroupBox3.Name" xml:space="preserve">
<value>workplaceGroupBox3</value>
</data>
<data name="&gt;&gt;workplaceGroupBox3.Type" xml:space="preserve">
<value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;workplaceGroupBox3.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;workplaceGroupBox3.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>525, 298</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>TripleLoginDlg</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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -0,0 +1,93 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SharedDatabase.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SharedDatabase.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap accepted {
get {
object obj = ResourceManager.GetObject("accepted", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap questionMark {
get {
object obj = ResourceManager.GetObject("questionMark", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap rejected {
get {
object obj = ResourceManager.GetObject("rejected", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,130 @@
<?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="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="accepted" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\accepted.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="questionMark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\questionMark.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="rejected" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Pictures\rejected.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -78,6 +78,12 @@
<Compile Include="Entities\Workstep.cs" />
<Compile Include="Enums.cs" />
<Compile Include="EventsDB.cs" />
<Compile Include="Forms\DoubleLoginDlg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\DoubleLoginDlg.designer.cs">
<DependentUpon>DoubleLoginDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\EditSelectedUser.cs">
<SubType>Form</SubType>
</Compile>
@ -96,6 +102,12 @@
<Compile Include="Forms\PasswordChangeDlg.designer.cs">
<DependentUpon>PasswordChangeDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\TripleLoginDlg.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\TripleLoginDlg.designer.cs">
<DependentUpon>TripleLoginDlg.cs</DependentUpon>
</Compile>
<Compile Include="Forms\UserManagementDlg.cs">
<SubType>Form</SubType>
</Compile>
@ -130,6 +142,11 @@
<Compile Include="Output\Table.cs" />
<Compile Include="Output\WMChart.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Resources\Strings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
@ -157,8 +174,10 @@
<Name>GemCard</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Forms\DoubleLoginDlg.resx">
<DependentUpon>DoubleLoginDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\EditSelectedUser.resx">
<DependentUpon>EditSelectedUser.cs</DependentUpon>
</EmbeddedResource>
@ -168,9 +187,17 @@
<EmbeddedResource Include="Forms\PasswordChangeDlg.resx">
<DependentUpon>PasswordChangeDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\TripleLoginDlg.resx">
<DependentUpon>TripleLoginDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\UserManagementDlg.resx">
<DependentUpon>UserManagementDlg.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.cs.resx" />
<EmbeddedResource Include="Resources\Strings.de.resx" />
<EmbeddedResource Include="Resources\Strings.resx">
@ -179,6 +206,11 @@
</EmbeddedResource>
<EmbeddedResource Include="Resources\Strings.zh-CN.resx" />
</ItemGroup>
<ItemGroup>
<None Include="Pictures\accepted.bmp" />
<None Include="Pictures\questionMark.bmp" />
<None Include="Pictures\rejected.bmp" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.