Пример #1
0
        public void Redo(int numberOfRedos = 1)
        {
            for (int i = 0; i < numberOfRedos; i++)
            {
                var command = stack.Redo();
                if (command == null)
                {
                    throw new ApplicationException();
                }

                command.Execute();
                RaiseOperationExecuted(command, ExecutionOperation.Redo);
            }
        }
Пример #2
0
        public void Redo(int numberOfRedos = 1)
        {
            for (int i = 0; i < numberOfRedos; i++)
            {
                var command = stack.Redo();
                if (command == null)
                {
                    throw new ApplicationException();
                }

                command.Execute();
                RaiseOperationExecuted(command, CommandOperation.Redo);

                if (stack.RedoItems().Count > 0 && stack.RedoItems().First().isImplicit)
                {
                    i--; // Do not increase redo counter if next command is implicit
                }
            }
        }
Пример #3
0
 public RedoButton(IUndoRedoStack undoRedoStack, string description, string image, bool isEnabled)
     : base(new Command(() => { undoRedoStack.Redo(); }), description, image, isEnabled);