using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using WisdomClient.data; namespace IntelligentControlForsx.MyControls { public partial class Breaker_f : UserControl, IPointData { private string tagId; private TsData tagData; public Breaker_f() { InitializeComponent(); } [Browsable(true), Category("Point")] public TsData TagData { get { return tagData; } set { tagData = value; if (tagData != null && tagData.booleanValue.HasValue) { this.BackColor = tagData.booleanValue.Value ? Color.Green : Color.Red; } } } [Browsable(true), Category("Point")] public string TagId { get { return tagId; } set { tagId = value; } } private void Breaker_Load(object sender, EventArgs e) { } } }