Пример #1
0
        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, ComponentContainer, missing, _calDavSynchronizerToolBar == null);
                calDavSynchronizerToolBar.Settings = ComponentContainer.LoadToolBarSettings();
                if (_calDavSynchronizerToolBar == null)
                {
                    _calDavSynchronizerToolBar = calDavSynchronizerToolBar;
                    ((ExplorerEvents_10_Event)_activeExplorer).Close += FirstExplorer_Close;
                }
            }
        }