添加项目文件。

This commit is contained in:
Administrator
2026-08-06 09:23:30 +08:00
parent 771e23e00a
commit 4660ceee70
604 changed files with 138380 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
using System.ComponentModel;
using System.Windows.Forms;
namespace JinYuan.ControlLib
{
public partial class SimpleLed : UserControl
{
public SimpleLed()
{
InitializeComponent();
//设置控件样式
this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
this.SetStyle(ControlStyles.DoubleBuffer, true);
this.SetStyle(ControlStyles.ResizeRedraw, true);
this.SetStyle(ControlStyles.Selectable, true);
this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
}
private bool state = true;
[Browsable(true)]
[Category("自定义属性")]
[Description("设置或获取指示灯的状态")]
public bool State
{
get { return state; }
set
{
state = value;
this.BackgroundImage = state ? Properties.Resources.Green : Properties.Resources.Red;
}
}
[Browsable(true)]
[Category("自定义属性")]
[Description("设置或获取指示灯绑定的变量名称")]
public string BindVarName { get; set; }
}
}