public void Redo() { if (this.redostack.Count > 0) { IUndoableOperation undoableOperation = (IUndoableOperation)this.redostack.Pop(); this.undostack.Push(undoableOperation); undoableOperation.Redo(); this.OnActionRedone(); } }
/// <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(); } }
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(); } }
internal void RunRedo(IUndoableOperation op) { if (op is IUndoableOperationWithContext opWithCtx) { opWithCtx.Redo(this); } else { op.Redo(); } }
internal void RunRedo(IUndoableOperation op) { IUndoableOperationWithContext opWithCtx = op as IUndoableOperationWithContext; if (opWithCtx != null) { opWithCtx.Redo(this); } else { op.Redo(); } }
/// <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(); } }
/// <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"); } } }
internal void RunRedo(IUndoableOperation op) { IUndoableOperationWithContext opWithCtx = op as IUndoableOperationWithContext; if (opWithCtx != null) opWithCtx.Redo(this); else op.Redo(); }