示例#1
0
 /// <summary>
 /// Find largest pane
 /// </summary>
 /// <remarks>largest by hypotenuse</remarks>
 private void _FindLargestPane(ref Size maxSize, ref DockablePane largestPane)
 {
     for (int index = 0; index < _children.Count; ++index)
     {
         Composition child = _children[index];
         if (child.Type != CompositionType.Terminal)
         {
             child._FindLargestPane(ref maxSize, ref largestPane);
         }
         else
         {
             Size sz = child._CalculateSpaceSize();
             if (_CalculateHypotenuse(maxSize) < _CalculateHypotenuse(sz))
             {
                 largestPane = child.AttachedPane;
                 maxSize     = sz;
             }
         }
     }
 }