Пример #1
0
        protected DockControl()
        {
            if (_collapsedImage == null)
                _collapsedImage = Image.FromStream(typeof(DockControl).Assembly.GetManifestResourceStream("TD.SandDock.sanddock.png"));

            MetaData = new WindowMetaData();
            _dockingRules = CreateDockingRules();
            if (_dockingRules == null)
                throw new InvalidOperationException();
            SetStyle(ControlStyles.ResizeRedraw, true);
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            SetStyle(ControlStyles.Selectable, false);
            BackColor = SystemColors.Control;
            _floatingSize = DefaultSize;
        }
Пример #2
0
		internal static Struct0 smethod_14(SandDockManager manager, WindowMetaData metaData)
		{
			var dockContainers = manager.GetDockContainers(Convert(metaData.LastFixedDockSide));
			if (dockContainers.Length == 0)
			{
				var dockContainer = manager.CreateNewDockContainer(metaData.LastFixedDockSide, ContainerDockEdge.Inside, metaData.DockedContentSize);
				return new Struct0(dockContainer.LayoutSystem, 0);
			}
			if (dockContainers.Length >= metaData.DockedState.Int32_3 && metaData.DockedState.Int32_2 < dockContainers.Length && metaData.DockedState.Int32_2 != -1)
			{
				return LayoutUtilities.smethod_15(dockContainers[metaData.DockedState.Int32_2], metaData.DockedState.Int32_0);
			}
			if (metaData.DockedState.Int32_3 >= 2)
			{
				if (metaData.DockedState.Int32_2 == 0)
				{
					DockContainer dockContainer2 = manager.CreateNewDockContainer(metaData.LastFixedDockSide, ContainerDockEdge.Outside, metaData.DockedContentSize);
					return new Struct0(dockContainer2.LayoutSystem, 0);
				}
				if (metaData.DockedState.Int32_2 == metaData.DockedState.Int32_3 - 1)
				{
					DockContainer dockContainer3 = manager.CreateNewDockContainer(metaData.LastFixedDockSide, ContainerDockEdge.Inside, metaData.DockedContentSize);
					return new Struct0(dockContainer3.LayoutSystem, 0);
				}
			}
			if (dockContainers.Length != 0)
			{
				return LayoutUtilities.smethod_15(dockContainers[0], metaData.DockedState.Int32_0);
			}
			DockContainer dockContainer4 = manager.CreateNewDockContainer(metaData.LastFixedDockSide, ContainerDockEdge.Inside, metaData.DockedContentSize);
			return new Struct0(dockContainer4.LayoutSystem, 0);
		}
Пример #3
0
        internal static x5678bb8d80c0f12e x4689c8634e31fc55(
            SandDockManager x91f347c6e97f1846,
            WindowMetaData xfffbdea061bfa120)
        {
            DockContainer[] dockContainers = x91f347c6e97f1846.GetDockContainers(LayoutUtilities.xf8330a3964a419ba(xfffbdea061bfa120.LastFixedDockSide));
            if (dockContainers.Length != 0)
            {
                goto label_12;
            }
            else
            {
                goto label_15;
            }
label_3:
            if (dockContainers.Length != 0)
            {
                return(LayoutUtilities.x2f8f74d308cc9f3f(dockContainers[0], xfffbdea061bfa120.xe62a3d24e0fde928.x61743036ad30763d));
            }
            return(new x5678bb8d80c0f12e(x91f347c6e97f1846.CreateNewDockContainer(xfffbdea061bfa120.LastFixedDockSide, ContainerDockEdge.Inside, xfffbdea061bfa120.DockedContentSize).LayoutSystem, 0));

label_12:
            if (dockContainers.Length < xfffbdea061bfa120.xe62a3d24e0fde928.xd25c313925dc7d4e || xfffbdea061bfa120.xe62a3d24e0fde928.x71a5d248534c8557 >= dockContainers.Length)
            {
                goto label_5;
            }
            else
            {
                goto label_11;
            }
label_1:
            if (xfffbdea061bfa120.xe62a3d24e0fde928.x71a5d248534c8557 == xfffbdea061bfa120.xe62a3d24e0fde928.xd25c313925dc7d4e - 1)
            {
                return(new x5678bb8d80c0f12e(x91f347c6e97f1846.CreateNewDockContainer(xfffbdea061bfa120.LastFixedDockSide, ContainerDockEdge.Inside, xfffbdea061bfa120.DockedContentSize).LayoutSystem, 0));
            }
            goto label_3;
label_5:
            if (xfffbdea061bfa120.xe62a3d24e0fde928.xd25c313925dc7d4e >= 2)
            {
                if (xfffbdea061bfa120.xe62a3d24e0fde928.x71a5d248534c8557 == 0)
                {
                    return(new x5678bb8d80c0f12e(x91f347c6e97f1846.CreateNewDockContainer(xfffbdea061bfa120.LastFixedDockSide, ContainerDockEdge.Outside, xfffbdea061bfa120.DockedContentSize).LayoutSystem, 0));
                }
                goto label_1;
            }
            else
            {
                goto label_3;
            }
label_11:
            if (xfffbdea061bfa120.xe62a3d24e0fde928.x71a5d248534c8557 != -1)
            {
                return(LayoutUtilities.x2f8f74d308cc9f3f(dockContainers[xfffbdea061bfa120.xe62a3d24e0fde928.x71a5d248534c8557], xfffbdea061bfa120.xe62a3d24e0fde928.x61743036ad30763d));
            }
            if (false)
            {
                goto label_1;
            }
            else
            {
                goto label_5;
            }
label_15:
            while (true)
            {
                if (true)
                {
                    return(new x5678bb8d80c0f12e(x91f347c6e97f1846.CreateNewDockContainer(xfffbdea061bfa120.LastFixedDockSide, ContainerDockEdge.Inside, xfffbdea061bfa120.DockedContentSize).LayoutSystem, 0));
                }
            }
            goto label_3;
        }