switch_up_small.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 SwitchUpSmall : UserControl, IPointData
  14. {
  15. private string tagId;
  16. private TsData tagData;
  17. public SwitchUpSmall()
  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.pictureBox1.Image = tagData.booleanValue.Value ? global::IntelligentControlForsx.Properties.Resources.kaiguan_He_Xiao_fw : global::IntelligentControlForsx.Properties.Resources.kaiguan_Fen_Xiao_fw;
  34. //this.label1.Text = tagData.doubleValue.Value.ToString("0.00");
  35. }
  36. }
  37. }
  38. [Browsable(true), Category("Point")]
  39. public string TagId
  40. {
  41. get
  42. {
  43. return tagId;
  44. }
  45. set
  46. {
  47. tagId = value;
  48. }
  49. }
  50. }
  51. }