public PersistableObjectCollectionDockContent(IActivateItems activator, IObjectCollectionControl control, IPersistableObjectCollection collection) : base(activator.RefreshBus) { _control = control; //tell the control what it's collection is control.SetCollection(activator, collection); //ask the control what it wants its name to be TabText = _control.GetTabName(); }
public override void HandleUserRequestingTabRefresh(IActivateItems activator) { var collection = _control.GetCollection(); foreach (var o in collection.DatabaseObjects) { var revertable = o as IRevertable; if (revertable != null) { revertable.RevertToDatabaseState(); } } _control.SetCollection(activator, collection); }