Skip to main content
A newer version of this page is available. .

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.v19.1.GoogleCalendar.dll

Declaration

public event EventHandler<ProgressChangedEventArgs> ProgressChanged

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.


void DxGoogleCalendarSync1_ProgressChanged(object sender, DevExpress.XtraScheduler.GoogleCalendar.ProgressChangedEventArgs e) {
    BeginInvoke((Action<int>)((progressValue) => {
        this.biSyncProgress.EditValue = progressValue;
        if (progressValue == 100) {
                this.biSyncProgress.Visibility = BarItemVisibility.Never;
                label1.Text = e.SyncedObjectCount.ToString() + " object synced";
        }
    }), e.Progress);
}
See Also