DXOutlook365Sync.InitComplete Event
Occurs once the initialization of DXOutlook365Sync
is finished (with or without errors).
Namespace: DevExpress.XtraScheduler.Microsoft365Calendar
Assembly: DevExpress.XtraScheduler.v24.1.Microsoft365Calendar.dll
NuGet Package: DevExpress.Scheduler.Core.Desktop.Microsoft365Calendar
Declaration
Event Data
The InitComplete event's data class is InitCompleteEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
InitStatus |
Gets a value that indicates whether DXOutlook365Sync initialization succeeded or failed.
|
Remarks
The DXOutlook365Sync
component raises the InitComplete
event once its initialization is finished. The e.InitStatus
parameter specifies whether the initialization succeeded or failed. Use the e.Exception
property to get the description of the exception.
using DevExpress.XtraScheduler.Microsoft365Calendar;
DXOutlook365Sync dxOutlook365Sync1;
public Form1() {
InitializeComponent();
dxOutlook365Sync1 = new DXOutlook365Sync(schedulerDataStorage1);
dxOutlook365Sync1.InitComplete += DxOutlook365Sync1_InitComplete;
}
private async Task<bool> InitOutlook365Sync(DXOutlook365Sync outlook365sync) {
// Initializes the 'dxOutlook365Sync1' component.
string tenantId = "..."; // Enter your tenant (directory) ID.
string clientId = "..."; // Enter your client (application) ID.
InitStatus status = await outlook365sync.InitAsync(tenantId, clientId);
// Returns false if the initialization of 'dxOutlook365Sync1' failed.
return status != InitStatus.Error;
}
private void DxOutlook365Sync1_InitComplete(object sender, InitCompleteEventArgs e) {
if(e.InitStatus == InitStatus.Error)
XtraMessageBox.Show(String.Format("Initialization of DXOutlook365Sync failed. {0}", e.Exception.Message), "Error", MessageBoxButtons.OK);
}
Read the following topic for detailed information and examples: Synchronization with Microsoft 365 Calendars.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the InitComplete event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.