终端一体化运控平台
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 

74 Zeilen
2.1 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using BPA.Helper;
  7. namespace BPASmartClient.Device
  8. {
  9. public class VariableMonitor : NotifyBase
  10. {
  11. public int Id { get { return _mId; } set { _mId = value; OnPropertyChanged(); } }
  12. private int _mId;
  13. public string VarName { get { return _mVarName; } set { _mVarName = value; OnPropertyChanged(); } }
  14. private string _mVarName;
  15. public string PLCAddress { get { return _mPLCAddress; } set { _mPLCAddress = value; OnPropertyChanged(); } }
  16. private string _mPLCAddress;
  17. public string Notes { get { return _mNotes; } set { _mNotes = value; OnPropertyChanged(); } }
  18. private string _mNotes;
  19. public string ModbusTcpAddress { get { return _mModbusTcpAddress; } set { _mModbusTcpAddress = value; OnPropertyChanged(); } }
  20. private string _mModbusTcpAddress;
  21. public string CurrentValue
  22. {
  23. get { return _mCurrentValue; }
  24. set
  25. {
  26. _mCurrentValue = value;
  27. OnPropertyChanged();
  28. if (_mCurrentValue == "False" || _mCurrentValue == "True")
  29. {
  30. if (_mCurrentValue == "True")
  31. StatusColor = new { r = 51, g = 232, b = 34, a = 1 };
  32. else
  33. StatusColor = new { r = 255, g = 0, b = 0, a = 1 };
  34. }
  35. else
  36. StatusColor = new { r = 51, g = 232, b = 34, a = 1 };
  37. }
  38. }
  39. private string _mCurrentValue;
  40. public bool SwitchValue
  41. {
  42. get { return _sWitchValue; }
  43. set
  44. {
  45. _sWitchValue = value;
  46. OnPropertyChanged();
  47. }
  48. }
  49. private bool _sWitchValue;
  50. public int IntValue
  51. {
  52. get { return _intValue; }
  53. set
  54. {
  55. _intValue = value;
  56. OnPropertyChanged();
  57. }
  58. }
  59. private int _intValue;
  60. public object StatusColor { get; set; }
  61. }
  62. }