Example #1
0
 private void LoadTenis(Tenis item)
 {
     groupBox2.Visible           = false;
     groupBox3.Visible           = true;
     txtBxStarPlayers.Text       = item.StarPlayers;
     txtBxCoachName.Text         = item.CoachesName;
     txtBxStringRacket.Text      = item.RestringRacketGuy;
     numericUpDownPractice.Value = item.PracticeTime;
 }
Example #2
0
        public static Team[] BuildData()
        {
            teamList = new Team[20];
            for (int i = 0; i < 10; i++)
            {
                teamList[i] = new Soccer($"Name:{i}", i, i, $"Field Location:{i}", $"Type of shoes:{i}", $"Coaches name: {i}", $"Star players: {i}", i);
            }

            for (int i = 10; i < 20; i++)
            {
                teamList[i] = new Tenis($"Name:{i}", i, i, $"Field Location:{i}", $"String Racket guy: {i}", $"Coaches name: {i}", $"Star players: {i}", i);
            }
            return(teamList);
        }
Example #3
0
        private void lstBxOutPut_SelectedIndexChanged(object sender, EventArgs e)
        {
            currentRow = lstBxOutPut.SelectedIndex;
            Team item = (Team)lstBxOutPut.SelectedItem;

            if (item is Soccer)
            {
                Soccer soccerTeam = (Soccer)item;
                LoadTeamData(soccerTeam);
                LoadSocer(soccerTeam);
            }
            else
            {
                Tenis tenisTeam = (Tenis)item;
                LoadTeamData(tenisTeam);
                LoadTenis(tenisTeam);
            }
        }