要素选择变化事件 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() { ………………………… ………………………… }