public virtual void ShowPad(PadDescriptor content) { PadContentCollection.Add(content); if (layout != null) { layout.ShowPad(content); } }
/// <summary> /// Closes and disposes a <see cref="IPadContent"/>. /// </summary> public void UnloadPad(PadDescriptor content) { PadContentCollection.Remove(content); if (layout != null) { layout.UnloadPad(content); } content.Dispose(); }
public void ShowPad(PadDescriptor content) { if (content == null) { throw new ArgumentNullException("content"); } PadContentCollection.Add(content); if (layout != null) { layout.ShowPad(content); } }
public virtual void ShowPad(PadDescriptor content) { PadDescriptor hasPad = GetPad(content.GetType()); if (hasPad == null) { PadContentCollection.Add(content); } if (layout != null) { layout.ShowPad(content); } }
private void InitDockForm() { FormProperties formProperties = new FormProperties(); formProperties.Show(dockPanel, DockState.DockRight); PadContentCollection.Add(formProperties); FormsDesignerViewContent formsDVC = WorkbenchSingleton.Workbench.ActiveContent as FormsDesignerViewContent; if (formsDVC != null) { ToolboxService toolboxService = formsDVC.DesignSurface.GetService(typeof(IToolboxService)) as ToolboxService; FormToolBox formTool = new FormToolBox(toolboxService); formTool.Show(dockPanel, DockState.DockLeft); formTool.DockPanel.DockLeftPortion = 0.15; formTool.AutoHidePortion = 0.15; PadContentCollection.Add(formTool); } dockPanel.Documents.First().DockHandler.Activate(); }
public void UnloadPad(FormsDesigner.IPadContent content) { if (content == null) { return; } DockContent dockContent = content.Control as DockContent; if (dockContent == null) { dockContent = content.Control.Parent as DockContent; } dockContent.Close(); PadContentCollection.Remove(content); if (_layout != null) { _layout.UnloadPad(content); } content.Dispose(); }