public void DockPanel(FloatPanel panel) { if (DockSuggestion == null) return; panel.SuspendLayout(); _form.SuspendLayout(); if (DockSuggestion.LayoutSplit != null) { var panelSize = panel.Size; var multiSplitParent = DockSuggestion.LayoutSplit.Parent as MultiSplitContainer; if (multiSplitParent != null) { AddPanelToSplitContainer(multiSplitParent, panel.ChildPanel, DockSuggestion.LayoutSplit.Index); } } else if (DockSuggestion.JoinPanel is IdeGroupedPanel groupedPanel) { groupedPanel.AddPanel(panel.ChildPanel, true); } else { JoinPanels(DockSuggestion.JoinPanel, panel.ChildPanel); } _form.ResumeLayout(); panel.ResumeLayout(); panel.Close(); panel.Dispose(); _form.Focus(); DockSuggestion = null; }
protected void CreateFloatPanel(IdePanel panel, Point? location = null, Size? size = null) { var floatPanel = new FloatPanel(this); floatPanel.SuspendLayout(); floatPanel.SetChildPanel(panel); floatPanel.Show(_form); if (location.HasValue) floatPanel.Location = location.Value; if (size.HasValue) floatPanel.Size = size.Value; floatPanel.ResumeLayout(); }