Пример #1
0
        /// <summary>
        /// Event delegate method fired when the <see cref="PasswordTextBox"/> is validated.
        /// </summary>
        /// <param name="sender">Sender object.</param>
        /// <param name="e">Event arguments.</param>
        private void PasswordTextBoxValidated(object sender, EventArgs e)
        {
            if (sender == null)
            {
                return;
            }

            TextBox passwordTextBox = sender as TextBox;

            if (passwordTextBox == null)
            {
                return;
            }

            PasswordChangedTimer.Stop();
            passwordTextBox.Text   = passwordTextBox.Text.Trim();
            DialogOKButton.Enabled = PasswordTextBox.TextLength > 0 && (!PasswordExpiredDialog || NewPasswordTextBox.TextLength > 0 && ConfirmTextBox.TextLength > 0);
        }
Пример #2
0
 /// <summary>
 /// Event delegate method fired when the <see cref="PasswordTextBox"/> text changes.
 /// </summary>
 /// <param name="sender">Sender object.</param>
 /// <param name="e">Event arguments.</param>
 private void PasswordTextBoxTextChanged(object sender, EventArgs e)
 {
     PasswordChangedTimer.Stop();
     PasswordChangedTimer.Start();
 }