//选择要素 private void btnSelFeat_Click(object sender, EventArgs e) { try { ICommand m_SelTool = new SelectFeatureToolClass(); m_SelTool.OnCreate(axMap.Object); m_SelTool.OnClick(); axMap.CurrentTool = m_SelTool as ITool; axMap.MousePointer = esriControlsMousePointer.esriPointerArrow; } catch (Exception ex) { } }
//要素选择 private void barButtonItem14_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { try { ICommand m_SelTool = new SelectFeatureToolClass(); m_SelTool.OnCreate(Variable.pMapFrm.mainMapControl.Object); m_SelTool.OnClick(); Variable.pMapFrm.mainMapControl.CurrentTool = m_SelTool as ITool; Variable.pMapFrm.mainMapControl.MousePointer = esriControlsMousePointer.esriPointerHand; } catch (Exception ex) { MessageBox.Show(ex.ToString(), "异常"); } }