private void buttonCreateTeamsManual_Click(object sender, EventArgs e) { updateCheckedHumanPlayers(); core.MatchType = comboBoxMatchType.Text; try { core.checkMatch(); TeamForm teamForm = new TeamForm(this); teamForm.Show(); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); return; } }
private void buttonAuto_Click(object sender, EventArgs e) { updateCheckedHumanPlayers(); core.MatchType = comboBoxMatchType.Text; buttonValidate.Enabled = false; if (policy == Constants.MatchPolicy.Manual) { try { core.checkMatch(); TeamForm teamForm = new TeamForm(this); teamForm.Show(); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); return; } } else { try { core.computeMatchmaking(policy); printTeams(); selectTeams(); comboBoxWinningTeam.Text = "Select the Winning Team"; comboBoxWinningTeam.Enabled = true; } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); return; } } }