xgrouplabel.cs
来自「破解的飞信源代码」· CS 代码 · 共 28 行
CS
28 行
namespace Imps.Client.Pc.Controls
{
using System;
using System.Drawing;
using System.Windows.Forms;
public class XGroupLabel : XLabel1
{
public XGroupLabel()
{
base.TextAlign = ContentAlignment.MiddleLeft;
}
protected override void OnPaintControl(PaintEventArgs e)
{
base.OnPaintControl(e);
if (base.TextAlign == ContentAlignment.MiddleLeft)
{
Size size = Size.Ceiling(e.Graphics.MeasureString(this.Text, this.Font));
size.Width += 2;
Rectangle rectangle = Rectangle.FromLTRB(e.ClipRectangle.Left + size.Width, e.ClipRectangle.Top + (e.ClipRectangle.Height / 2), e.ClipRectangle.Right, (e.ClipRectangle.Top + (e.ClipRectangle.Height / 2)) + 2);
ControlPaint.DrawBorder3D(e.Graphics, rectangle);
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?