Back to Devexpress

AppointmentSynchronizer Class

corelibraries-devexpress-dot-xtrascheduler-dot-exchange.md

latest4.8 KB
Original Source

AppointmentSynchronizer Class

Serves as the base class for classes that provide functionality for synchronizing the appointments contained in the XtraScheduler storage and another scheduling application.

Namespace : DevExpress.XtraScheduler.Exchange

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

NuGet Package : DevExpress.Scheduler.Core

Declaration

csharp
public abstract class AppointmentSynchronizer :
    AppointmentExchanger
vb
Public MustInherit Class AppointmentSynchronizer
    Inherits AppointmentExchanger

Remarks

To create a synchronization mechanism, you should initialize the AppointmentSynchronizer instance by specifying the calendar folder path and the name of the data field that stores the EntryID (AppointmentSynchronizer.ForeignIdFieldName). Then, call the AppointmentSynchronizer.Synchronize method and take advantage of the AppointmentSynchronizer.AppointmentSynchronizing and AppointmentSynchronizer.AppointmentSynchronized events to control the synchronization process.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/winforms-scheduler-sync-with-outlook

csharp
AppointmentExportSynchronizer synchronizer = schedulerControl1.Storage.CreateOutlookExportSynchronizer();
// Specify the field that contains appointment identifier used by a third-party application.
synchronizer.ForeignIdFieldName = OutlookEntryIDFieldName;
// The AppointmentSynchronizing event allows you to control the operation for an individual appointment.
synchronizer.AppointmentSynchronizing += new AppointmentSynchronizingEventHandler(exportSynchronizer_AppointmentSynchronizing);
// The AppointmentSynchronized event indicates that the operation for a particular appointment is complete.
synchronizer.AppointmentSynchronized += new AppointmentSynchronizedEventHandler(exportSynchronizer_AppointmentSynchronized);
// Specify MS Outlook calendar path.
((ISupportCalendarFolders)synchronizer).CalendarFolderName = comboBoxEdit1.EditValue.ToString();
// Perform the operation.
synchronizer.Synchronize();
vb
Dim synchronizer As AppointmentExportSynchronizer = schedulerControl1.Storage.CreateOutlookExportSynchronizer()
' Specify the field that contains appointment identifier used by a third-party application.
synchronizer.ForeignIdFieldName = OutlookEntryIDFieldName
' The AppointmentSynchronizing event allows you to control the operation for an individual appointment.
AddHandler synchronizer.AppointmentSynchronizing, AddressOf exportSynchronizer_AppointmentSynchronizing
' The AppointmentSynchronized event indicates that the operation for a particular appointment is complete.
AddHandler synchronizer.AppointmentSynchronized, AddressOf exportSynchronizer_AppointmentSynchronized
' Specify MS Outlook calendar path.
DirectCast(synchronizer, ISupportCalendarFolders).CalendarFolderName = comboBoxEdit1.EditValue.ToString()
' Perform the operation.
synchronizer.Synchronize()

Inheritance

Object AppointmentExchanger AppointmentSynchronizer AppointmentExportSynchronizer

AppointmentImportSynchronizer

OutlookExportSynchronizer

OutlookImportSynchronizer

See Also

AppointmentSynchronizer Members

Synchronization with Microsoft Outlook

DevExpress.XtraScheduler.Exchange Namespace