1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- 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 : UserControl, IPointData
- {
- private string tagId;
- private TsData tagData;
- private bool? PointValue = null;
- public Breaker()
- {
- InitializeComponent();
- }
- [Browsable(true), Category("Point")]
- public TsData TagData
- {
- get
- {
- return tagData;
- }
- set
- {
- tagData = value;
- if (tagData != null && tagData.booleanValue.HasValue)
- {
- if (PointValue.HasValue)
- {
- if (PointValue != tagData.booleanValue.Value)
- {
- this.BackColor = tagData.booleanValue.Value ? Color.Red : Color.Green;
- PointValue = tagData.booleanValue.Value;
- }
- }
- else
- {
- this.BackColor = tagData.booleanValue.Value ? Color.Red : Color.Green;
- PointValue = tagData.booleanValue.Value;
- }
-
- }
- }
- }
- [Browsable(true), Category("Point")]
- public string TagId
- {
- get
- {
- return tagId;
- }
- set
- {
- tagId = value;
- }
- }
- private void Breaker_Load(object sender, EventArgs e)
- {
- }
- }
- }
|