private void deleteButtonClick(object sender, EventArgs e) { MPAiUser user = userButtonMap[(MPAiButton)sender]; if (MPAiMessageBoxFactory.Show("Are you sure you want to delete " + user.GetCorrectlyCapitalisedName() + "'s account?", MPAiMessageBoxButtons.YesNoCancel).Equals(DialogResult.Yes)) { UserManagement.RemoveUser(user); generatedUserTable = generateUserTable(); this.Close(); new AdministratorConsole().ShowDialog(); Console.WriteLine("delete " + user.GetCorrectlyCapitalisedName()); } UserManagement.WriteSettings(); }
private void resetButtonClick(object sender, EventArgs e) { MPAiUser user = userButtonMap[(MPAiButton)sender]; ConfirmRandomisedPassword dialog = new ConfirmRandomisedPassword(); user.UserPswd = dialog.ConfirmPassword(user.GetCorrectlyCapitalisedName(), user.UserPswd); UserManagement.WriteSettings(); }