private void DayEditBtn_Click(object sender, EventArgs e) { if (SelectedDay != null) { int index = fCalendar.Days.IndexOf(SelectedDay); DayForm dlg = new DayForm(SelectedDay); if (dlg.ShowDialog() == DialogResult.OK) { fCalendar.Days[index] = dlg.DayInfo; update_days(); } } }
private void DayAddBtn_Click(object sender, EventArgs e) { DayInfo di = new DayInfo(); di.Name = "New Day"; DayForm dlg = new DayForm(di); if (dlg.ShowDialog() == DialogResult.OK) { fCalendar.Days.Add(dlg.DayInfo); update_days(); } }