xformlayout.cs
来自「破解的飞信源代码」· CS 代码 · 共 35 行
CS
35 行
namespace Imps.Client.Pc.BizControls
{
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Windows.Forms.Layout;
public class xFormLayOut : LayoutEngine
{
public override bool Layout(object container, LayoutEventArgs layoutEventArgs)
{
Control control = container as Control;
Rectangle displayRectangle = control.DisplayRectangle;
Point location = displayRectangle.Location;
foreach (Control control2 in control.Controls)
{
if (!control2.Visible)
{
continue;
}
location.Offset(control2.get_Margin().get_Left(), control2.get_Margin().get_Top());
control2.Location = location;
if (control2.get_AutoSize())
{
control2.Size = control2.GetPreferredSize(displayRectangle.Size);
}
location.X = displayRectangle.X;
location.Y += control2.Height + control2.get_Margin().get_Bottom();
}
return true;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?