//测量 private void Btn_Measure_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { ICommand Cmd = new ControlsMapMeasureTool(); Cmd.OnCreate(this.axMapControl1.Object); this.axMapControl1.CurrentTool = Cmd as ITool; }
private void measure_mapToolbarItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { ICommand measureTool = new ControlsMapMeasureTool(); measureTool.OnCreate(m_mapControl.Object); m_mapControl.CurrentTool = measureTool as ITool; }