void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) { iCalendarAppointmentExportingEventArgs args = e as iCalendarAppointmentExportingEventArgs; //((CustomProperty)args.VEvent.CustomProperties["X-MICROSOFT-CDO-BUSYSTATUS"]).Value = e.Appointment.StatusId.ToString(); ((CustomProperty)args.VEvent.CustomProperties["X-DEVEXPRESS-STATUS"]).Value = e.Appointment.StatusKey.ToString(); }
void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) { AddToLog(String.Format("Exporting Subj:{0}, started at {1:F} ...", e.Appointment.Subject, e.Appointment.Start)); if (e.Appointment.IsRecurring) { e.Cancel = true; AddToLog("Cancelled because of its type (recurring)."); } }
void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) { string s = Convert.ToString(e.Appointment.CustomFields[RecipientsDataColumn]); string[] attendees = s.Split(';'); iCalendarAppointmentExportingEventArgs args = e as iCalendarAppointmentExportingEventArgs; AddEventAttendees(args.VEvent, attendees); }
void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) { progressBar.Value += 1; DispatcherHelper.DoEvents(); bool cancel = e.Appointment.IsRecurring ? IsCancelForRecurring : IsCancelForNonRecurring; if (cancel) { e.Cancel = true; } }
void OnExportAppointment(object sender, AppointmentExportingEventArgs e) { iCalendarAppointmentExportingEventArgs args = (iCalendarAppointmentExportingEventArgs)e; Appointment apt = args.Appointment; // TO DO: Check whether the appointment being exported meets conditions. // Export appointments starting in the work time interval only. if (apt.Start.Hour < 8 || apt.Start.Hour > 17) { args.Cancel = true; return; } }
void OnExportAppointment(object sender, AppointmentExportingEventArgs e) { VCalendarAppointmentExportingEventArgs args = (VCalendarAppointmentExportingEventArgs)e; Appointment apt = args.Appointment; VEvent ev = args.VEvent; // !!! only work time if (apt.Start.Hour < 8 || apt.Start.Hour > 17) { args.Cancel = true; return; } // save the custom information CustomObject obj = (CustomObject)apt.CustomFields[CustomFieldName]; VEventExtension ext = new VEventExtension(obj.Name, obj.Value); ext.Parameters.Add(new VCalendarParameter("TYPE", obj.ObjectType)); ext.Parameters.Add(new VCalendarParameter("VALUE", obj.ValueType)); ev.Extensions.Add(ext); }
void exporter_AppointmentExporting(object sender, AppointmentExportingEventArgs e) { }