Exemple #1
0
        private void EventEditBtn_Click(object sender, EventArgs e)
        {
            if (SelectedEvent != null)
            {
                int index = fCalendar.Events.IndexOf(SelectedEvent);

                CalendarEventForm dlg = new CalendarEventForm(SelectedEvent, fCalendar);
                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    fCalendar.Events[index] = dlg.Event;
                    update_events();
                }
            }
        }
Exemple #2
0
        private void EventAddBtn_Click(object sender, EventArgs e)
        {
            CalendarEvent ce = new CalendarEvent();

            ce.Name    = "New Event";
            ce.MonthID = fCalendar.Months[0].ID;

            CalendarEventForm dlg = new CalendarEventForm(ce, fCalendar);

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                fCalendar.Events.Add(dlg.Event);
                update_events();
            }
        }