终端一体化运控平台
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

52 rader
1.5 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace BPASmartClient.Device
  7. {
  8. public class VariableMonitor
  9. {
  10. public int Id { get { return _mId; } set { _mId = value; } }
  11. private int _mId;
  12. public string VarName { get { return _mVarName; } set { _mVarName = value; } }
  13. private string _mVarName;
  14. public string PLCAddress { get { return _mPLCAddress; } set { _mPLCAddress = value; } }
  15. private string _mPLCAddress;
  16. public string Notes { get { return _mNotes; } set { _mNotes = value; } }
  17. private string _mNotes;
  18. public string ModbusTcpAddress { get { return _mModbusTcpAddress; } set { _mModbusTcpAddress = value; } }
  19. private string _mModbusTcpAddress;
  20. public string CurrentValue
  21. {
  22. get { return _mCurrentValue; }
  23. set
  24. {
  25. _mCurrentValue = value;
  26. if (_mCurrentValue == "False" || _mCurrentValue == "True")
  27. {
  28. if (_mCurrentValue == "True")
  29. StatusColor = new { r = 51, g = 232, b = 34, a = 1 };
  30. else
  31. StatusColor = new { r = 255, g = 0, b = 0, a = 1 };
  32. }else
  33. StatusColor = new { r = 51, g = 232, b = 34, a = 1 };
  34. }
  35. }
  36. private string _mCurrentValue;
  37. public object StatusColor { get; set; }
  38. }
  39. }