private void layoutMovingDock(ref Rectangle crect, ILMovingDockPanel panel , int width, int height) { panel.Visible = false; switch (panel.Dock) { case DockStyle.Bottom: panel.Height = height; panel.Width = crect.Width; panel.Top = crect.Top + crect.Height - panel.Height; panel.Left = crect.X; crect.Height -= panel.Height; break; case DockStyle.Left: panel.Height = crect.Height; panel.Width = width; panel.Top = crect.Y; panel.Left = crect.X; crect.Width -= panel.Width; crect.X += panel.Width; break; case DockStyle.None: //panel.Top = (int)(ClientSize.Height / 4); //panel.Left = (int)(ClientSize.Width / 4); //panel.Width = width; //panel.Height = height; break; case DockStyle.Right: panel.Width = width; panel.Height = crect.Height; panel.Top = crect.Y; panel.Left = crect.Left + crect.Width - panel.Width; crect.Width -= panel.Width; break; case DockStyle.Top: panel.Height = height; panel.Width = crect.Width; panel.Top = crect.Y; panel.Left = crect.X; crect.Height -= panel.Height; crect.Y += panel.Height; break; default: break; } panel.Visible = true; }
private void layoutMovingDock(ref Rectangle crect, ILMovingDockPanel panel ,int width ,int height) { panel.Visible = false; switch (panel.Dock) { case DockStyle.Bottom: panel.Height = height; panel.Width = crect.Width; panel.Top = crect.Top + crect.Height - panel.Height; panel.Left = crect.X; crect.Height -= panel.Height; break; case DockStyle.Left: panel.Height = crect.Height; panel.Width = width; panel.Top = crect.Y; panel.Left = crect.X; crect.Width -= panel.Width; crect.X += panel.Width; break; case DockStyle.None: //panel.Top = (int)(ClientSize.Height / 4); //panel.Left = (int)(ClientSize.Width / 4); //panel.Width = width; //panel.Height = height; break; case DockStyle.Right: panel.Width = width; panel.Height = crect.Height; panel.Top = crect.Y; panel.Left = crect.Left + crect.Width - panel.Width; crect.Width -= panel.Width; break; case DockStyle.Top: panel.Height = height; panel.Width = crect.Width; panel.Top = crect.Y; panel.Left = crect.X; crect.Height -= panel.Height; crect.Y += panel.Height; break; default: break; } panel.Visible = true; }