private void newRaceBtn_Click(object sender, EventArgs e) { RaceForm r = new RaceForm(new Race() { Source = Program.Context.Config.DefaultSource }); r.Saved += RaceSaved; r.Show(); }
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(); } }