private void RepeatPasswordBox_Leave(object sender, EventArgs e) { String original = PasswordBox.Text; String repeat = RepeatPasswordBox.Text; if (original != repeat) { PassRepeatWarningLabel.Show(); } else { PassRepeatWarningLabel.Hide(); } }
private void CancelButton_Click(object sender, EventArgs e) { NameBox.Text = ""; SurnameBox.Text = ""; FullNameShow.Text = ""; FullNameShow.Hide(); PasswordBox.Text = ""; RepeatPasswordBox.Text = ""; BirthdayPicker.Value.ToLocalTime(); SSNBox.Text = ""; EmailBox.Text = ""; CodeBox.Text = ""; NamewarningLabel.Hide(); SurnamewarningLabel.Hide(); BirthdaywarningLabel.Hide(); PassWarningLabel.Hide(); PassRepeatWarningLabel.Hide(); SSNwarningLabel.Hide(); EmailWarningLabel.Hide(); NameBox.Focus(); }