void synchronizer_AppointmentSynchronizing(object sender, AppointmentSynchronizingEventArgs e) { progressBar.Value += 1; DispatcherHelper.DoEvents(); Appointment apt = e.Appointment; bool cancel = false; if (apt != null) { cancel = apt.IsRecurring ? IsCancelForRecurring : IsCancelForNonRecurring; } if (cancel) { e.Cancel = true; return; } switch (e.Operation) { case SynchronizeOperation.Create: if ((bool)chDontCreateNew.IsChecked) { e.Cancel = true; } break; case SynchronizeOperation.Delete: if ((bool)chDontDeleteExisting.IsChecked) { e.Cancel = true; } break; case SynchronizeOperation.Replace: if ((bool)chDeleteInsteadReplace.IsChecked) { e.Operation = SynchronizeOperation.Delete; } break; } }
private void synchronizer_AppointmentSynchronizing(object sender, AppointmentSynchronizingEventArgs e) { OutlookAppointmentSynchronizingEventArgs args = (OutlookAppointmentSynchronizingEventArgs)e; Appointment apt = e.Appointment; AppointmentImportSynchronizer importSynchronizer = sender as AppointmentImportSynchronizer; AppointmentExportSynchronizer exportSynchronizer = sender as AppointmentExportSynchronizer; if (apt != null && args.OutlookAppointment != null) { if (importSynchronizer != null) { apt.CustomFields[OutlookUserPropertyName] = GetOutlookAppointmentContactInfo(args.OutlookAppointment); } else { SetOutlookAppointmentContactInfo(args.OutlookAppointment, Convert.ToString(apt.CustomFields[OutlookUserPropertyName])); } } }
void Synchronizer_AppointmentSynchronizing(object sender, AppointmentSynchronizingEventArgs e) { AnalyzeAndHandleCurrentOperation(e as DevExpress.XtraScheduler.Outlook.OutlookAppointmentSynchronizingEventArgs); }