private void OkButton_Click(object sender, EventArgs e)
{
// check data.
if (string.IsNullOrEmpty(NewPassword))
{
MessageBox.Show(this
, "A password is not input. Please input a password again."
, "Exclamation"
, MessageBoxButtons.OK
, MessageBoxIcon.Exclamation);
userPasswordControl1.PasswordConfirm = string.Empty;
return;
}
if (!userPasswordControl1.PasswordAgrees)
{
MessageBox.Show(this
, "A password does not accord. Please input a password for confirmation again."
, "Exclamation"
, MessageBoxButtons.OK
, MessageBoxIcon.Exclamation);
userPasswordControl1.PasswordConfirm = string.Empty;
return;
}
DialogResult = DialogResult.OK;
return;
}