Exemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            int raceTrack = background.Size.Width;
            Console.WriteLine(raceTrack.ToString());

            greyhoundArray = new List<Greyhound>();

            greyhoundArray.Add(jackson = new Greyhound() { pictureBox = jacksonDog, raceTrackLength = raceTrack });
            greyhoundArray.Add(hagan = new Greyhound() { pictureBox = haganDog, raceTrackLength = raceTrack });
            greyhoundArray.Add(harry = new Greyhound() { pictureBox = harryDog, raceTrackLength = raceTrack });
            greyhoundArray.Add(fender = new Greyhound() { pictureBox = fenderDog, raceTrackLength = raceTrack });

            bookersArray = new List<Booker>();
            bookersArray.Add(janek = new Booker() { name = "Janek", cash = 100, myLabel = janekLabel, myRadioButton = janekButton, description = janekDescription });
            bookersArray.Add(ignacy = new Booker() { name = "Ignacy", cash = 210, myLabel = ignacyLabel, myRadioButton = ignacyButton, description = ignacyDescription });
            bookersArray.Add(piotrek = new Booker() { name = "Piotrek", cash = 143, myLabel = piotrekLabel, myRadioButton = piotrekButton, description = piotrekDescription });

            //wyświetlenie incjalnych labelek :)
            foreach (Booker guy in bookersArray) {
                guy.updateLabels();
                guy.firstDescription();
            }
        }