private DockPane FindPane(IDockableForm form) { if (DockPanel == null) { return(null); } int iPane = DockPanel.Panes.IndexOf(pane => !pane.IsHidden && pane.Contents.Contains(form)); return(iPane != -1 ? DockPanel.Panes[iPane] : null); }
private DockPane FindPane(IDockableForm dockableForm) { // Floating panes may be created but hidden for windows that allow floating int iPane = dockPanel.Panes.IndexOf(pane => !pane.IsHidden && pane.Contents.Contains(dockableForm)); return (iPane != -1 ? dockPanel.Panes[iPane] : null); }
private DockPane FindChromatogramPane(GraphChromatogram graphChrom, out IDockableForm formBefore) { foreach (var pane in dockPanel.Panes) { foreach (IDockableForm form in pane.Contents) { if (form is GraphChromatogram && (graphChrom == null || graphChrom == form)) { formBefore = form; return pane; } } } formBefore = null; return null; }