Example #1
0
 private static void MergeNestedPanes(VisibleNestedPaneCollection nestedPanesFrom, NestedPaneCollection nestedPanesTo, DockPane prevPane, DockAlignment alignment, double proportion)
 {
     if (nestedPanesFrom.Count != 0)
     {
         int             count  = nestedPanesFrom.Count;
         DockPane[]      array  = new DockPane[count];
         DockPane[]      array2 = new DockPane[count];
         DockAlignment[] array3 = new DockAlignment[count];
         double[]        array4 = new double[count];
         for (int i = 0; i < count; i++)
         {
             array[i]  = nestedPanesFrom[i];
             array2[i] = nestedPanesFrom[i].NestedDockingStatus.PreviousPane;
             array3[i] = nestedPanesFrom[i].NestedDockingStatus.Alignment;
             array4[i] = nestedPanesFrom[i].NestedDockingStatus.Proportion;
         }
         DockPane dockPane = array[0].DockTo(nestedPanesTo.Container, prevPane, alignment, proportion);
         array[0].DockState = nestedPanesTo.DockState;
         for (int i = 1; i < count; i++)
         {
             for (int j = i; j < count; j++)
             {
                 if (array2[j] == array[i - 1])
                 {
                     array2[j] = dockPane;
                 }
             }
             dockPane           = array[i].DockTo(nestedPanesTo.Container, array2[i], array3[i], array4[i]);
             array[i].DockState = nestedPanesTo.DockState;
         }
     }
 }
Example #2
0
 internal NestedPaneCollection(INestedPanesContainer container)
     : base((IList <DockPane>) new List <DockPane>())
 {
     m_container          = container;
     m_visibleNestedPanes = new VisibleNestedPaneCollection(this);
 }