windowsforms-2363-controls-and-libraries-scheduler-examples-data-exchange-how-to-import-data-from-vcalendar.md
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);
}
// ...
Imports System.IO
Imports DevExpress.XtraScheduler
' ...
' Load appointments from a file in the vCalendar format.
Private Function LoadFromVCalendarFile(Storage As SchedulerStorage) As String
Dim Path As String = "C:\Temp\Appointments.vcs"
Storage.ImportFromVCalendar(path)
Return Path
End Function
' Load appointments from a stream in the vCalendar format.
Private Sub LoadFromVCalendarStream(Storage As SchedulerStorage, Stream As Stream)
Storage.ImportFromVCalendar(Stream)
End Sub
' ...