12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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 HandCart : UserControl, IPointData
- {
- private string tagId;
- private TsData tagData;
- private bool PointValue = false;
- public HandCart()
- {
- InitializeComponent();
- }
- [Browsable(true), Category("Point")]
- public TsData TagData
- {
- get
- {
- return tagData;
- }
- set
- {
- tagData = value;
- if (tagData != null && tagData.booleanValue.HasValue)
- {
- if (PointValue != tagData.booleanValue)
- {
- Console.WriteLine("断路器测点发生变化" + tagData.booleanValue.Value);
- this.BackgroundImage = tagData.booleanValue.Value ? global::IntelligentControlForsx.Properties.Resources.handcart1 : global::IntelligentControlForsx.Properties.Resources.handcart0;
- PointValue = tagData.booleanValue.Value;
- }
- }
- }
- }
- [Browsable(true), Category("Point")]
- public string TagId
- {
- get
- {
- return tagId;
- }
- set
- {
- tagId = value;
- }
- }
- }
- }
|