void OnImportAppointment(object sender, AppointmentImportingEventArgs e) { iCalendarAppointmentImportingEventArgs args = (iCalendarAppointmentImportingEventArgs)e; Appointment apt = args.Appointment; // TO DO: Check whether the event being imported meets conditions. }
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) { OutlookAppointmentImportingEventArgs args = e as OutlookAppointmentImportingEventArgs; AddToLog(String.Format("Importing Subj:{0}, started at {1:F} ...", args.OutlookAppointment.Subject, args.OutlookAppointment.Start)); if (args.OutlookAppointment.BusyStatus == DevExpress.XtraScheduler.Outlook.Interop.OlBusyStatus.olWorkingElsewhere) { e.Cancel = true; AddToLog("Cancelled because of its busy type (working elsewhere)."); } }
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) { progressBar.Value += 1; Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Background, new System.Threading.ThreadStart(delegate { })); bool cancel = e.Appointment.IsRecurring ? IsCancelForRecurring : IsCancelForNonRecurring; if (cancel) { e.Cancel = true; } }
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) { OutlookAppointmentImportingEventArgs args = (OutlookAppointmentImportingEventArgs)e; progressBar.Value += 1; DispatcherHelper.DoEvents(); bool cancel = args.OutlookAppointment.IsRecurring ? IsCancelForRecurring : IsCancelForNonRecurring; if (cancel) { e.Cancel = true; } }
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) { // TODO: check whether a particular appointment should be imported. // If a file contains a single appointment, prompt to place it at the drop destination time. if ((eventsCount == 1) && (targetTime != DateTime.MinValue)) { DialogResult doIt = MessageBox.Show("You can set the appointment start time to a drop destination time\nat " + targetTime.ToString() + ".\nProceed?", "Info", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (doIt == DialogResult.Yes) { e.Appointment.Start = targetTime; } } timeCollectionEx.Add(new TimeInterval(e.Appointment.Start, e.Appointment.End)); }
void OnImportAppointment(object sender, AppointmentImportingEventArgs e) { VCalendarAppointmentImportingEventArgs args = (VCalendarAppointmentImportingEventArgs)e; Appointment apt = args.Appointment; VEvent ev = args.VEvent; VEventExtension ext = ev.Extensions[CustomFieldName]; // restore the custom information if (ext != null) { CustomObject obj = new CustomObject(); obj.Name = ext.Name; obj.ObjectType = ext.Parameters["TYPE"].Value; obj.ValueType = ext.Parameters["VALUE"].Value; obj.Value = ext.Value; apt.CustomFields[CustomFieldName] = obj; } }
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) { }
void importer_AppointmentImporting(object sender, AppointmentImportingEventArgs e) { OutlookAppointmentImportingEventArgs args = (OutlookAppointmentImportingEventArgs)e; }