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 HandCartBreaker : UserControl, IPointData { private string tagId; private TsData tagData; private string breakerTagId; private TsData breakerTagData; public HandCartBreaker() { InitializeComponent(); } [Browsable(true), Category("Point")] public TsData TagData { get { return tagData; } set { tagData = value; if (tagData != null && tagData.booleanValue.HasValue) { this.BackgroundImage = tagData.booleanValue.Value ? global::IntelligentControlForsx.Properties.Resources.handcart1 : global::IntelligentControlForsx.Properties.Resources.handcart0; } } } [Browsable(true), Category("Point")] public string TagId { get { return tagId; } set { tagId = value; } } [Browsable(true), Category("Point")] public TsData BreakerTagData { get { return breakerTagData; } set { breakerTagData = value; if (breakerTagData != null && breakerTagData.booleanValue.HasValue) { this.panel1.BackColor = breakerTagData.booleanValue.Value ? Color.Red : Color.Green; } } } [Browsable(true), Category("Point")] public string BreakerTagId { get { return breakerTagId; } set { breakerTagId = value; } } } }