private void PassworConfirm_TextChanged(object sender, EventArgs e)
{
#region パラメータチェック
if (sender == null)
{
return;
}
if (PasswordTextBox == null
|| PasswordConfirmTextBox == null)
{
return;
}
if(string.IsNullOrEmpty(PasswordTextBox.Text))
{ // check a null.
PasswordConfirmTextBox.BackColor = System.Drawing.Color.LightPink;
PasswordAgrees = false;
return;
}
if (string.IsNullOrEmpty(PasswordConfirmTextBox.Text))
{ // check a null.
PasswordConfirmTextBox.BackColor = System.Drawing.Color.LightPink;
PasswordAgrees = false;
return;
}
#endregion パラメータチェック
if (PasswordTextBox.Text == PasswordConfirmTextBox.Text)
{ // password matches confirm password.
PasswordConfirmTextBox.BackColor = System.Drawing.Color.Lime;
PasswordAgrees = true;
}
else
{ // password unmatched confirm password.
PasswordConfirmTextBox.BackColor = System.Drawing.Color.LightPink;
PasswordAgrees = false;
}
}
#endregion メソッド定義