Ejemplo n.º 1
0
        internal void x810df8ef88cf4bf2(
            SandDockManager x91f347c6e97f1846,
            ContainerDockLocation x9c911703d455884e,
            ContainerDockEdge x3e4dcab61996c9ea)
        {
            DockControl[] x9476096be9672d38 = this.x9476096be9672d38;
            int           num = 0;

            if ((uint)num + (uint)num >= 0U)
            {
                goto label_21;
            }
label_10:
            ControlLayoutSystem newLayoutSystem;
            DockContainer newDockContainer;

            do
            {
                if (!(this is ControlLayoutSystem))
                {
                    if (this.Parent != null)
                    {
                        this.Parent.LayoutSystems.Remove(this);
                    }
                }
                else
                {
                    goto label_11;
                }
label_7:
                newDockContainer = x91f347c6e97f1846.CreateNewDockContainer(x9c911703d455884e, x3e4dcab61996c9ea, num);
                if (newDockContainer is DocumentContainer)
                {
                    newLayoutSystem = newDockContainer.CreateNewLayoutSystem(this.WorkingSize);
                    newDockContainer.LayoutSystem.LayoutSystems.Add((LayoutSystemBase)newLayoutSystem);
                    if (this is SplitLayoutSystem)
                    {
                        ((SplitLayoutSystem)this).MoveToLayoutSystem(newLayoutSystem);
                        continue;
                    }
                    goto label_2;
                }
                else
                {
                    goto label_3;
                }
label_11:
                if (true)
                {
                    LayoutUtilities.x4487f2f8917e3fd0((ControlLayoutSystem)this);
                    if (false)
                    {
                        goto label_7;
                    }
                    else
                    {
                        goto label_7;
                    }
                }
                else
                {
                    goto label_1;
                }
            }while ((uint)num > uint.MaxValue);
            goto label_15;
label_2:
            newLayoutSystem.Controls.AddRange(this.x9476096be9672d38);
            return;

label_3:
            newDockContainer.LayoutSystem.LayoutSystems.Add(this);
            return;

label_1:
            return;

label_15:
            if ((uint)num - (uint)num >= 0U)
            {
                ;
            }
            return;

label_21:
            if ((uint)num < 0U || x9476096be9672d38.Length > 0)
            {
                goto label_22;
            }
label_19:
            Rectangle rectangle;

            do
            {
                rectangle = xedb4922162c60d3d.x41c62f474d3fb367(x91f347c6e97f1846.DockSystemContainer);
                do
                {
                    switch (x9c911703d455884e)
                    {
                    case ContainerDockLocation.Left:
                        goto label_18;

                    case ContainerDockLocation.Right:
                        continue;

                    case ContainerDockLocation.Top:
                        goto label_14;

                    default:
                        goto label_13;
                    }
                }while (false);
label_18:
                num = Math.Min(num, Convert.ToInt32((double)rectangle.Width * 0.9));
            }while ((num & 0) != 0);
            goto label_10;
label_9:
            if (x9c911703d455884e == ContainerDockLocation.Bottom)
            {
                goto label_14;
            }
            else
            {
                goto label_10;
            }
label_13:
            if (true)
            {
                goto label_9;
            }
label_14:
            num = Math.Min(num, Convert.ToInt32((double)rectangle.Height * 0.9));
            if ((uint)num >= 0U)
            {
                goto label_10;
            }
            else
            {
                goto label_9;
            }
label_22:
            num = x9476096be9672d38[0].MetaData.DockedContentSize;
            goto label_19;
        }
Ejemplo n.º 2
0
 internal void method_2(SandDockManager sandDockManager_0, ContainerDockLocation containerDockLocation_0, ContainerDockEdge containerDockEdge_0)
 {
     DockControl[] dockControl_ = DockControls;
     int num = 0;
     if (dockControl_.Length > 0)
     {
         num = dockControl_[0].MetaData.DockedContentSize;
     }
     Rectangle rectangle = Class7.smethod_1(sandDockManager_0.DockSystemContainer);
     if (containerDockLocation_0 != ContainerDockLocation.Left)
     {
         if (containerDockLocation_0 != ContainerDockLocation.Right)
         {
             if (containerDockLocation_0 != ContainerDockLocation.Top && containerDockLocation_0 != ContainerDockLocation.Bottom)
             {
                 goto IL_7C;
             }
             num = Math.Min(num, Convert.ToInt32(rectangle.Height * 0.9));
             goto IL_7C;
         }
     }
     num = Math.Min(num, Convert.ToInt32(rectangle.Width * 0.9));
     IL_7C:
     if (!(this is ControlLayoutSystem))
     {
         Parent?.LayoutSystems.Remove(this);
     }
     else
     {
         LayoutUtilities.smethod_10((ControlLayoutSystem)this);
     }
     DockContainer dockContainer = sandDockManager_0.CreateNewDockContainer(containerDockLocation_0, containerDockEdge_0, num);
     if (!(dockContainer is DocumentContainer))
     {
         dockContainer.LayoutSystem.LayoutSystems.Add(this);
         return;
     }
     var controlLayoutSystem = dockContainer.CreateNewLayoutSystem(WorkingSize);
     dockContainer.LayoutSystem.LayoutSystems.Add(controlLayoutSystem);
     if (this is SplitLayoutSystem)
     {
         ((SplitLayoutSystem)this).MoveToLayoutSystem(controlLayoutSystem);
         return;
     }
     controlLayoutSystem.Controls.AddRange(DockControls);
 }
Ejemplo n.º 3
0
 public DockContainer CreateNewDockContainer(ContainerDockLocation dockLocation, ContainerDockEdge edge, int contentSize)
 {
     EnsureDockSystemContainer();
     DockSystemContainer.SuspendLayout();
     DockContainer result;
     try
     {
         var dockContainer = CreateNewDockContainerCore(dockLocation);
         dockContainer.Manager = this;
         var dockStyle = LayoutUtilities.Convert(dockLocation);
         dockContainer.Dock = dockStyle;
         dockContainer.ContentSize = contentSize;
        // IntPtr arg_3B_0 = dockContainer.Handle;
         var newIndex = dockLocation != ContainerDockLocation.Center ? (edge == ContainerDockEdge.Inside ? GetInsideControlIndex(DockSystemContainer)
                 : GetOutsideControlIndex(DockSystemContainer, dockStyle)) : 0;
         DockSystemContainer.Controls.Add(dockContainer);
         DockSystemContainer.Controls.SetChildIndex(dockContainer, newIndex);
         foreach (var control2 in DockSystemContainer.Controls.Cast<Control>().Select(control => control as PopupContainer))
             control2?.BringToFront();
         result = dockContainer;
     }
     finally
     {
         DockSystemContainer.ResumeLayout();
     }
     return result;
 }
Ejemplo n.º 4
0
 public void DockInNewContainer(ContainerDockLocation dockLocation, ContainerDockEdge edge)
 {
     method_10();
     Remove();
     var dockContainer = Manager.CreateNewDockContainer(dockLocation, edge, MetaData.DockedContentSize);
     var layoutSystem = dockContainer.CreateNewLayoutSystem(this, FloatingSize);
     dockContainer.LayoutSystem.LayoutSystems.Add(layoutSystem);
 }