/// <summary> /// Initializes a new instance of the <see cref="FrmPasswordRecovery"/> class using the given clients. /// </summary> /// <param name="clients">The clients used for the password recovery form.</param> public FrmPasswordRecovery(Client[] clients) { _clients = clients; _recoveryHandler = new PasswordRecoveryHandler(clients); RegisterMessageHandler(); InitializeComponent(); }
private void requestBtn_Click(object sender, EventArgs e) { PasswordRecoveryHandler passwordRecoveryHandler = new PasswordRecoveryHandler(usernameTextBox.Text, emailTextBox.Text); bool accExists = false; accExists = passwordRecoveryHandler.checkAccount(); if (accExists) { requestBtn.BackColor = Color.Green; requestBtn.Text = "OK"; oldPasswordTextBox.Visible = true; newpasswordTextBox.Visible = true; changePasswordBtn.Visible = true; label3.Visible = true; label4.Visible = true; } else { MessageBox.Show("Username and email don't match!"); } }