Exemple #1
0
        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);
        }
Exemple #2
0
 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);
 }
Exemple #3
0
 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;
 }