protected override void OnShutdown()
        {
            if (m_bIsMap)
            {
                ArcMap.Events.NewDocument  -= ArcMap_NewOpenDocument;
                ArcMap.Events.OpenDocument -= ArcMap_NewOpenDocument;
            }

            s_extension = null;
            base.OnShutdown();
        }
        internal static CustomizeHelper GetExtension()
        {
            if (s_extension == null)
            {
                // Call FindExtension to load extension.
                UID id = new UIDClass();
                id.Value    = ThisAddIn.IDs.CustomizeHelper;
                s_extension = (CustomizeHelper)ArcMap.Application.FindExtensionByCLSID(id);
            }

            return(s_extension);
        }
        protected override void OnStartup()
        {
            s_extension = this;
            m_pApp      = (IApplication)ArcMap.Application;

            if (m_pApp == null)
            {
                return;
            }

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

            m_appStatusEvents              = m_pApp as IApplicationStatusEvents_Event;
            m_appStatusEvents.Initialized += new IApplicationStatusEvents_InitializedEventHandler(appStatusEvents_Initialized);

            m_pEd = (IEditor)ArcMap.Application.FindExtensionByName("esri object editor");

            //get the extension
            UID pUID = new UIDClass();

            pUID.Value   = "{114D685F-99B7-4B63-B09F-6D1A41A4DDC1}";
            m_pCadExtMan = (ICadastralExtensionManager2)ArcMap.Application.FindExtensionByCLSID(pUID);
        }
        internal static CustomizeHelper GetExtension()
        {
            if (s_extension == null)
              {
            // Call FindExtension to load extension.
            UID id = new UIDClass();
            id.Value = ThisAddIn.IDs.CustomizeHelper;
            s_extension = (CustomizeHelper)ArcMap.Application.FindExtensionByCLSID(id);
              }

              return s_extension;
        }
        protected override void OnStartup()
        {
            s_extension = this;
              m_pApp = (IApplication)ArcMap.Application;

              if (m_pApp == null)
            return;

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

              m_appStatusEvents = m_pApp as IApplicationStatusEvents_Event;
              m_appStatusEvents.Initialized += new IApplicationStatusEvents_InitializedEventHandler(appStatusEvents_Initialized);

              m_pEd = (IEditor)ArcMap.Application.FindExtensionByName("esri object editor");

              //get the extension
              UID pUID = new UIDClass();
              pUID.Value = "{114D685F-99B7-4B63-B09F-6D1A41A4DDC1}";
              m_pCadExtMan = (ICadastralExtensionManager2)ArcMap.Application.FindExtensionByCLSID(pUID);
        }
        protected override void OnShutdown()
        {
            if (m_bIsMap)
              {
            ArcMap.Events.NewDocument -= ArcMap_NewOpenDocument;
            ArcMap.Events.OpenDocument -= ArcMap_NewOpenDocument;
              }

              s_extension = null;
              base.OnShutdown();
        }