private void mainMapControl_OnAfterDraw(object sender, IMapControlEvents2_OnAfterDrawEvent e) { //图层数为空或者所有图层均为空图层时停止编辑 if (this.mainMapControl.LayerCount == 0) { StopEditCommand cmd = new StopEditCommand(); cmd.Execute(null); } }
public void StopEdit() { StopEditCommand cmd = new StopEditCommand(); cmd.Execute(null); }