You can add importing and exporting functionality to your scheduling application using the Import and Export methods of the C1ScheduleStorage class. These methods allow the importing and exporting of scheduling data in XML, iCal, and binary formats. These formats can be set by using the XML, iCal, and Binary values of the FileFormatEnum enumeration, respectively. The Import and Export methods are essential for integrating scheduling data across different systems or saving it for future use.
In the following example, you will be importing and exporting data using the iCal format. The C1Scheduler and two button controls are added to the form named sched, Import and Export respectively. When the application is run, you will be able to import and export data into the C1Scheduler control. Complete the following steps to add importing and exporting functionality to a scheduling application:
XAML |
Copy Code
|
---|---|
<c1:C1Scheduler Name="sched" Loaded="sched_Loaded"/> <Button Content="Import" HorizontalAlignment="Left" Margin="100,20,0,0" VerticalAlignment="Top" Height="33" Width="89" Click="Import_Click"/> <Button Content="Export" HorizontalAlignment="Left" Margin="200,20,0,0" VerticalAlignment="Top" Height="33" Width="89" Click="Export_Click"/> |
CS |
Copy Code
|
---|---|
sched.DataStorage.Import("AppointmentData.ics", C1.Schedule.FileFormatEnum.iCal)
|
CS |
Copy Code
|
---|---|
sched.DataStorage.Export("AppointmentData.ics", C1.Schedule.FileFormatEnum.iCal)
|