Beispiel #1
0
 public void Add(UndoRedoCommand command)
 {
     undoStack.Push(command);
     redoStack.Clear();
     UpdateCommandStatus();
     _changeSinceSave = true;
 }
Beispiel #2
0
        public void Redo()
        {
            if (!CanRedo())
            {
                throw new InvalidOperationException();
            }
            UndoRedoCommand command = redoStack.Pop();

            undoStack.Push(command);
            command.Redo();
            UpdateCommandStatus();
            _changeSinceSave = true;
        }