Exemplo n.º 1
0
        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;
            }
        }