Exemplo n.º 1
0
        private void OpenFormWithCurrentRaceFromGrid()
        {
            if (grdRaces.SelectedCells.Count == 0)
            {
                return;
            }

            int rowIndex = grdRaces.SelectedCells[0].RowIndex;

            WeekendInfo wd = this.Season.RaceWeekends[rowIndex];

            FrmRace f = new FrmRace(wd);

            f.Show();
        }
Exemplo n.º 2
0
        private void addRaceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Weekend w = WeekendWizard.RunNewWeekendProvider(this.Season);

            if (w != null)
            {
                WeekendInfo wd = new WeekendInfo(w);
                this.Season.RaceWeekends.Add(wd);

                //bool changed = false;
                //WeekendWizard.FillWeekendFromTelemetry(w, out changed);
                //SeasonEvaluator.ReEvaluate(this.season, this.season.RaceWeekends.Count - 1);

                RefreshData();

                FrmRace f = new FrmRace(wd);
                f.Show();
            }
        }