diff --git a/TestBenchFramework/Forms/EditSelectedUser.Designer.cs b/TestBenchFramework/Forms/EditSelectedUser.Designer.cs index dfc7a25c0..88b825077 100644 --- a/TestBenchFramework/Forms/EditSelectedUser.Designer.cs +++ b/TestBenchFramework/Forms/EditSelectedUser.Designer.cs @@ -44,6 +44,8 @@ namespace TBF.Forms this.checkedListBoxGroups = new System.Windows.Forms.CheckedListBox(); this.groupsLabel = new System.Windows.Forms.Label(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.repeatPasswordLabel = new System.Windows.Forms.Label(); + this.txtRepeatPassword = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // txtName @@ -109,10 +111,22 @@ namespace TBF.Forms resources.ApplyResources(this.groupsLabel, "groupsLabel"); this.groupsLabel.Name = "groupsLabel"; // + // repeatPasswordLabel + // + resources.ApplyResources(this.repeatPasswordLabel, "repeatPasswordLabel"); + this.repeatPasswordLabel.Name = "repeatPasswordLabel"; + // + // txtRepeatPassword + // + resources.ApplyResources(this.txtRepeatPassword, "txtRepeatPassword"); + this.txtRepeatPassword.Name = "txtRepeatPassword"; + // // EditSelectedUser // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.repeatPasswordLabel); + this.Controls.Add(this.txtRepeatPassword); this.Controls.Add(this.groupsLabel); this.Controls.Add(this.checkedListBoxGroups); this.Controls.Add(this.btnCancel); @@ -144,5 +158,7 @@ namespace TBF.Forms private System.Windows.Forms.CheckedListBox checkedListBoxGroups; private System.Windows.Forms.Label groupsLabel; private System.Windows.Forms.ToolTip toolTip1; + private System.Windows.Forms.Label repeatPasswordLabel; + private System.Windows.Forms.TextBox txtRepeatPassword; } } \ No newline at end of file diff --git a/TestBenchFramework/Forms/EditSelectedUser.cs b/TestBenchFramework/Forms/EditSelectedUser.cs index 720b52fd2..13e54b6ff 100644 --- a/TestBenchFramework/Forms/EditSelectedUser.cs +++ b/TestBenchFramework/Forms/EditSelectedUser.cs @@ -30,6 +30,7 @@ namespace TBF.Forms txtName.Text = CurrentEditUser.UserName; txtDescription.Text = CurrentEditUser.FullName; txtPassword.Text = ""; + txtRepeatPassword.Text = ""; ShowGroups(); } @@ -38,6 +39,7 @@ namespace TBF.Forms Text = Strings.Edit_User; nameLabel.Text = Strings.Name; passwordLabel.Text = Strings.Password; + repeatPasswordLabel.Text = Strings.Repeat_password; descriptionLabel.Text = Strings.DescriptionColHdr; groupsLabel.Text = Strings.Groups; btnOk.Text = Strings.OkBtnText; @@ -79,12 +81,20 @@ namespace TBF.Forms } - CurrentEditUser.UserName = txtName.Text; + if (txtPassword.Text != "") + { + if (txtPassword.Text != txtRepeatPassword.Text) + { + MessageBox.Show(Strings.Passwords_different); + return false; + } + else + { + CurrentEditUser.SetPassword(txtPassword.Text); + } + } - if (txtPassword.Text != "") - { - CurrentEditUser.SetPassword(txtPassword.Text); - } + CurrentEditUser.UserName = txtName.Text; CurrentEditUser.FullName = txtDescription.Text; // Groups diff --git a/TestBenchFramework/Forms/EditSelectedUser.resx b/TestBenchFramework/Forms/EditSelectedUser.resx index 0c006e262..458a45e79 100644 --- a/TestBenchFramework/Forms/EditSelectedUser.resx +++ b/TestBenchFramework/Forms/EditSelectedUser.resx @@ -119,14 +119,14 @@ - 75, 9 + 137, 9 200, 20 - 0 + 1 txtName @@ -138,7 +138,7 @@ $this - 9 + 11 True @@ -150,7 +150,7 @@ 35, 13 - 1 + 0 Name @@ -165,16 +165,16 @@ $this - 6 + 8 - 75, 252 + 137, 270 - 75, 23 + 84, 40 - 3 + 10 OK @@ -189,16 +189,16 @@ $this - 3 + 5 - 200, 252 + 253, 270 - 75, 23 + 84, 40 - 3 + 11 Cancel @@ -213,10 +213,10 @@ $this - 2 + 4 - 75, 40 + 137, 40 * @@ -225,7 +225,7 @@ 200, 20 - 0 + 3 txtPassword @@ -237,7 +237,7 @@ $this - 8 + 10 True @@ -249,7 +249,7 @@ 53, 13 - 1 + 2 Password @@ -264,10 +264,10 @@ $this - 5 + 7 - 75, 70 + 137, 99 True @@ -276,7 +276,7 @@ 200, 59 - 0 + 7 txtDescription @@ -288,19 +288,19 @@ $this - 7 + 9 True - 9, 73 + 9, 102 60, 13 - 1 + 6 Description @@ -315,16 +315,16 @@ $this - 4 + 6 - 75, 135 + 137, 164 200, 94 - 4 + 9 checkedListBoxGroups @@ -336,19 +336,19 @@ $this - 1 + 3 True - 9, 135 + 9, 164 41, 13 - 5 + 8 Groups @@ -363,11 +363,66 @@ $this - 0 + 2 17, 17 + + True + + + + NoControl + + + 9, 69 + + + 90, 13 + + + 4 + + + Repeat password + + + repeatPasswordLabel + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 137, 66 + + + * + + + 200, 20 + + + 5 + + + txtRepeatPassword + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + True @@ -375,7 +430,7 @@ 6, 13 - 318, 287 + 375, 319 Edit User diff --git a/TestBenchFramework/Resources/Strings.Designer.cs b/TestBenchFramework/Resources/Strings.Designer.cs index 638ff9694..7478bcaaf 100644 --- a/TestBenchFramework/Resources/Strings.Designer.cs +++ b/TestBenchFramework/Resources/Strings.Designer.cs @@ -2463,6 +2463,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Fields 'Password' and 'Repeat password' are different. Retype them please.. + /// + internal static string Passwords_different { + get { + return ResourceManager.GetString("Passwords_different", resourceCulture); + } + } + /// /// Looks up a localized string similar to Paths. /// @@ -3246,6 +3255,15 @@ namespace TBF.Resources { } } + /// + /// Looks up a localized string similar to Repeat password. + /// + internal static string Repeat_password { + get { + return ResourceManager.GetString("Repeat_password", resourceCulture); + } + } + /// /// Looks up a localized string similar to Repeats nr.. /// diff --git a/TestBenchFramework/Resources/Strings.de.resx b/TestBenchFramework/Resources/Strings.de.resx index 57e4364d4..4228201db 100644 --- a/TestBenchFramework/Resources/Strings.de.resx +++ b/TestBenchFramework/Resources/Strings.de.resx @@ -1407,4 +1407,10 @@ Prüfpunktvolumen uberschritt Behalter + + Passwort wiederholen + + + Felder 'Password' und 'Passwort wiederholen' sind anders, wiederholen sie bitte. + \ No newline at end of file diff --git a/TestBenchFramework/Resources/Strings.resx b/TestBenchFramework/Resources/Strings.resx index b476318df..ec0bb3703 100644 --- a/TestBenchFramework/Resources/Strings.resx +++ b/TestBenchFramework/Resources/Strings.resx @@ -1684,4 +1684,10 @@ Test volume exceeds the scale capacity + + Repeat password + + + Fields 'Password' and 'Repeat password' are different. Retype them please. + \ No newline at end of file