Esempio n. 1
0
 //添加要素
 private void btnAddFeature_Click(object sender, EventArgs e)
 {
     try
     {
         ICommand m_CreateFeatTool = new CreateFeatureToolClass();
         m_CreateFeatTool.OnCreate(axMap.Object);
         m_CreateFeatTool.OnClick();
         axMap.CurrentTool  = m_CreateFeatTool as ITool;
         axMap.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
     }
     catch (Exception ex)
     {
     }
 }
 //添加要素
 private void barButtonItem12_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         //Variable.pMapFrm.mainMapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
         ICommand m_CreateFeatTool = new CreateFeatureToolClass();
         m_CreateFeatTool.OnCreate(Variable.pMapFrm.mainMapControl.Object);
         m_CreateFeatTool.OnClick();
         Variable.pMapFrm.mainMapControl.CurrentTool  = m_CreateFeatTool as ITool;
         Variable.pMapFrm.mainMapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.ToString(), "异常");
     }
 }