Back to Devexpress

DXGoogleCalendarSync.ProgressChanged Event

windowsforms-devexpress-dot-xtrascheduler-dot-googlecalendar-dot-dxgooglecalendarsync-f661691f.md

latest2.7 KB
Original Source

DXGoogleCalendarSync.ProgressChanged Event

Repeatedly occurs as the synchronization process makes noticeable progress. Allows you to track the progress and update UI elements (e.g., a ProgressBarControl accordingly).

Namespace : DevExpress.XtraScheduler.GoogleCalendar

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

NuGet Package : DevExpress.Win.Scheduler.GoogleCalendar

Declaration

csharp
public event EventHandler<ProgressChangedEventArgs> ProgressChanged
vb
Public Event ProgressChanged As EventHandler(Of ProgressChangedEventArgs)

Event Data

The ProgressChanged event's data class is DevExpress.XtraScheduler.GoogleCalendar.ProgressChangedEventArgs.

Remarks

The ProgressChanged event raises when its returned integer e.Progress parameter changes. The Progress parameter can have values from 0 to 100, which means when the ProgressChanged event occurs, the synchronization made 1% progress.

The code below illustrates how to display the synchronization progress using the “biSyncProgress” progress bar control, and report the total number of synced appointments with a label.

csharp
void DxGoogleCalendarSync1_ProgressChanged(object sender, GoogleCalendar.ProgressChangedEventArgs e) {
        this.biSyncProgress.EditValue = e.Progress;
        if (e.Progress == 100) {
                this.biSyncProgress.Visibility = BarItemVisibility.Never;
                label1.Text = e.SyncedObjectCount.ToString() + " object synced";
        }
}
vb
Private Sub DxGoogleCalendarSync1_ProgressChanged(ByVal sender As Object, ByVal e As GoogleCalendar.ProgressChangedEventArgs)
        Me.biSyncProgress.EditValue = e.Progress
        If e.Progress = 100 Then
            Me.biSyncProgress.Visibility = BarItemVisibility.Never
            label1.Text = e.SyncedObjectCount.ToString() & " object synced"
        End If
End Sub

See Also

DXGoogleCalendarSync Class

DXGoogleCalendarSync Members

DevExpress.XtraScheduler.GoogleCalendar Namespace