protected override void OnActivate()
        {
            ConfigUtil.type      = "address";
            m_editor.CurrentTask = null;
            m_targetLayer        = ((IFeatureLayer)m_editor.CurrentTemplate.Layer);
            m_className          = Globals.getClassName(m_targetLayer);

            m_edSketch = m_editor as IEditSketch3;
            m_edSketch.GeometryType = esriGeometryType.esriGeometryMultipoint;
            // Activate a shape constructor based on the current sketch geometry
            if (m_edSketch.GeometryType == esriGeometryType.esriGeometryPoint | m_edSketch.GeometryType == esriGeometryType.esriGeometryMultipoint)
            {
                m_csc = new PointConstructorClass();
            }
            else
            {
                m_csc = new StraightConstructorClass();
            }

            m_csc.Initialize(m_editor);
            m_edSketch.ShapeConstructor = m_csc;
            m_csc.Activate();

            // Setup events
            m_editEvents.OnSketchModified           += OnSketchModified;
            m_editEvents5.OnShapeConstructorChanged += OnShapeConstructorChanged;
            m_editEvents.OnSketchFinished           += OnSketchFinished;

            // Initialize address map tip
            m_addressMaptip = new AddressMapTip();
            var mxPtr = new IntPtr(ArcMap.Application.hWnd);

            m_addressMaptip.Show(Control.FromHandle(mxPtr));
            m_addressMaptip.Visible = false;
        }
        protected override bool OnDeactivate()
        {
            m_editEvents.OnSketchModified           -= OnSketchModified;
            m_editEvents5.OnShapeConstructorChanged -= OnShapeConstructorChanged;
            m_editEvents.OnSketchFinished           -= OnSketchFinished;

            // Destroy address map tip
            m_addressMaptip.Close();
            m_addressMaptip = null;
            m_settings.Save();

            return(true);
        }