Exemplo n.º 1
0
        public override void Execute()
        {
            base.Execute();
            UndoManager manager = DrawingEditor.UndoManager;

            if ((manager == null) || manager.Redoable == false)
            {
                return;
            }

            IUndoActivity lastRedoable = manager.PopRedo();
            // Execute redo
            bool hasBeenRedone = lastRedoable.Redo();

            // Add to undo stack
            if (hasBeenRedone && lastRedoable.Undoable)
            {
                manager.PushUndo(lastRedoable);
            }
        }