Exemplo n.º 1
0
 public void Redo()
 {
     if (this.redostack.Count > 0)
     {
         IUndoableOperation undoableOperation = (IUndoableOperation)this.redostack.Pop();
         this.undostack.Push(undoableOperation);
         undoableOperation.Redo();
         this.OnActionRedone();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Call this method to redo the last undone operation
 /// </summary>
 public void Redo()
 {
     if (redostack.Count > 0)
     {
         IUndoableOperation uedit = (IUndoableOperation)redostack.Pop();
         undostack.Push(uedit);
         uedit.Redo();
         OnActionRedone();
     }
 }
Exemplo n.º 3
0
 public void Redo()
 {
     this.AssertNoUndoGroupOpen();
     if (this.redostack.Count > 0)
     {
         IUndoableOperation undoableOperation = this.redostack.Pop();
         this.undostack.Push(undoableOperation);
         undoableOperation.Redo();
         this.OnActionRedone();
     }
 }
 /// <summary>
 /// Redoes the last undone operation.
 /// </summary>
 public void Redo()
 {
     AssertNoUndoGroupOpen();
     if (redostack.Count > 0)
     {
         IUndoableOperation uedit = redostack.Pop();
         undostack.Push(uedit);
         uedit.Redo();
         OnActionRedone();
     }
 }
Exemplo n.º 5
0
 internal void RunRedo(IUndoableOperation op)
 {
     if (op is IUndoableOperationWithContext opWithCtx)
     {
         opWithCtx.Redo(this);
     }
     else
     {
         op.Redo();
     }
 }
Exemplo n.º 6
0
        internal void RunRedo(IUndoableOperation op)
        {
            IUndoableOperationWithContext opWithCtx = op as IUndoableOperationWithContext;

            if (opWithCtx != null)
            {
                opWithCtx.Redo(this);
            }
            else
            {
                op.Redo();
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// Call this method to redo the last undone operation
 /// </summary>
 public void Redo()
 {
     if (undoGroupDepth != 0)
     {
         throw new InvalidOperationException("cannot perform Undo/Redo while undo group is open");
     }
     if (redostack.Count > 0)
     {
         IUndoableOperation uedit = (IUndoableOperation)redostack.Pop();
         undostack.Push(uedit);
         uedit.Redo();
         OnActionRedone();
     }
 }
Exemplo n.º 8
0
 /// <summary>
 /// Call this method to redo the last undone operation
 /// </summary>
 public void Redo()
 {
     VerifyNoUndoGroupOpen();
     if (redostack.Count > 0)
     {
         lastGroupDescriptor = null;
         acceptChanges       = false;
         IUndoableOperation uedit = redostack.Pop();
         undostack.Push(uedit);
         uedit.Redo();
         acceptChanges = true;
         if (redostack.Count == 0)
         {
             NotifyPropertyChanged("CanRedo");
         }
         if (undostack.Count == 1)
         {
             NotifyPropertyChanged("CanUndo");
         }
     }
 }
Exemplo n.º 9
0
 internal void RunRedo(IUndoableOperation op)
 {
     IUndoableOperationWithContext opWithCtx = op as IUndoableOperationWithContext;
     if (opWithCtx != null)
         opWithCtx.Redo(this);
     else
         op.Redo();
 }