/// <summary> /// Close the current undo scope. This will add the current ParentUndoUnit to the wrapped IOleUndoManager. /// </summary> public void CloseParentUndoScope() { if (_parentUndoUnit != null) { _wrappedUndoManager.Add(_parentUndoUnit); _parentUndoUnit = null; } }
/// <summary> /// Start an undo scope. All Undo Units "Add()'d" to this undo manager between a StartParentUndoScope() and CloseParentUndoScope() /// will be added to a single ParentUndoUnit. /// </summary> public void StartParentUndoScope(string name) { Debug.Assert(_parentUndoUnit == null, "unexpected non-null value for _parentUndoUnit"); _parentUndoUnit = new ParentUndoUnit(name); }