public override void Redo (TextDocument doc, bool fireEvent = true) { doc.BeginAtomicUndo (operationType); try { foreach (UndoOperation operation in this.operations) { operation.Redo (doc, false); doc.OnRedone (new UndoOperationEventArgs (operation)); } } finally { doc.EndAtomicUndo (); } if (fireEvent) OnRedoDone (); }
public override void Undo (TextDocument doc, bool fireEvent = true) { doc.BeginAtomicUndo (operationType); try { for (int i = operations.Count - 1; i >= 0; i--) { operations [i].Undo (doc, false); doc.OnUndone (new UndoOperationEventArgs (operations [i])); } } finally { doc.EndAtomicUndo (); } if (fireEvent) OnUndoDone (); }