示例#1
0
        private void RedoCommandExecute(object obj)
        {
            inRedoCommand = true;

            if (redoChangeLog.Last() is DeleteStep)
            {
                undoChangeLog.Record(new NewStep((DeleteStep)redoChangeLog.Last()));
            }

            else if (redoChangeLog.Last() is NewStep)
            {
                undoChangeLog.Record(new DeleteStep((NewStep)redoChangeLog.Last()));
            }

            redoChangeLog.MakeStep();

            undoCommand.InvokeCanExecuteChanged();
            redoCommand.InvokeCanExecuteChanged();

            inRedoCommand = false;
        }