public AddMatchUp() { InitializeComponent(); ReadGameTimesFile.readGameTimesFile(); LoadTeamData.loadTeamData(); foreach (Settings value in Program.settingsList) { listBox3.Items.Add(value.GameTime); } foreach (Team value in Program.itemList) { listBox1.Items.Add(value.TeamName); listBox2.Items.Add(value.TeamName); } }
public SettingsForm() { InitializeComponent(); ReadGameTimesFile.readGameTimesFile(); if (Program.settingsList.Count > 0) { textBox1.Text = Program.settingsList[0].GameTime; textBox2.Text = Program.settingsList[0].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 2) { textBox3.Text = Program.settingsList[1].GameTime; textBox4.Text = Program.settingsList[1].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 3) { textBox5.Text = Program.settingsList[2].GameTime; textBox6.Text = Program.settingsList[2].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 4) { textBox7.Text = Program.settingsList[3].GameTime; textBox8.Text = Program.settingsList[3].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 5) { textBox9.Text = Program.settingsList[4].GameTime; textBox10.Text = Program.settingsList[4].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 6) { textBox11.Text = Program.settingsList[5].GameTime; textBox12.Text = Program.settingsList[5].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 7) { textBox13.Text = Program.settingsList[6].GameTime; textBox14.Text = Program.settingsList[6].NumberOfGameAtThatTime.ToString(); } if (Program.settingsList.Count >= 8) { textBox15.Text = Program.settingsList[7].GameTime; textBox16.Text = Program.settingsList[7].NumberOfGameAtThatTime.ToString(); } }
public EditTeam() { InitializeComponent(); LoadTeamData.loadTeamData(); ReadGameTimesFile.readGameTimesFile(); int i = Program.settingsList.Count; if (i > 0) { checkBox1.Text = Program.settingsList[0].GameTime; } else { checkBox1.Visible = false; } if (i >= 2) { checkBox2.Text = Program.settingsList[1].GameTime; } else { checkBox2.Visible = false; } if (i >= 3) { checkBox3.Text = Program.settingsList[2].GameTime; } else { checkBox3.Visible = false; } if (i >= 4) { checkBox4.Text = Program.settingsList[3].GameTime; } else { checkBox4.Visible = false; } if (i >= 5) { checkBox5.Text = Program.settingsList[4].GameTime; } else { checkBox5.Visible = false; } if (i >= 6) { checkBox6.Text = Program.settingsList[5].GameTime; } else { checkBox6.Visible = false; } if (i >= 7) { checkBox7.Text = Program.settingsList[6].GameTime; } else { checkBox7.Visible = false; } if (i >= 8) { checkBox8.Text = Program.settingsList[7].GameTime; } else { checkBox8.Visible = false; } foreach (Team value in Program.itemList) { listBox1.Items.Add(value.TeamName); } listBox1.Update(); }
private void DisplayGameTimeCheckboxes() { // Checks how many game times exist and displays a checkbox for each time // (So that the user can select times which the new team is unable to play) ReadGameTimesFile.readGameTimesFile(); int i = Program.settingsList.Count; if (i > 0) { checkBox1.Text = Program.settingsList[0].GameTime; } else { checkBox1.Visible = false; } if (i >= 2) { checkBox2.Text = Program.settingsList[1].GameTime; } else { checkBox2.Visible = false; } if (i >= 3) { checkBox3.Text = Program.settingsList[2].GameTime; } else { checkBox3.Visible = false; } if (i >= 4) { checkBox4.Text = Program.settingsList[3].GameTime; } else { checkBox4.Visible = false; } if (i >= 5) { checkBox5.Text = Program.settingsList[4].GameTime; } else { checkBox5.Visible = false; } if (i >= 6) { checkBox6.Text = Program.settingsList[5].GameTime; } else { checkBox6.Visible = false; } if (i >= 7) { checkBox7.Text = Program.settingsList[6].GameTime; } else { checkBox7.Visible = false; } if (i >= 8) { checkBox8.Text = Program.settingsList[7].GameTime; } else { checkBox8.Visible = false; } }