windowsforms-devexpress-dot-xtrascheduler-dot-microsoft365calendar-ecb25a2a.md
Contains data for the InitComplete event.
Namespace : DevExpress.XtraScheduler.Microsoft365Calendar
Assembly : DevExpress.XtraScheduler.v25.2.Microsoft365Calendar.dll
NuGet Package : DevExpress.Scheduler.Core.Desktop.Microsoft365Calendar
public class InitCompleteEventArgs :
OperationCompleteEventArgs
Public Class InitCompleteEventArgs
Inherits OperationCompleteEventArgs
InitCompleteEventArgs is the data class for the following events:
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);
}
Imports DevExpress.XtraScheduler.Microsoft365Calendar
Private dxOutlook365Sync1 As DXOutlook365Sync
Public Sub New()
InitializeComponent()
dxOutlook365Sync1 = New DXOutlook365Sync(schedulerDataStorage1)
AddHandler dxOutlook365Sync1.InitComplete, AddressOf DxOutlook365Sync1_InitComplete
End Sub
Private Async Function InitOutlook365Sync(ByVal outlook365sync As DXOutlook365Sync) As Task(Of Boolean)
' Initializes the 'dxOutlook365Sync1' component.
Dim tenantId As String = "..." ' Enter your tenant (directory) ID.
Dim clientId As String = "..." ' Enter your client (application) ID.
Dim status As InitStatus = Await outlook365sync.InitAsync(tenantId, clientId)
' Returns false if the initialization of 'dxOutlook365Sync1' failed.
Return status IsNot InitStatus.Error
End Function
Private Sub DxOutlook365Sync1_InitComplete(ByVal sender As Object, ByVal e As InitCompleteEventArgs)
If e.InitStatus = InitStatus.Error Then
XtraMessageBox.Show(String.Format("Initialization of DXOutlook365Sync failed. {0}", e.Exception.Message), "Error", MessageBoxButtons.OK)
End If
End Sub
Read the following topic for detailed information and examples: Synchronization with Microsoft 365 Calendars.
Object EventArgs DevExpress.XtraScheduler.Microsoft365Calendar.OperationCompleteEventArgs InitCompleteEventArgs
See Also