private void MonthEditBtn_Click(object sender, EventArgs e) { if (SelectedMonth != null) { int index = fCalendar.Months.IndexOf(SelectedMonth); MonthForm dlg = new MonthForm(SelectedMonth); if (dlg.ShowDialog() == DialogResult.OK) { fCalendar.Months[index] = dlg.MonthInfo; update_months(); update_seasons(); update_events(); } } }
private void MonthAddBtn_Click(object sender, EventArgs e) { MonthInfo mi = new MonthInfo(); mi.Name = "New Month"; MonthForm dlg = new MonthForm(mi); if (dlg.ShowDialog() == DialogResult.OK) { fCalendar.Months.Add(dlg.MonthInfo); update_months(); update_seasons(); update_events(); } }