예제 #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);