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; }
//测量 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 but_celiang_Click(object sender, EventArgs e) { this.map_control.CurrentTool = null; ICommand pCommand = new ControlsMapMeasureTool(); pcommandTool(pCommand); }