public void Submit(UndoItem op) { if (op.DoCommand()) { _undoManager.AddUndoItem(op); _Modified = true; } }
public void Redo() { if (redoStack.Count > 0) { UndoItem op = redoStack.Pop(); op.Redo(); undoStack.Push(op); } }
public void Undo() { if (undoStack.Count > 0) { UndoItem op = undoStack.Pop(); op.Undo(); redoStack.Push(op); } }
public void AddUndoItem(UndoItem op) { undoStack.Push(op); redoStack.Clear(); }