Exemple #1
0
        public void Execute(IRevertibleCommand revertibleCommand)
        {
            lock (_lock)
            {
                NotifyBeforeUndoRedoCommandExecuted(new BeforeUndoRedoCommandExecutedEventHandlerArgs(UndoRedoExecutionCategory.NEW));

                revertibleCommand.Do();

                AddExecutedCommand(revertibleCommand);

                NotifyUndoRedoCommandExecuted(new UndoRedoCommandExecutedEventHandlerArgs(UndoRedoExecutionCategory.NEW));

                UpdateCanUndoCanRedo();
            }
        }
Exemple #2
0
        public void Execute(IRevertibleCommand revertibleCommand)
        {
            lock (_lock)
            {
                NotifyBeforeUndoRedoCommandExecuted(new BeforeUndoRedoCommandExecutedEventHandlerArgs(UndoRedoExecutionCategory.NEW));

                revertibleCommand.Do();

                AddExecutedCommand(revertibleCommand);

                NotifyUndoRedoCommandExecuted(new UndoRedoCommandExecutedEventHandlerArgs(UndoRedoExecutionCategory.NEW));

                UpdateCanUndoCanRedo();
            }
        }