PageDataView.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Caliburn.Micro.Core;
  7. namespace FurnaceUI.DataModule
  8. {
  9. public class PageDataView : PropertyChangedBase
  10. {
  11. private int _index;
  12. public int Index
  13. {
  14. get => _index;
  15. set
  16. {
  17. _index = value;
  18. NotifyOfPropertyChange(nameof(Index));
  19. }
  20. }
  21. private string _name;
  22. public string Name
  23. {
  24. get => _name;
  25. set
  26. {
  27. _name = value;
  28. NotifyOfPropertyChange(nameof(Name));
  29. }
  30. }
  31. private string _valueStr;
  32. public string ValueStr
  33. {
  34. get => _valueStr;
  35. set
  36. {
  37. if (bool.TryParse(value, out bool boolStr))
  38. {
  39. _valueStr = boolStr ? "Yes" : "No";
  40. }
  41. else
  42. {
  43. _valueStr = value;
  44. }
  45. NotifyOfPropertyChange(nameof(ValueStr));
  46. }
  47. }
  48. private bool _isSelect;
  49. public bool IsSelect
  50. {
  51. get => _isSelect;
  52. set
  53. {
  54. _isSelect = value;
  55. NotifyOfPropertyChange(nameof(IsSelect));
  56. }
  57. }
  58. private string _compareValueStr;
  59. public string CompareValueStr
  60. {
  61. get => _compareValueStr;
  62. set
  63. {
  64. if (bool.TryParse(value, out bool boolStr))
  65. {
  66. _compareValueStr = boolStr ? "Yes" : "No";
  67. }
  68. else
  69. {
  70. _compareValueStr = value;
  71. }
  72. NotifyOfPropertyChange(nameof(CompareValueStr));
  73. }
  74. }
  75. private bool _isHidden;
  76. public bool IsHidden
  77. {
  78. get => _isHidden;
  79. set
  80. {
  81. _isHidden = value;
  82. NotifyOfPropertyChange(nameof(IsHidden));
  83. }
  84. }
  85. private bool _isDifference;
  86. public bool IsDifference
  87. {
  88. get => _isDifference;
  89. set
  90. {
  91. _isDifference = value;
  92. NotifyOfPropertyChange(nameof(IsDifference));
  93. }
  94. }
  95. }
  96. }