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; }
internal static void xf1cbd48a28ce6e74(DockControl x43bec302f92080b9) { if (x43bec302f92080b9 == null) { throw new ArgumentNullException(); } ControlLayoutSystem layoutSystem = x43bec302f92080b9.LayoutSystem; bool flag; if (((flag ? 1 : 0) & 0) != 0 || layoutSystem == null) { return; } DockContainer dockContainer = layoutSystem.DockContainer; bool containsFocus = x43bec302f92080b9.ContainsFocus; if (false) { goto label_4; } else { goto label_15; } label_1: if (!containsFocus) { return; } if (x43bec302f92080b9.Manager == null) { if (((containsFocus ? 1 : 0) | 4) != 0) { return; } } else { goto label_9; } label_7: DockControl recentlyUsedWindow = x43bec302f92080b9.Manager.FindMostRecentlyUsedWindow(~DockSituation.None, x43bec302f92080b9); goto label_8; label_9: recentlyUsedWindow = x43bec302f92080b9.Manager.FindMostRecentlyUsedWindow(DockSituation.Document, x43bec302f92080b9); if (recentlyUsedWindow != null) { goto label_8; } else { goto label_7; } label_3: recentlyUsedWindow.x6d1b64d6c637a91d(true); return; label_4: if (true) { if (false) { goto label_3; } else { goto label_1; } } label_8: if (recentlyUsedWindow == null) { return; } goto label_3; label_15: if (containsFocus) { goto label_16; } label_12: layoutSystem.Controls.Remove(x43bec302f92080b9); while (layoutSystem.Controls.Count == 0) { LayoutUtilities.x4487f2f8917e3fd0(layoutSystem); if (true) { break; } } goto label_1; label_16: Form form = x43bec302f92080b9.FindForm(); if ((uint)containsFocus + (uint)containsFocus < 0U || form != null) { form.ActiveControl = (Control)null; goto label_12; } else { goto label_12; } }