diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT
index a3798853..8fadf373 100644
--- a/CHANGELOG.TXT
+++ b/CHANGELOG.TXT
@@ -1,3 +1,9 @@
+1.76.6 (2018-08-03):
+
+Fixes:
+------
+#1062: Entering correct password when starting app does not load connections file
+
1.76.5 (2018-08-02):
Fixes:
diff --git a/mRemoteV1/UI/Forms/PasswordForm.cs b/mRemoteV1/UI/Forms/PasswordForm.cs
index 1ecc251b..9aafa1db 100644
--- a/mRemoteV1/UI/Forms/PasswordForm.cs
+++ b/mRemoteV1/UI/Forms/PasswordForm.cs
@@ -11,15 +11,34 @@ namespace mRemoteNG.UI.Forms
private readonly string _passwordName;
private SecureString _password = new SecureString();
- private bool Verify { get; }
+ ///
+ /// Puts the dialog into the New Password mode. An extra
+ /// password box is shown which must match the first password
+ /// to continue.
+ ///
+ private bool NewPasswordMode { get; }
- public PasswordForm(string passwordName = null, bool verify = true)
+ ///
+ /// Creates a new password form for entering or setting a password.
+ ///
+ ///
+ ///
+ /// Puts the dialog into the New Password mode. An extra
+ /// password box is shown which must match the first password
+ /// to continue.
+ ///
+ public PasswordForm(string passwordName = null, bool newPasswordMode = true)
{
InitializeComponent();
_passwordName = passwordName;
- Verify = verify;
+ NewPasswordMode = newPasswordMode;
}
+ ///
+ /// Dispaly a dialog box requesting that the user
+ /// enter their password.
+ ///
+ ///
public Optional GetKey()
{
var dialog = ShowDialog();
@@ -33,7 +52,7 @@ namespace mRemoteNG.UI.Forms
{
ApplyLanguage();
- if (Verify) return;
+ if (NewPasswordMode) return;
Height = Height - (txtVerify.Top - txtPassword.Top);
lblVerify.Visible = false;
txtVerify.Visible = false;
@@ -44,7 +63,7 @@ namespace mRemoteNG.UI.Forms
_password = txtPassword.Text.ConvertToSecureString();
txtPassword.Text = "";
txtVerify.Text = "";
- if (Verify) return;
+ if (NewPasswordMode) return;
Height = Height + (txtVerify.Top - txtPassword.Top);
}
@@ -56,10 +75,10 @@ namespace mRemoteNG.UI.Forms
private void btnOK_Click(object sender, EventArgs e)
{
- if (Verify && VerifyPassword())
- DialogResult = DialogResult.OK;
- else
- DialogResult = DialogResult.None;
+ if (NewPasswordMode)
+ VerifyNewPassword();
+
+ DialogResult = DialogResult.OK;
}
private void txtPassword_TextChanged(object sender, EventArgs e)
@@ -79,7 +98,7 @@ namespace mRemoteNG.UI.Forms
btnOK.Text = Language.strButtonOK;
}
- private bool VerifyPassword()
+ private bool VerifyNewPassword()
{
if (txtPassword.Text.Length >= 3)
{