BeginAtomicUndo() private méthode

private BeginAtomicUndo ( OperationType operationType = OperationType.Undefined ) : void
operationType OperationType
Résultat void
			public UndoGroup (TextDocument doc, OperationType operationType)
			{
				if (doc == null)
					throw new ArgumentNullException ("doc");
				doc.BeginAtomicUndo (operationType);
				this.doc = doc;
			}
			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 ();
			}
Exemple #3
0
			public UndoGroup (TextDocument doc)
			{
				if (doc == null)
					throw new ArgumentNullException ("doc");
				this.doc = doc;
				doc.BeginAtomicUndo ();
			}
			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 ();
			}