Skip to main content

AppointmentImportingEventArgs Class

Provides data for the AppointmentImporter.AppointmentImporting event.

Namespace: DevExpress.XtraScheduler

Assembly: DevExpress.XtraScheduler.v14.2.Core.dll

#Declaration

public class AppointmentImportingEventArgs :
    AppointmentCancelEventArgs

#Remarks

Note that AppointmentImportingEventArgs objects are automatically created, initialized and passed to the AppointmentImporter.AppointmentImporting event handlers.

#Examples

This example demonstrates how to import only non-recurring appointments to the scheduler control from the iCalendar format. To perform such custom import operations, handle the AppointmentImporter.AppointmentImporting event and use the AppointmentCancelEventArgs.Cancel property.

using System.IO;
using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.iCalendar;
// ...

private void ImportAppointments(Stream stream) {
    if (stream == null || Stream.Null.Equals(stream))
        return;
    iCalendarImporter importer = new iCalendarImporter(schedulerControl1.GetCoreStorage());
    importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting);
    importer.Import(stream);
}

void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) {
    if (e.Appointment.IsRecurring) {
        e.Cancel = true;
    }
}
See Also