| |
 |
How to: Export Data to vCalendar
The following example demonstrates how to export data from a SchedulerDataStorage to the vCalendar format. To do this you should use two overloads of the SchedulerDataStorage.ExportToVCalendar method. Note that these methods allow both exporting data either to a file, or to a stream.
C# |
using System.IO;
using DevExpress.XtraScheduler;
private string StoreToVCalendarFile(SchedulerDataStorage storage){
string path = "C:\\Temp\\Appointments.vcs";
storage.ExportToVCalendar(path);
return path;
}
private MemoryStream StoreToVCalendarStream(SchedulerDataStorage storage){
MemoryStream stream = new MemoryStream();
storage.ExportToVCalendar(stream);
return stream;
}
|
VB |
Imports System.IO
Imports DevExpress.XtraScheduler
Private Function StoreToVCalendarFile(Storage As SchedulerDataStorage) As String
Dim Path As String = "C:\Temp\Appointments.vcs"
Storage.ExportToVCalendar(Path)
Return Path
End Function
Private Function StoreToVCalendarStream(Storage As SchedulerDataStorage) As MemoryStream
Dim Stream As New MemoryStream()
Storage.ExportToVCalendar(Stream)
Return Stream
End Function
|
Is this topic helpful?
Additional Feedback
Close
|