/* * Hint button handler * It will call the Hint form with the keyword for user to memorize the password */ private void hintBtn_Click(object sender, EventArgs e) { if (!String.IsNullOrWhiteSpace(this.passwordTxtBox.Text)) { Logger.Log("User [" + this.userLb.Text + "] used hint button"); //Use DisplayForm function to open only 1 form ReadWriteFiles.DisplayForm(ref hintForm); } }
/* * Practice button handler * It is used to call the practice form to practice the password as many time as they want * It will be refreshed by the Refresh button, so the password is always up to date. No need to close the form to refresh */ private void practiceBtn_Click(object sender, EventArgs e) { if (!String.IsNullOrWhiteSpace(this.passwordTxtBox.Text)) { Logger.Log("User [" + this.userLb.Text + "] used practice form for password [" + Model.Password + "] and keyword [" + Model.KeyWord + "]"); //Use DisplayForm function to open only 1 form ReadWriteFiles.DisplayForm(ref practiceForm); } }
//Login button for the part 3 private void loginMassBtn_Click(object sender, EventArgs e) { Logger.Log("User chose to login 3 passwords (part 3)", 3); ReadWriteFiles.DisplayForm(ref loginManyForm); }
//Create password button for the part 3 private void createMassBtn_Click(object sender, EventArgs e) { Logger.Log("User chose to create 3 passwords (part 3)", 3); ReadWriteFiles.DisplayForm(ref generateManyForm); }
//Login button for the part 2 private void loginBtn_Click(object sender, EventArgs e) { Logger.Log("User chose to login single password (part 2)", 3); ReadWriteFiles.DisplayForm <LoginForm>(ref loginForm); }
//Create password button for the part 2 private void createPasswordBtn_Click(object sender, EventArgs e) { Logger.Log("User chose to create single password (part 2)", 3); ReadWriteFiles.DisplayForm(ref generateForm); }