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

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