修改项目结构

This commit is contained in:
gongxh
2021-12-26 21:30:02 +08:00
parent b06189cb49
commit d39ac43a08
106 changed files with 3392 additions and 3083 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CleanMachineHMI
{
[ToolboxItem(true)]
public class CircleButton : Button//继承按钮类 重新生成解决方案就能看见我啦
{
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
path.AddEllipse(2, 2, this.Width - 6, this.Height - 6);
Region = new Region(path);
}
protected override void OnPaint(PaintEventArgs e)//重新设置控件的形状
{
base.OnPaint(e);//递归 每次重新都发生此方法,保证其形状为自定义形状
Graphics g = e.Graphics;
g.DrawEllipse(new Pen(Color.White, 0), 2, 2, Width - 6, Height - 6);
}
}
}