private void OKButton_Click(object sender, EventArgs e) { if (NPasswordTextBox1.Text != NPasswordTextBox2.Text) { MessageBox ib = new MessageBox(10); ib.ShowDialog(); ib.Dispose(); NPasswordTextBox1.Focus(); return; } var v = ClassBackEnd.ChangePassword(OPasswordTextBox.Text, NPasswordTextBox1.Text); if (v == 0) { MessageBox infoBox = new MessageBox(9); infoBox.ShowDialog(); infoBox.Dispose(); return; } else if (v == 1) { MessageBox infoBox = new MessageBox(3); infoBox.ShowDialog(); infoBox.Dispose(); Close(); } else if (v == 2) { MessageBox infoBox = new MessageBox(15); infoBox.ShowDialog(); infoBox.Dispose(); return; } }
private void NPasswordCueText1_Click(object sender, EventArgs e) { if (NPasswordTextBox1.Text == "") { NPasswordCueText1.Hide(); NPasswordTextBox1.Focus(); } }