1活动逻辑调整 2拼多多买手号存储
This commit is contained in:
1 parent
2df3769153
commit
fa96cc1444
22 files changed
+3251
-1167
No files matched your search
@@ -34,10 +34,16 @@ namespace TemuKJD.UserComponent
|
||||
{
|
||||
//base.OnPaint(e); // 禁用系统绘制
|
||||
|
||||
//if (e.ClipRectangle.X != 0 || e.ClipRectangle.Y != 0)
|
||||
// return;
|
||||
|
||||
Graphics g = e.Graphics;
|
||||
g.Clear(this.BackColor);
|
||||
|
||||
//填充背景色
|
||||
g.FillRectangle(new SolidBrush(this.BackColor), e.ClipRectangle);
|
||||
//g.FillRectangle(new SolidBrush(this.BackColor), e.ClipRectangle);
|
||||
g.FillRectangle(new SolidBrush(this.BackColor), this.ClientRectangle);
|
||||
|
||||
|
||||
//绘制圆形(注释此句,以备后用)
|
||||
//Brush brush = new SolidBrush(this.Checked ? checkBoxCheckColor : checkBoxColor);
|
||||
@@ -64,8 +70,10 @@ namespace TemuKJD.UserComponent
|
||||
}
|
||||
Size size = TextRenderer.MeasureText(this.Text, Font);
|
||||
e.Graphics.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; // 或者 AntiAliasGridFit // 平滑字体
|
||||
e.Graphics.DrawString(this.Text, Font, new SolidBrush(this.ForeColor),
|
||||
new PointF(e.ClipRectangle.X + checkBoxSize + 2 + Padding.Left, e.ClipRectangle.Y + (Height - size.Height) / 2));
|
||||
//e.Graphics.DrawString(this.Text, Font, new SolidBrush(this.ForeColor),
|
||||
// new PointF(e.ClipRectangle.X + checkBoxSize + 2 + Padding.Left, e.ClipRectangle.Y + (Height - size.Height) / 2));
|
||||
e.Graphics.DrawString(this.Text, Font, new SolidBrush(this.ForeColor),
|
||||
new PointF(this.ClientRectangle.X + checkBoxSize + 2 + Padding.Left, this.ClientRectangle.Y + (Height - size.Height) / 2));
|
||||
}
|
||||
|
||||
private void DrawRoundedRectangle(Graphics g, Rectangle rect, int radius, Color color, bool isFill = false)
|
||||
|
||||
Reference in new issue
Block a user