// 撤销重做相关方法 public override void Undo(HCCustomUndoAction aUndoAction) { if (aUndoAction is HCItemSelfUndoAction) { HCUndoList vUndoList = (aUndoAction as HCItemSelfUndoAction).Object as HCUndoList; if (vUndoList != null) { vUndoList.Undo(); } else { base.Undo(aUndoAction); } } else { base.Undo(aUndoAction); } }
/// <summary> 撤销 </summary> public void Undo() { if (FUndoList.Enable) { try { FUndoList.Enable = false; BeginUpdate(); try { FUndoList.Undo(); } finally { EndUpdate(); } } finally { FUndoList.Enable = true; } } }