private void ThisAddIn_Startup(object sender, EventArgs e) { try { // Sometimes outlook raises this event multiple times (seems to be a bug) if (ComponentContainer != null) { return; } XmlConfigurator.Configure(); s_logger.Info("Startup entered."); ComponentContainer = new ComponentContainer(Application); ComponentContainer.SynchronizationFailedWhileReportsFormWasNotVisible += ComponentContainer_SynchronizationFailedWhileReportsFormWasNotVisible; ComponentContainer.StatusChanged += ComponentContainer_StatusChanged; ((ApplicationEvents_Event)Application).Quit += ThisAddIn_Quit; if (IsOutlookVersionSmallerThan2010) { _calDavSynchronizerToolBar = new CalDavSynchronizerToolBar(Application, ComponentContainer, missing); } s_logger.Info("Startup exiting."); } catch (Exception x) { ExceptionHandler.Instance.DisplayException(x, s_logger); } }
private void ThisAddIn_Startup (object sender, EventArgs e) { try { // Sometimes outlook raises this event multiple times (seems to be a bug) if (ComponentContainer != null) return; XmlConfigurator.Configure(); s_logger.Info ("Startup entered."); ComponentContainer = new ComponentContainer (Application); ComponentContainer.SynchronizationFailedWhileReportsFormWasNotVisible += ComponentContainer_SynchronizationFailedWhileReportsFormWasNotVisible; if (IsOutlookVersionSmallerThan2010) { _calDavSynchronizerToolBar = new CalDavSynchronizerToolBar (Application, ComponentContainer, missing); } s_logger.Info ("Startup exiting."); } catch (Exception x) { ExceptionHandler.Instance.HandleException (x, s_logger); } }
private void ThisAddIn_Startup (object sender, EventArgs e) { ComponentContainer.ConfigureServicePointManager(); ComponentContainer = new ComponentContainer (Application.Session); if (IsOutlookVersionSmallerThan2010) { try { _calDavSynchronizerToolBar = new CalDavSynchronizerToolBar (Application, ComponentContainer, missing); } catch (System.Exception ex) { MessageBox.Show (ex.Message); } } }
private void ThisAddIn_Startup (object sender, EventArgs e) { try { XmlConfigurator.Configure(); s_logger.Info ("Startup entered."); ComponentContainer = new ComponentContainer (Application); if (IsOutlookVersionSmallerThan2010) { _calDavSynchronizerToolBar = new CalDavSynchronizerToolBar (Application, ComponentContainer, missing); } s_logger.Info ("Startup exiting."); } catch (Exception x) { ExceptionHandler.Instance.HandleException (x, s_logger); } }
private void AddToolBarIfRequired() { if (!IsOutlookVersionSmallerThan2010) { return; } _activeExplorer = Application.ActiveExplorer(); if (_activeExplorer != null) { // For every explorer there has to be a toolbar created, but only the first toolbar is allowed to have wired events and only a reference to the first toolbar is stored var calDavSynchronizerToolBar = new CalDavSynchronizerToolBar(_activeExplorer, missing, _calDavSynchronizerToolBar == null); calDavSynchronizerToolBar.Settings = GeneralOptionsDataAccess.LoadToolBarSettings(); if (_calDavSynchronizerToolBar == null) { _calDavSynchronizerToolBar = calDavSynchronizerToolBar; ((ExplorerEvents_10_Event)_activeExplorer).Close += FirstExplorer_Close; } } }