Пример #1
0
        private void driversListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            Racer selectedRacer = driversListBox.SelectedItem as Racer;

            if (!(selectedRacer is null))
            {
                lapsListBox.DataSource = null;
                lapsListBox.DataSource = selectedRacer.Laps;

                String bestLap = selectedRacer.getBestLap((int)numericFilter.Value);

                if (bestLap is null)
                {
                    bestLapTextBox.Text = "NO LAP EXISTS";
                }

                else
                {
                    bestLapTextBox.Text = bestLap;
                }
            }
        }
Пример #2
0
 private void addDriverNOK_Click(object sender, EventArgs e)
 {
     this.Racer = null;
     this.Close();
 }
Пример #3
0
 public Form2(Racer racer)
 {
     InitializeComponent();
     this.Racer = racer;
 }