Ejemplo n.º 1
0
		private void method_4(PopupContainer container, Rectangle bounds1, Rectangle bounds2)
		{
			bool_0 = true;
			try
			{
                while (Environment.TickCount < Environment.TickCount + 100)
				{
					var ratio = (Environment.TickCount - Environment.TickCount) / 100f;
					var x = bounds1.X + (bounds2.X - bounds1.X) * ratio;
					var y = bounds1.Y + (bounds2.Y - bounds1.Y) * ratio;
					var w = bounds1.Width + (bounds2.Width - bounds1.Width) * ratio;
					var h = bounds1.Height + (bounds2.Height - bounds1.Height) * ratio;
					var r = new Rectangle((int)x, (int)y, (int)w, (int)h);
					container.SetBounds(r.X, r.Y, r.Width, r.Height, BoundsSpecified.All);
					Application.DoEvents();
				}
			}
			finally
			{
				bool_0 = false;
			}
		}
Ejemplo n.º 2
0
		internal void method_7(DockControl dockControl_0, bool bool_1, bool bool_2)
		{
		    if (dockControl_0.LayoutSystem == LayoutSystem && dockControl_0.LayoutSystem.SelectedControl == dockControl_0)
		    {
		        if (bool_2)
		        {
		            dockControl_0.Activate();
		        }
		        return;
		    }
		    bool_1 = (bool_1 || !method_5());
			dockControl_0.LayoutSystem.SelectedControl = dockControl_0;
			if (dockControl_0.LayoutSystem.SelectedControl == dockControl_0)
			{
				try
				{
					if (LayoutSystem != dockControl_0.LayoutSystem)
					{
						method_6(true);
						Rectangle rectangle;
						rectangle_0 = method_8(dockControl_0.LayoutSystem.PopupSize, out rectangle);
						PopupContainer control = new PopupContainer(this);
						foreach (DockControl dockControl in dockControl_0.LayoutSystem.Controls)
						{
							if (dockControl.Parent != null)
							{
								LayoutUtilities.smethod_8(dockControl);
							}
							dockControl.Parent = control;
						}
						control.ControlLayoutSystem_0 = dockControl_0.LayoutSystem;
						control.Visible = false;
						Parent.Controls.Add(control);
						control.Bounds = rectangle_0;
						control.SuspendLayout();
						control.Bounds = rectangle;
						control.Visible = true;
						control.BringToFront();
						if (!bool_1)
						{
							method_4(control, rectangle, rectangle_0);
						}
						control.Bounds = rectangle_0;
						control.ResumeLayout();
						if (!control.IsDisposed && control.Parent != null)
						{
							_popupContainer = control;
							LayoutSystem = dockControl_0.LayoutSystem;
							timer_1.Enabled = true;
							dockControl_0.OnAutoHidePopupOpened(EventArgs.Empty);
						}
					}
				}
				finally
				{
					if (bool_2 && LayoutSystem == dockControl_0.LayoutSystem)
					{
						dockControl_0.Activate();
					}
				}
			}
		}
Ejemplo n.º 3
0
 public ResizingManager(AutoHideBar bar, PopupContainer popupContainer, Point startPoint) : base(bar, bar.Manager?.DockingHints ?? DockingHints.TranslucentFill, false)
 {
     control0_0 = bar;
     control1_0 = popupContainer;
     point_0 = startPoint;
     int num = bar.Manager?.MinimumDockContainerSize ?? 30;
     int num2 = bar.Manager?.MaximumDockContainerSize ?? 500;
     int_6 = popupContainer.PopupSize;
     switch (bar.Dock)
     {
         case DockStyle.Top:
             if (bar.Manager?.DockSystemContainer != null)
             {
                 num2 = Math.Max(bar.Manager.DockSystemContainer.Height - popupContainer.Bounds.Top - num, num);
             }
             int_7 = startPoint.Y - (int_6 - num);
             int_8 = startPoint.Y + (num2 - int_6);
             break;
         case DockStyle.Bottom:
             if (bar.Manager?.DockSystemContainer != null)
             {
                 num2 = Math.Max(popupContainer.Bounds.Bottom - num, num);
             }
             int_7 = startPoint.Y - (num2 - int_6);
             int_8 = startPoint.Y + (int_6 - num);
             break;
         case DockStyle.Left:
             if (bar.Manager?.DockSystemContainer != null)
             {
                 num2 = Math.Max(bar.Manager.DockSystemContainer.Width - popupContainer.Bounds.Left - num, num);
             }
             int_7 = startPoint.X - (int_6 - num);
             int_8 = startPoint.X + (num2 - int_6);
             break;
         case DockStyle.Right:
             if (bar.Manager?.DockSystemContainer != null)
             {
                 num2 = Math.Max(popupContainer.Bounds.Right - num, num);
             }
             int_7 = startPoint.X - (num2 - int_6);
             int_8 = startPoint.X + (int_6 - num);
             break;
     }
     OnMouseMove(startPoint);
 }