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; }
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; }