private void CreatePluginCollapsiblePanel(ISharpPlugin plugin) { var panelContents = plugin.GuiControl; if (panelContents != null) { panelContents.Padding = new Padding(0, 20, 0, 0); var newPanel = new CollapsiblePanel.CollapsiblePanel(); newPanel.PanelTitle = plugin.DisplayName + " (Plugin)"; newPanel.PanelState = CollapsiblePanel.PanelStateOptions.Collapsed; newPanel.Controls.Add(panelContents); if (displayCollapsiblePanel.NextPanel == null) { displayCollapsiblePanel.NextPanel = newPanel; } else { newPanel.NextPanel = displayCollapsiblePanel.NextPanel; displayCollapsiblePanel.NextPanel = newPanel; } newPanel.Width = displayCollapsiblePanel.Width; newPanel.ExpandedHeight = panelContents.Height; panelContents.Width = newPanel.Width; controlPanel.Controls.Add(newPanel); } }
private void CreatePluginCollapsiblePanel(ISharpPlugin plugin) { UserControl guiControl = plugin.GuiControl; if (guiControl == null) return; CollapsiblePanel collapsiblePanel1 = new CollapsiblePanel(); collapsiblePanel1.PanelTitle = plugin.DisplayName + " *"; collapsiblePanel1.Content.Controls.Add((Control) guiControl); collapsiblePanel1.Height = guiControl.Height; collapsiblePanel1.Width = this.fftCollapsiblePanel.Width; collapsiblePanel1.PanelState = PanelStateOptions.Collapsed; guiControl.Dock = DockStyle.Fill; CollapsiblePanel collapsiblePanel2 = this.fftCollapsiblePanel; while (collapsiblePanel2.NextPanel != null) collapsiblePanel2 = collapsiblePanel2.NextPanel; collapsiblePanel2.NextPanel = collapsiblePanel1; this.controlPanel.Controls.Add((Control) collapsiblePanel1); }