private void buttonValidate_Click(object sender, EventArgs e) { string key = textBoxKey.Text; try { ctr.validation(email, key); ChooseEdition chooseEdition = new ChooseEdition(ctr); chooseEdition.Show(); this.Hide(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void LoginButton_Click(object sender, EventArgs e) { try { ctr.Login( UsernameTextbox.Text, PasswordTextbox.Text, roleComboBox.Text ); this.Hide(); ChooseEdition chooseEditionWin = new ChooseEdition(ctr); chooseEditionWin.Show(); } catch (DataException ex) { MessageBox.Show(ex.Message, "Can't log you in!", MessageBoxButtons.OK); } }
public ControlPanel(MainClientController ctrl, ChooseEdition sender) { InitializeComponent(); ctr = ctrl; this.sender = sender; }