コード例 #1
0
ファイル: LayoutUtilities.cs プロジェクト: javagg/DemoDock
		internal static void smethod_10(ControlLayoutSystem layoutSystem)
		{
		    if (layoutSystem == null)
		        throw new ArgumentNullException();

		    var dockContainer = layoutSystem.DockContainer;
		    if (layoutSystem.AutoHideBar != null && layoutSystem.AutoHideBar.LayoutSystem == layoutSystem)
		        layoutSystem.AutoHideBar.method_6(true);

            if (layoutSystem.Parent == null) return;

		    layoutSystem.Parent.LayoutSystems.Remove(layoutSystem);
		    if (dockContainer != null && dockContainer.method_8() && (!(dockContainer is DocumentContainer) || dockContainer.Manager == null || !dockContainer.Manager.EnableEmptyEnvironment))
		        dockContainer.Dispose();
		}
コード例 #2
0
ファイル: AutoHideBar.cs プロジェクト: javagg/DemoDock
		    public int Add(ControlLayoutSystem layout) => List.Add(layout);
コード例 #3
0
ファイル: AutoHideBar.cs プロジェクト: javagg/DemoDock
			public bool Contains(ControlLayoutSystem layout) => List.Contains(layout);
コード例 #4
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 private DockTarget method_21(DockContainer container, ControlLayoutSystem layoutSystem)
 {
     return new DockTarget(DockTargetType.SplitExistingSystem)
     {
         dockContainer = container,
         layoutSystem = layoutSystem
     };
 }
コード例 #5
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 internal Rectangle method_20(DockContainer container, ControlLayoutSystem layoutSystem, DockSide dockSide)
 {
     var result = new Rectangle(container.PointToScreen(layoutSystem.Bounds.Location), layoutSystem.Bounds.Size);
     switch (dockSide)
     {
         case DockSide.Top:
             result.Height /= 2;
             break;
         case DockSide.Bottom:
             result.Offset(0, result.Height / 2);
             result.Height /= 2;
             break;
         case DockSide.Left:
             result.Width /= 2;
             break;
         case DockSide.Right:
             result.Offset(result.Width / 2, 0);
             result.Width /= 2;
             break;
     }
     return result;
 }
コード例 #6
0
ファイル: DockControl.cs プロジェクト: javagg/DemoDock
 internal void method_16(ControlLayoutSystem layoutSystem)
 {
     LayoutSystem = layoutSystem;
 }
コード例 #7
0
ファイル: SplitLayoutSystem.cs プロジェクト: javagg/DemoDock
		public void MoveToLayoutSystem(ControlLayoutSystem layoutSystem)
		{
			MoveToLayoutSystem(layoutSystem, 0);
		}
コード例 #8
0
ファイル: LayoutUtilities.cs プロジェクト: javagg/DemoDock
		internal static int[] smethod_5(ControlLayoutSystem controlLayoutSystem_0)
		{
			ArrayList arrayList = new ArrayList();
			for (LayoutSystemBase layoutSystemBase = controlLayoutSystem_0; layoutSystemBase != null; layoutSystemBase = layoutSystemBase.Parent)
			{
			    if (layoutSystemBase.Parent != null)
			        arrayList.Add(layoutSystemBase.Parent.LayoutSystems.IndexOf(layoutSystemBase));
			}
			arrayList.Reverse();
			return (int[])arrayList.ToArray(typeof(int));
		}
コード例 #9
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 private DockTarget method_14(DockContainer dockContainer_1, ControlLayoutSystem controlLayoutSystem_1, Point point_1)
 {
     DockTarget dockTarget = null;
     Point point = dockContainer_1.PointToClient(point_1);
     var rectangle_ = controlLayoutSystem_1.rectangle_3;
     if (new Rectangle(rectangle_.Left, rectangle_.Top, rectangle_.Width, 30).Contains(point))
     {
         dockTarget = method_21(dockContainer_1, controlLayoutSystem_1);
         if (point.X >= rectangle_.Left + 30)
         {
             if (point.X > rectangle_.Right - 30)
             {
                 method_17(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
             }
             else
             {
                 method_19(dockContainer_1, controlLayoutSystem_1, dockTarget, DockSide.Top);
             }
         }
         else
         {
             method_18(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
         }
     }
     else if (new Rectangle(rectangle_.Left, rectangle_.Top, 30, rectangle_.Height).Contains(point))
     {
         dockTarget = method_21(dockContainer_1, controlLayoutSystem_1);
         if (point.Y >= rectangle_.Top + 30)
         {
             if (point.Y <= rectangle_.Bottom - 30)
             {
                 method_19(dockContainer_1, controlLayoutSystem_1, dockTarget, DockSide.Left);
             }
             else
             {
                 method_16(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
             }
         }
         else
         {
             method_18(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
         }
     }
     else if (!new Rectangle(rectangle_.Right - 30, rectangle_.Top, 30, rectangle_.Height).Contains(point))
     {
         if (new Rectangle(rectangle_.Left, rectangle_.Bottom - 30, rectangle_.Width, 30).Contains(point))
         {
             dockTarget = method_21(dockContainer_1, controlLayoutSystem_1);
             if (point.X >= rectangle_.Left + 30)
             {
                 if (point.X <= rectangle_.Right - 30)
                 {
                     method_19(dockContainer_1, controlLayoutSystem_1, dockTarget, DockSide.Bottom);
                 }
                 else
                 {
                     method_15(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
                 }
             }
             else
             {
                 method_16(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
             }
         }
     }
     else
     {
         dockTarget = method_21(dockContainer_1, controlLayoutSystem_1);
         if (point.Y >= rectangle_.Top + 30)
         {
             if (point.Y <= rectangle_.Bottom - 30)
             {
                 method_19(dockContainer_1, controlLayoutSystem_1, dockTarget, DockSide.Right);
             }
             else
             {
                 method_15(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
             }
         }
         else
         {
             method_17(dockContainer_1, controlLayoutSystem_1, dockTarget, rectangle_, point);
         }
     }
     return dockTarget;
 }
コード例 #10
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 protected DockTarget method_13(DockContainer dockContainer_1, ControlLayoutSystem controlLayoutSystem_1, Point point_1, bool bool_2)
 {
     DockTarget dockTarget = new DockTarget(DockTargetType.Undefined);
     Point point = dockContainer_1.PointToClient(point_1);
     if (SourceControl != null || controlLayoutSystem_1 != SourceControlSystem)
     {
         if (controlLayoutSystem_1.Rectangle_0.Contains(point) || controlLayoutSystem_1.rectangle_2.Contains(point))
         {
             dockTarget = new DockTarget(DockTargetType.JoinExistingSystem)
             {
                 dockContainer = dockContainer_1,
                 layoutSystem = controlLayoutSystem_1,
                 DockSide = DockSide.None,
                 Bounds = new Rectangle(dockContainer_1.PointToScreen(controlLayoutSystem_1.Bounds.Location),
                         controlLayoutSystem_1.Bounds.Size)
             };
             dockTarget.index = !controlLayoutSystem_1.rectangle_2.Contains(point) ? controlLayoutSystem_1.Controls.Count : controlLayoutSystem_1.method_15(point);
         }
         if (dockTarget.type == DockTargetType.Undefined && bool_2)
         {
             dockTarget = method_14(dockContainer_1, controlLayoutSystem_1, point_1);
         }
         return dockTarget;
     }
     return controlLayoutSystem_1.Rectangle_0.Contains(point) ? new DockTarget(DockTargetType.None) : new DockTarget(DockTargetType.Undefined);
 }
コード例 #11
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 private ControlLayoutSystem[] method_10()
 {
     ArrayList arrayList = new ArrayList();
     var array = Manager != null ? Manager.GetDockContainers() : new[] { Container };
     foreach (var dockContainer in array)
     {
         bool isFloating = dockContainer.IsFloating;
         bool flag = dockContainer.Dock == DockStyle.Fill && !dockContainer.IsFloating;
         bool flag2 = Container.Dock == DockStyle.Fill && !Container.IsFloating;
         if ((!isFloating || SourceControlSystem.DockContainer != dockContainer ||
              !(SourceControlSystem is SplitLayoutSystem)) &&
             (!isFloating || AllowFloat || SourceControlSystem.DockContainer == dockContainer) &&
             (isFloating || method_5(LayoutUtilities.Convert(dockContainer.Dock))) && (!flag || flag2) &&
             (!flag2 || Container == dockContainer))
             method_11(dockContainer, arrayList);
     }
     var array3 = new ControlLayoutSystem[arrayList.Count];
     arrayList.CopyTo(array3, 0);
     return array3;
 }
コード例 #12
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 public Form4(Class8 manager, ControlLayoutSystem layoutSystem) : this()
 {
     _manager = manager;
     _layoutSystem = layoutSystem;
     Rectangle_5 = new Rectangle(layoutSystem.DockContainer.PointToScreen(layoutSystem.Bounds.Location), layoutSystem.Bounds.Size);
     Rectangle_5 = new Rectangle(Rectangle_5.X + Rectangle_5.Width / 2 - 44, Rectangle_5.Y + Rectangle_5.Height / 2 - 44, 88, 88);
     method_1();
 }
コード例 #13
0
 internal DockControlCollection(ControlLayoutSystem parent)
 {
     _parent = parent;
 }
コード例 #14
0
		public void Dock(ControlLayoutSystem layoutSystem, int index)
		{
		    if (layoutSystem == null)
		        throw new ArgumentNullException();
		    if (Parent != null)
		        throw new InvalidOperationException("This layout system already has a parent. To remove it, use the parent layout system's LayoutSystems.Remove method.");

            DockControl selectedControl = SelectedControl;
			while (Controls.Count != 0)
			{
				DockControl control = Controls[0];
				Controls.RemoveAt(0);
				layoutSystem.Controls.Insert(index, control);
			}
		    if (selectedControl != null)
		        layoutSystem.SelectedControl = selectedControl;
		}
コード例 #15
0
		public void Dock(ControlLayoutSystem layoutSystem)
		{
		    if (layoutSystem == null)
		        throw new ArgumentNullException();
		    Dock(layoutSystem, 0);
		}
コード例 #16
0
ファイル: AutoHideBar.cs プロジェクト: javagg/DemoDock
		    public void Remove(ControlLayoutSystem layout) => List.Remove(layout);
コード例 #17
0
ファイル: AutoHideBar.cs プロジェクト: javagg/DemoDock
		internal void method_0(ControlLayoutSystem controlLayoutSystem_1)
		{
			method_2();
		    if (LayoutSystem == controlLayoutSystem_1)
		        _popupContainer.PerformLayout();
		}
コード例 #18
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 private void method_15(DockContainer dockContainer_1, ControlLayoutSystem controlLayoutSystem_1, DockTarget dockTarget_1, Rectangle rectangle_1, Point point_1)
 {
     rectangle_1.X = rectangle_1.Right - 30;
     rectangle_1.Y = rectangle_1.Bottom - 30;
     point_1.X -= rectangle_1.Left;
     point_1.Y -= rectangle_1.Top;
     rectangle_1 = new Rectangle(0, 0, 30, 30);
     method_19(dockContainer_1, controlLayoutSystem_1, dockTarget_1, point_1.Y > rectangle_1.Top + (int)(rectangle_1.Height * ((float)point_1.X / rectangle_1.Width))
         ? DockSide.Bottom
         : DockSide.Right);
 }
コード例 #19
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 private void method_18(DockContainer dockContainer_1, ControlLayoutSystem controlLayoutSystem_1, DockTarget dockTarget_1, Rectangle rectangle_1, Point point_1)
 {
     point_1.X -= rectangle_1.Left;
     point_1.Y -= rectangle_1.Top;
     rectangle_1 = new Rectangle(0, 0, 30, 30);
     if (point_1.Y <=
         rectangle_1.Top + (int)(rectangle_1.Height * (point_1.X / (float)rectangle_1.Width)))
     {
         method_19(dockContainer_1, controlLayoutSystem_1, dockTarget_1, DockSide.Top);
     }
     else
     {
         method_19(dockContainer_1, controlLayoutSystem_1, dockTarget_1, DockSide.Left);
     }
 }
コード例 #20
0
ファイル: LayoutSystemBase.cs プロジェクト: javagg/DemoDock
 private void method_19(DockContainer container, ControlLayoutSystem layoutSystem, DockTarget dockTarget, DockSide dockSide)
 {
     dockTarget.Bounds = method_20(container, layoutSystem, dockSide);
     dockTarget.DockSide = dockSide;
 }
コード例 #21
0
ファイル: SplitLayoutSystem.cs プロジェクト: javagg/DemoDock
		public void MoveToLayoutSystem(ControlLayoutSystem layoutSystem, int index)
		{
			DockControl dockControl = null;
		    if (LayoutSystems.Count == 1 && LayoutSystems[0] is ControlLayoutSystem)
		        dockControl = ((ControlLayoutSystem) LayoutSystems[0]).SelectedControl;

            DockControl[] dockControl_ = DockControls;
			for (var i = dockControl_.Length - 1; i >= 0; i--)
			{
				var control = dockControl_[i];
				layoutSystem.Controls.Insert(index, control);
			}
			if (dockControl != null)
			{
				layoutSystem.SelectedControl = dockControl;
			}
		}
コード例 #22
0
ファイル: DockControl.cs プロジェクト: javagg/DemoDock
 internal void method_15(ControlLayoutSystem layoutSystem, int index)
 {
     if (LayoutSystem != layoutSystem)
     {
         LayoutUtilities.smethod_11(this);
         layoutSystem.Controls.Insert(index, this);
     }
     else
     {
         layoutSystem.Controls.SetChildIndex(this, index);
     }
     layoutSystem.SelectedControl = this;
 }