private List <string> FillClubComboBox() { List <string> clubList = new List <string>(); for (int i = 0; i < FootballClubInfo.Count; i++) { clubList.Add(FootballClubInfo.GetNazev(i)); } return(clubList); }
public void RefreshGridView() { playersGridView.Rows.Clear(); for (int i = 0; i < players.Count; i++) { Player p = players[i]; playersGridView.Rows.Add(p.Name, FootballClubInfo.GetNazev((int)p.Club), p.GoalCount); playersGridView.Update(); playersGridView.Refresh(); } }
public PlayerForm(ChampionsLeagueForm ParentForm) { InitializeComponent(); clubComboBox.DataSource = FillClubComboBox(); this.MainForm = ParentForm; if (!ParentForm.addingProcedure) { formerPlayer = ParentForm.GetSelectedRow(); nameTextBox.Text = formerPlayer.Name; clubComboBox.SelectedItem = FootballClubInfo.GetNazev((int)formerPlayer.Club); goalCountUpDown.Value = formerPlayer.GoalCount; } }
private void GetAllClubsInList() { for (int i = 0; i < FootballClubInfo.Count; i++) { for (int j = 0; j < MainForm.players.Count; j++) { if (MainForm.players[j].Club.Equals(FootballClubInfo.GetEnumType(FootballClubInfo.GetNazev(i)))) { teamsToSaveListBox.Items.Add(FootballClubInfo.GetNazev(i)); break; } } } }
private void FillDialog() { if (MainForm.players[0] == null) { goalsCountTextBox.Text = "0"; clubListBox.Items.Clear(); return; } var bestClubs = MainForm.players.FindBestClubs(); goalsCountTextBox.Text = bestClubs.Item2.ToString(); foreach (FootballClub v in bestClubs.Item1) { clubListBox.Items.Add(FootballClubInfo.GetNazev((int)v)); } }