private void CreateButton_Click(object sender, EventArgs e)
{
// check date.
if (string.IsNullOrEmpty(UserName))
{
MessageBox.Show(this
, "A user name is not input. Please input a user name again."
, "Exclamation"
, MessageBoxButtons.OK
, MessageBoxIcon.Exclamation);
return;
}
if (string.IsNullOrEmpty(Password))
{
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;
}
// closer a From.
if (Owner != null)
{
Owner.DialogResult = DialogResult.OK;
Owner.Close();
}
}