Breaker_f.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using WisdomClient.data;
  11. namespace IntelligentControlForsx.MyControls
  12. {
  13. public partial class Breaker_f : UserControl, IPointData
  14. {
  15. private string tagId;
  16. private TsData tagData;
  17. public Breaker_f()
  18. {
  19. InitializeComponent();
  20. }
  21. [Browsable(true), Category("Point")]
  22. public TsData TagData
  23. {
  24. get
  25. {
  26. return tagData;
  27. }
  28. set
  29. {
  30. tagData = value;
  31. if (tagData != null && tagData.booleanValue.HasValue)
  32. {
  33. this.BackColor = tagData.booleanValue.Value ? Color.Green : Color.Red;
  34. }
  35. }
  36. }
  37. [Browsable(true), Category("Point")]
  38. public string TagId
  39. {
  40. get
  41. {
  42. return tagId;
  43. }
  44. set
  45. {
  46. tagId = value;
  47. }
  48. }
  49. private void Breaker_Load(object sender, EventArgs e)
  50. {
  51. }
  52. }
  53. }