Ejemplo n.º 1
0
        private void schedulerControl_EditAppointmentFormShowing(object sender, AppointmentFormEventArgs e)
        {
            // Create a CustomEdit form.
            Appointment apt = e.Appointment;
            // Required to open the recurrence form via context menu.
            bool openRecurrenceForm = apt.IsRecurring && schedulerStorage1.Appointments.IsNewAppointment(apt);
            ACMS.ACMSStaff.To_Do_List.MyCustomEditForm f = new ACMS.ACMSStaff.To_Do_List.MyCustomEditForm((SchedulerControl)sender, apt, openRecurrenceForm);

            // Set the current appointment as an appointment of the CustomEdit form.
            f.SetAppointment(e.Appointment);

            // Show the form modally.
            f.ShowDialog();

            // Return the dialog result.
            e.DialogResult = f.DialogResult;

            // Do this to prevent the standard form from being shown.
            e.Handled = true;
        }
Ejemplo n.º 2
0
        private void schedulerControl_EditAppointmentFormShowing(object sender, AppointmentFormEventArgs e)
        {
            // Create a CustomEdit form.
            Appointment apt = e.Appointment;
            // Required to open the recurrence form via context menu.
            bool openRecurrenceForm = apt.IsRecurring && schedulerStorage1.Appointments.IsNewAppointment(apt);

            ACMS.ACMSStaff.To_Do_List.MyCustomEditForm f = new ACMS.ACMSStaff.To_Do_List.MyCustomEditForm((SchedulerControl)sender, apt, openRecurrenceForm);

            // Set the current appointment as an appointment of the CustomEdit form.
            f.SetAppointment(e.Appointment);

            // Show the form modally.
            f.ShowDialog();

            // Return the dialog result.
            e.DialogResult = f.DialogResult;

            // Do this to prevent the standard form from being shown.
            e.Handled = true;
        }