How to: Import Data from vCalendar

The following example demonstrates how to import data to a SchedulerStorage from the vCalendar format. To do this, you should normally use two overloads of the SchedulerStorageBase.ImportFromVCalendar method. Note that these methods allow data to be imported both from a file, and from a stream.

using System.IO;
using DevExpress.XtraScheduler;
// ...

// Load appointments from a file in the vCalendar format.
private string LoadFromVCalendarFile(SchedulerStorage storage) {
    string path = "C:\\Temp\\Appointments.vcs";
    storage.ImportFromVCalendar(path);
    return path;
}

// Load appointments from a stream in the vCalendar format.
private void LoadFromVCalendarStream(SchedulerStorage storage, Stream stream) {
    storage.ImportFromVCalendar(stream); 
}

// ...