Exemple #1
0
        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);
        }
Exemple #2
0
 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();
     }
 }
Exemple #3
0
 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;
     }
 }
Exemple #4
0
 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;
             }
         }
     }
 }
Exemple #5
0
        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));
            }
        }