public PersistableObjectCollectionDockContent Activate(IObjectCollectionControl collectionControl, IPersistableObjectCollection objectCollection) { var floatable = WindowFactory.Create(this, collectionControl, objectCollection, null); floatable.Show(_mainDockPanel, DockState.Document); return(floatable); }
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 PersistableObjectCollectionDockContent Create(IActivateItems activator, IObjectCollectionControl control, IPersistableObjectCollection objectCollection, Bitmap image) { //create a new persistable docking tab var content = new PersistableObjectCollectionDockContent(activator,control,objectCollection); //add the control to the tab AddControlToDockContent(activator,(Control)control, content,content.TabText, image); //add to the window tracker _windowManager.AddWindow(content); //return the tab return content; }