switch_right_small_f.cs 1.5 KB

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