private void SeasonEditBtn_Click(object sender, EventArgs e) { if (SelectedSeason != null) { int index = fCalendar.Seasons.IndexOf(SelectedSeason); SeasonForm dlg = new SeasonForm(SelectedSeason, fCalendar); if (dlg.ShowDialog() == DialogResult.OK) { fCalendar.Seasons[index] = dlg.Season; update_seasons(); } } }
private void SeasonAddBtn_Click(object sender, EventArgs e) { CalendarEvent ce = new CalendarEvent(); ce.Name = "New Season"; ce.MonthID = fCalendar.Months[0].ID; SeasonForm dlg = new SeasonForm(ce, fCalendar); if (dlg.ShowDialog() == DialogResult.OK) { fCalendar.Seasons.Add(dlg.Season); update_seasons(); } }