private void buttonSignUp_Click(object sender, EventArgs e) { NewUserWindow newUserWin = new NewUserWindow(); newUserWin.SetAllUsers(myUsers); newUserWin.ShowDialog(); MPAiUser candidate = newUserWin.getCandidate(); if (newUserWin.validRegistration()) { if (myUsers.CreateNewUser(candidate)) { MessageBox.Show("Registration successful! ", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); myUsers.WriteSettings(); VisualizeUser(candidate); } else { MessageBox.Show("Sorry, unknown error occurred! Please try again~ ", "Ooops", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } }
private void buttonSignUp_Click(object sender, EventArgs e) { NewUserWindow newUserWin = new NewUserWindow(); newUserWin.SetAllUsers(myUsers); newUserWin.ShowDialog(); MPAiUser candidate = newUserWin.getCandidate(); if (newUserWin.validRegistration()) { if (myUsers.CreateNewUser(candidate)) { MessageBox.Show("Registration successful! ", "Congratulations", MessageBoxButtons.OK, MessageBoxIcon.Information); myUsers.WriteSettings(); VisualizeUser(candidate); } else { MessageBox.Show("Sorry, unknown error occurred! Please try again~ ", "Ooops", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } } }