protected override void OnStartup()
        {
            s_extension = this;

            ArcMap.Events.NewDocument  += ArcMap_NewOpenDocument;
            ArcMap.Events.OpenDocument += ArcMap_NewOpenDocument;

            Initialize();
        }
        protected override void OnClick()
        {
            IDockableWindow dockWindow = SF10_extMain.GetDockWindow();

            if (dockWindow == null)
            {
                return;
            }

            dockWindow.Show(!dockWindow.IsVisible());
        }
        protected override void OnShutdown()
        {
            Uninitialize();

            ArcMap.Events.NewDocument  -= ArcMap_NewOpenDocument;
            ArcMap.Events.OpenDocument -= ArcMap_NewOpenDocument;

            m_pApp      = null;
            m_pDoc      = null;
            s_extension = null;

            base.OnShutdown();
        }
        protected override void OnStartup()
        {
            s_extension = this;

            m_docEvents = ArcMap.Document as ESRI.ArcGIS.ArcMapUI.IDocumentEvents_Event;
            m_docEvents.NewDocument += new ESRI.ArcGIS.ArcMapUI.IDocumentEvents_NewDocumentEventHandler(ArcMap_NewOpenDocument);
            m_docEvents.OpenDocument += new ESRI.ArcGIS.ArcMapUI.IDocumentEvents_OpenDocumentEventHandler(ArcMap_NewOpenDocument);

            Initialize();
        }
        protected override void OnShutdown()
        {
            Uninitialize();

            if (m_docEvents != null)
            {
                m_docEvents.NewDocument -= new ESRI.ArcGIS.ArcMapUI.IDocumentEvents_NewDocumentEventHandler(ArcMap_NewOpenDocument);
                m_docEvents.OpenDocument -= new ESRI.ArcGIS.ArcMapUI.IDocumentEvents_OpenDocumentEventHandler(ArcMap_NewOpenDocument);
            }

            m_pApp = null;
            m_pDoc = null;
            m_docEvents = null;
            s_extension = null;

            base.OnShutdown();
        }
        protected override void OnStartup()
        {
            s_extension = this;

            ArcMap.Events.NewDocument += ArcMap_NewOpenDocument;
            ArcMap.Events.OpenDocument += ArcMap_NewOpenDocument;

            Initialize();
        }
        protected override void OnShutdown()
        {
            Uninitialize();

            ArcMap.Events.NewDocument -= ArcMap_NewOpenDocument;
            ArcMap.Events.OpenDocument -= ArcMap_NewOpenDocument;

            m_pApp = null;
            m_pDoc = null;
            s_extension = null;

            base.OnShutdown();
        }