private void handle(ATCLoginResult result) { if (result.isSuccessfull) { WelcomeScreen ws = new WelcomeScreen(result.atc); ws.Show(); } else { MessageBox.Show(result.error); } }
private void enableBtn_Click(object sender, EventArgs e) { if (nameTextBox.Text == "Enter ATC Name") { MessageBox.Show("Please enter ATC Name"); } else { ATCLoginResult result = ATCService.shared.Enable(nameTextBox.Text, idTextBox.Text == "Automatic ID" ? null : idTextBox.Text); if (result.isSuccessfull) { WelcomeScreen ws = new WelcomeScreen(result.atc); ws.Show(); this.Close(); } else { MessageBox.Show(result.error); } } }