private void JoinPanels(IdePanel existingPanel, IdePanel newPanel, int newIndex = 1) { var parent = existingPanel.Parent; var groupedPanel = new IdeGroupedPanel {Dock = DockStyle.Fill}; groupedPanel.AddPanel(newPanel); groupedPanel.AddPanel(existingPanel, false, newIndex > 0 ? 0 : 1); parent.Controls.Add(groupedPanel); }
private void AddPanelGroup(List <string> panels, Action <IdePanel> add, Dictionary <string, Control> modules) { if (panels.Count > 1) { var groupedPanel = new IdeGroupedPanel(); add(groupedPanel); add = p => groupedPanel.AddPanel(p); } foreach (var moduleName in panels) { var module = modules.ContainsKey(moduleName) ? modules[moduleName] : null; if (module == null) { continue; } var panel = GetPanel(module); add(panel); OnPanelStatusChanged(panel, true); } }