FaultDataInfo.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Linq;
  5. using System.Runtime.CompilerServices;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace IntelligentControlForsx.Service.WindturbineInfo.Domain
  9. {
  10. public class FaultDataInfo : INotifyPropertyChanged
  11. {
  12. public event PropertyChangedEventHandler PropertyChanged;
  13. private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
  14. {
  15. PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
  16. }
  17. public FaultDataInfo(string warningNum, string name, string plcName, string pointValue)
  18. {
  19. this.warningNum = warningNum;
  20. this.name = name;
  21. this.plcName = plcName;
  22. this.pointValue = pointValue;
  23. }
  24. private string warningNum;
  25. public string WarningNum
  26. {
  27. get { return warningNum; }
  28. set
  29. {
  30. if (value != this.warningNum)
  31. {
  32. warningNum = value;
  33. NotifyPropertyChanged();
  34. }
  35. }
  36. }
  37. private string plcName = "-";
  38. /// <summary>
  39. /// plc变量名
  40. /// </summary>
  41. public string PlcName
  42. {
  43. get { return this.plcName; }
  44. set
  45. {
  46. if (value != this.plcName)
  47. {
  48. plcName = value;
  49. NotifyPropertyChanged();
  50. }
  51. }
  52. }
  53. private string name = "-";
  54. /// <summary>
  55. /// 含义(标题)
  56. /// </summary>
  57. public string Name
  58. {
  59. get { return this.name; }
  60. set
  61. {
  62. if (value != this.name)
  63. {
  64. name = value;
  65. NotifyPropertyChanged();
  66. }
  67. }
  68. }
  69. private string pointValue = "-";
  70. /// <summary>
  71. /// 测点值(正常、故障)
  72. /// </summary>
  73. public string PointValue
  74. {
  75. get { return this.pointValue; }
  76. set
  77. {
  78. if (value != this.pointValue)
  79. {
  80. pointValue = value;
  81. NotifyPropertyChanged();
  82. }
  83. }
  84. }
  85. }
  86. }