public TeamForm(MainForm mainForm) { InitializeComponent(); this.mainForm = mainForm; this.teams = new List<Team>(); for (int i=0; i < mainForm.Core.getExpectedTeamNumber(); i++) { teams.Add(new Team()); } foreach (var item in mainForm.Core.CheckedHumanPlayers.Values) { listBox1.Items.Add(item); } radioButtonTerran.Checked = false; radioButtonTerran.Enabled = false; radioButtonZerg.Checked = false; radioButtonZerg.Enabled = false; radioButtonProtoss.Checked = false; radioButtonProtoss.Enabled = false; radioButtonRandom.Checked = false; radioButtonRandom.Enabled = false; numericUpDownTeam.Minimum = 1; numericUpDownTeam.Maximum = mainForm.Core.getExpectedTeamNumber(); listBox1.Sorted = true; listBox2.Sorted = true; checkTeams(); checkLists(); }
public PlayerForm(MainForm mainForm) { this.mainForm=mainForm; InitializeComponent(); Text = "Add Player"; comboBoxTerran.Items.Add(Constants.Unranked); comboBoxTerran.Items.Add(Constants.Bronze); comboBoxTerran.Items.Add(Constants.Silver); comboBoxTerran.Items.Add(Constants.Gold); comboBoxTerran.Items.Add(Constants.Platine); comboBoxTerran.Items.Add(Constants.Diamond); comboBoxTerran.Items.Add(Constants.Master); comboBoxTerran.Items.Add(Constants.GrandMaster); comboBoxTerran.SelectedIndex = 0; comboBoxZerg.Items.Add(Constants.Unranked); comboBoxZerg.Items.Add(Constants.Bronze); comboBoxZerg.Items.Add(Constants.Silver); comboBoxZerg.Items.Add(Constants.Gold); comboBoxZerg.Items.Add(Constants.Platine); comboBoxZerg.Items.Add(Constants.Diamond); comboBoxZerg.Items.Add(Constants.Master); comboBoxZerg.Items.Add(Constants.GrandMaster); comboBoxZerg.SelectedIndex = 0; comboBoxProtoss.Items.Add(Constants.Unranked); comboBoxProtoss.Items.Add(Constants.Bronze); comboBoxProtoss.Items.Add(Constants.Silver); comboBoxProtoss.Items.Add(Constants.Gold); comboBoxProtoss.Items.Add(Constants.Platine); comboBoxProtoss.Items.Add(Constants.Diamond); comboBoxProtoss.Items.Add(Constants.Master); comboBoxProtoss.Items.Add(Constants.GrandMaster); comboBoxProtoss.SelectedIndex = 0; comboBoxRandom.Items.Add(Constants.Unranked); comboBoxRandom.Items.Add(Constants.Bronze); comboBoxRandom.Items.Add(Constants.Silver); comboBoxRandom.Items.Add(Constants.Gold); comboBoxRandom.Items.Add(Constants.Platine); comboBoxRandom.Items.Add(Constants.Diamond); comboBoxRandom.Items.Add(Constants.Master); comboBoxRandom.Items.Add(Constants.GrandMaster); comboBoxRandom.SelectedIndex = 0; }
public PlayerForm(MainForm mainForm, Player player) { this.mainForm = mainForm; this.player = player; this.newPlayer = false; InitializeComponent(); textBoxName.Text = player.Name; checkBoxTerran.Checked = player.Races[Constants.Terran]; checkBoxZerg.Checked = player.Races[Constants.Zerg]; checkBoxProtoss.Checked = player.Races[Constants.Protoss]; checkBoxRandom.Checked = player.Races[Constants.Random]; comboBoxTerran.Enabled = false; comboBoxZerg.Enabled = false; comboBoxProtoss.Enabled = false; comboBoxRandom.Enabled = false; }