要素选择变化事件 IActiveViewEvents_SelectionChanged

 

        void IDockableWindowDef.OnCreate(object hook)
        {
            m_application = hook as IApplication;
            m_hookHelper = new HookHelperClass();
            m_hookHelper.Hook = hook;
            try
            {
                ESRI.ArcGIS.Carto.IActiveViewEvents_Event activeViewEvents = m_hookHelper.ActiveView as ESRI.ArcGIS.Carto.IActiveViewEvents_Event;
                activeViewEvents.SelectionChanged += new ESRI.ArcGIS.Carto.IActiveViewEvents_SelectionChangedEventHandler(SelectedChanged);
            }
            catch (Exception exp)
            {
                ErrorForm errorForm = new ErrorForm(exp.Message +"\r\n"+ exp.StackTrace);
                errorForm.Show();
            }
        }

 

 private void SelectedChanged()
        {
…………………………
…………………………
        }

 

posted @ 2019-08-04 21:47  yzhyingcool  阅读(640)  评论(0编辑  收藏  举报