Beispiel #1
0
        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();
                }
            }
        }
Beispiel #2
0
        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();
            }
        }