public void UndoLastOperation() { if (!_undoStack.IsEmpty) { UndoableOperation <TClass> undoableOperation = _undoStack.Pop(); Undone(this, new GenericEventArgs <UndoableOperation <TClass> >(undoableOperation)); undoableOperation.Implementor.Undo(undoableOperation.Command); } }
public void AddOperation(UndoableOperation <TClass> operation) { Added(this, new GenericEventArgs <UndoableOperation <TClass> >(operation)); _undoStack.Push(operation); }