void importer_CalendarStructureCreated(object sender, iCalendarStructureCreatedEventArgs e) { iCalendarImporter importer = (iCalendarImporter)sender; int maxNoOfAppointments = importer.SourceObjectCount; // TODO: use the events count to adjust the scheduler view or to initialize indicators. eventsCount = maxNoOfAppointments; }
void ImportAppointments(Stream stream) { if (stream == null) { return; } iCalendarImporter importer = new iCalendarImporter(schedulerStorage1); importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting); importer.Import(stream); }
private void ImportAppointments(Stream stream) { if (stream == null) { return; } schedulerControl1.Storage.AppointmentStorage.Clear(); iCalendarImporter importer = new iCalendarImporter(schedulerControl1.Storage.InnerStorage); importer.Import(stream); }
private void ImportAppointments(Stream stream) { schedulerControl1.Storage.AppointmentStorage.Clear(); if (stream == null || Stream.Null.Equals(stream)) { return; } iCalendarImporter importer = new iCalendarImporter(schedulerControl1.GetCoreStorage()); importer.Import(stream); }
void ImportAppointments(Stream stream) { if (stream == null || stream == Stream.Null || stream.Length == 0) { return; } iCalendarImporter importer = new iCalendarImporter(schedulerStorage1); importer.OnException += new ExchangeExceptionEventHandler(importer_OnException); importer.Import(stream); }
void importer_OnException(object sender, ExchangeExceptionEventArgs e) { iCalendarParseExceptionEventArgs args = e as iCalendarParseExceptionEventArgs; if (args != null) { DXMessageBox.Show(String.Format("Can't parse line '{1}' at {0} index", args.LineIndex, args.LineText)); iCalendarImporter importer = (iCalendarImporter)sender; importer.Terminate(); } e.Handled = true; }
protected override void ExecuteCore() { Stream stream = GetStream(); if (stream != null) { Control.Storage.Appointments.Clear(); iCalendarImporter importer = new iCalendarImporter(Control.Storage); importer.Import(stream); } }
private void btnImport_Click(object sender, EventArgs e) { if (!System.IO.File.Exists(iCalendarExchangeFilePath)) { MessageBox.Show(string.Format("File '{0}' does not exist.", System.IO.Path.GetFullPath(iCalendarExchangeFilePath))); return; } iCalendarImporter importer = new iCalendarImporter(schedulerStorage1); importer.AppointmentImported += new AppointmentImportedEventHandler(importer_AppointmentImported); importer.Import(iCalendarExchangeFilePath); }
void ImportAppointments(string filePath, Point pt) { if (filePath == null) { return; } // Create an Importer object, subscribe to its events and perform the import. iCalendarImporter importer = new iCalendarImporter(schedulerStorage1); importer.CalendarStructureCreated += new iCalendarStructureCreatedEventHandler(importer_CalendarStructureCreated); importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting); importer.Import(filePath); }
void ImportAppointments(Stream stream) { if (stream == null) { return; } scheduler.Storage.AppointmentStorage.Clear(); iCalendarImporter importer = new iCalendarImporter(scheduler.Storage.InnerStorage); importer.CalendarStructureCreated += new iCalendarStructureCreatedEventHandler(importer_CalendarStructureCreated); importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting); importer.OnException += new ExchangeExceptionEventHandler(importer_OnException); importer.Import(stream); }
void DoiCalendarImport() { iCalendarImporter importer = new iCalendarImporter(schedulerStorage1); importer.AppointmentImporting += new AppointmentImportingEventHandler(OnImportAppointment); importer.CustomPropertyIdentifier = CustomPropertySignature; using (FileStream fs = new FileStream(iCalendarFileName, FileMode.Open)) { try { importer.Import(fs); } catch (Exception e) { MessageBox.Show(e.Message, "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
void importer_OnException(object sender, ExchangeExceptionEventArgs e) { iCalendarParseExceptionEventArgs args = e as iCalendarParseExceptionEventArgs; if (args != null) { if (ckhBreakOnError.Checked) { iCalendarImporter importer = (iCalendarImporter)sender; importer.Terminate(); } ShowErrorMessage(String.Format("Cannot parse line {0} with text '{1}'", args.LineIndex, args.LineText)); } else { ShowErrorMessage(e.OriginalException.Message); } e.Handled = true; // prevent this exception from throwing }
void ImportAppointments(Stream stream) { if (stream == null) return; iCalendarImporter importer = new iCalendarImporter(schedulerStorage1); importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting); importer.Import(stream); }
void importer_CalendarStructureCreated(object sender, iCalendarStructureCreatedEventArgs e) { iCalendarImporter importer = (iCalendarImporter)sender; progressBar.Maximum = importer.SourceObjectCount; }