コード例 #1
0
        private void newRaceBtn_Click(object sender, EventArgs e)
        {
            RaceForm r = new RaceForm(new Race()
            {
                Source = Program.Context.Config.DefaultSource
            });

            r.Saved += RaceSaved;
            r.Show();
        }
コード例 #2
0
        private void editRace(object sender, EventArgs e)
        {
            if (racesList.SelectedItem == null)
            {
                return;
            }
            Race selected = Program.Context.GetRace((string)racesList.SelectedItem, null);

            if (selected != null)
            {
                string   sel = selected.Name;
                RaceForm r   = new RaceForm(selected.Clone());
                r.Saved += RaceSaved;
                r.Show();
            }
        }