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

iCalendarImporter.CalendarStructureCreated Event

Fires when the calendar object conforming to the iCalendar specification is created.

Namespace: DevExpress.XtraScheduler.iCalendar

Assembly: DevExpress.XtraScheduler.v21.2.Core.Desktop.dll

NuGet Package: DevExpress.Scheduler.CoreDesktop

Declaration

public event iCalendarStructureCreatedEventHandler CalendarStructureCreated

Event Data

The CalendarStructureCreated event's data class is iCalendarStructureCreatedEventArgs. The following properties provide information specific to this event:

Property Description
Calendars Provides access to the calendar structures conforming to the iCalendar specification.

Remarks

Handle the CalendarStructureCreated event to obtain information on the iCalendar object, accessing its properties and attributes.

Example

The following example illustrates how the calendar structure constructed by the iCalendarImporter can be used to determine the time when the original appointment was created and the application used for .ics file generation.

The iCalendarImporter.CalendarStructureCreated event is handled and DevExpress.XtraScheduler.iCalendar.Components.iCalendarComponent object properties are inspected. The ProductIdentifier property specifies the identifier for the product that created the iCalendar object, the DevExpress.XtraScheduler.iCalendar.Components.VEvent.Created property specifies the date and time that the calendar information was created by the calendar user agent in the calendar store.

The information message is appended to the appointment’s subject, as illustrated in the following picture:

CalendarStructureCreated

using DevExpress.XtraScheduler;
using DevExpress.XtraScheduler.iCalendar;
using DevExpress.XtraScheduler.iCalendar.Components;
// ...
void importer_CalendarStructureCreated(object sender, iCalendarStructureCreatedEventArgs e) {
    iCalendarComponent cal = e.Calendars[0];
    string productId = cal.ProductIdentifier.Value;
    for (int i = 0; i < cal.Events.Count; i++)
    {
        VEvent ev = cal.Events[i];
        DateTime created = ev.Created.Value;
        ev.Description.Value += string.Format("[COMMENT: The event was originally created on" + 
        "{0} at {1} by an application with productId {2}]",
        created.ToShortDateString(), created.ToShortTimeString(), productId);
    }
}
See Also