예제 #1
0
        public void Do(IOleUndoManager pUndoManager)
        {
            // docs say this can be null.
            if (pUndoManager != null)
            {
                // use this as the undo unit also.
                pUndoManager.Open(this);
            }

            var units = _children;

            _children = new List <IOleUndoUnit>();

            // Invoke child units in reverse order.
            for (var i = units.Count - 1; i >= 0; i--)
            {
                var child = units[i];
                child.Do(pUndoManager);
            }

            if (pUndoManager != null)
            {
                NativeMethods.ThrowOnFailure(pUndoManager.Close(this, 1));
            }
        }
예제 #2
0
        public void Do(IOleUndoManager pUndoManager)
        {
            // docs say this can be null.
            if (pUndoManager != null)
            {
                // use this as the undo unit also.
                pUndoManager.Open(this);
            }

            var units = _children;
            _children = new List<IOleUndoUnit>();

            // Invoke child units in reverse order.
            for (var i = units.Count - 1; i >= 0; i--)
            {
                var child = units[i];
                child.Do(pUndoManager);
            }

            if (pUndoManager != null)
            {
                NativeMethods.ThrowOnFailure(pUndoManager.Close(this, 1));
            }
        }
예제 #3
0
 public int Close(IOleParentUndoUnit pPUU, int fCommit)
 {
     return(_wrappedUndoManager.Close(pPUU, fCommit));
 }