Exemplo n.º 1
0
        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)
        {
            schedulerControl1.Storage.AppointmentStorage.Clear();
            if (stream == null || Stream.Null.Equals(stream))
            {
                return;
            }
            iCalendarImporter importer = new iCalendarImporter(schedulerControl1.GetCoreStorage());

            importer.Import(stream);
        }
Exemplo n.º 3
0
        private void ImportAppointments(Stream stream)
        {
            if (stream == null)
            {
                return;
            }
            schedulerControl1.Storage.AppointmentStorage.Clear();
            iCalendarImporter importer = new iCalendarImporter(schedulerControl1.Storage.InnerStorage);

            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);
        }
    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);
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
        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);
                }
            }
        }
Exemplo n.º 10
0
 void ImportAppointments(Stream stream)
 {
     if (stream == null)
         return;
     iCalendarImporter importer = new iCalendarImporter(schedulerStorage1);
     importer.AppointmentImporting += new AppointmentImportingEventHandler(importer_AppointmentImporting);
     importer.Import(stream);
 }