switch_right.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 SwitchRight : UserControl, IPointData
  14. {
  15. private string tagId;
  16. private TsData tagData;
  17. public SwitchRight()
  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_He_Right_fw
  35. : global::IntelligentControlForsx.Properties.Resources.kaiguan_Kai_Right_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. private void pictureBox1_Click(object sender, EventArgs e)
  53. {
  54. }
  55. }
  56. }