private void stopEdit_ToolbarItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (pEngineEditor != null && pEngineEditor.HasEdits() == false) { pEngineEditor.StopEditing(false); } else { if (MessageBox.Show("Save Edits?", "Save Prompt", MessageBoxButtons.YesNo) == DialogResult.Yes) { pEngineEditor.StopEditing(true); } else { pEngineEditor.StopEditing(false); } } ICommand pcommand = new ControlsEditingStopCommand(); pcommand.OnCreate(m_mapControl.Object); pcommand.OnClick(); }
/// <summary> /// 保存编辑 /// </summary> public static void stopEdit(AxMapControl axMapControl) { if (axMapControl == null) { return; } ICommand stopEdit = new ControlsEditingStopCommand(); stopEdit.OnCreate(axMapControl.Object); stopEdit.OnClick(); }