public void AddToolWindow(ToolWindow toolWindow, int toolWindowGroupIndex) { ToolWindowHost host; if (toolWindowGroupIndex != -1) { if (this.ToolWindowHosts.Count <= toolWindowGroupIndex) { toolWindowGroupIndex = this.ToolWindowHosts.Count - 1; } host = (ToolWindowHost) this._toolWindowHosts[toolWindowGroupIndex]; } else { host = new DockedToolWindowHost(this._toolWindowManager); if (this.ToolWindowHosts.Count != 0) { Splitter splitter = new Splitter(); splitter.Size = new Size(4, 4); splitter.Dock = host.Dock = this.ContainedControlDockStyle; base.Controls.Add(splitter); } this._toolWindowHosts.Add(host); base.Controls.Add(host); host.Visible = true; } host.AddToolWindow(toolWindow); }
public void AddToolWindow(ToolWindow toolWindow, bool makeActive) { TabPage page = new TabPage(); Icon icon = toolWindow.Icon; if (icon == null) { icon = Icon.FromHandle(new Bitmap(0x10, 0x10).GetHicon()); } this._toolWindowImages.Images.Add(icon); page.Text = toolWindow.ShortText; page.ToolTipText = toolWindow.Text; page.ImageIndex = this._toolWindowImages.Images.Count - 1; base.Tabs.Add(page); page.Controls.Add(toolWindow); toolWindow.EnsureActive += new EventHandler(this.OnToolWindowEnsureActive); if (makeActive || (base.Tabs.Count == 1)) { this.SelectedIndex = base.Tabs.Count - 1; base.Parent.Text = toolWindow.Text; } }
void IWindowManager.AddToolWindow(ToolWindow toolWindow, DockStyle dockEdge, int toolWindowGroupIndex) { if (toolWindow == null) { throw new ArgumentNullException("toolWindow"); } DockingContainer dockingContainer = this.GetDockingContainer(dockEdge); if (dockingContainer == null) { throw new ArgumentException("Window does not support docking on the specified edge", "dock"); } dockingContainer.AddToolWindow(toolWindow, toolWindowGroupIndex); }
void IWindowManager.AddToolWindow(ToolWindow toolWindow, DockStyle dockEdge) { ((IWindowManager) this).AddToolWindow(toolWindow, dockEdge, -1); }
public void AddToolWindow(ToolWindow toolWindow, bool makeActive) { this._toolWindowHolder.AddToolWindow(toolWindow, makeActive); }
public void AddToolWindow(ToolWindow toolWindow) { this.AddToolWindow(toolWindow, false); }