OperatEntity.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  4. using System.ComponentModel;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace CollaborativePlatformMain.DFEntity.MessageSubUtil
  9. {
  10. /// <summary>
  11. ///
  12. /// <para>文件名(File Name): OperatEntity.cs</para>
  13. ///
  14. /// <para>描述(Description): 工作台展示数据</para>
  15. ///
  16. /// <para>数据表(Tables): nothing</para>
  17. ///
  18. /// <para>作者(Author): Ou Rui Song</para>
  19. ///
  20. /// <para>日期(Create Date): 2024年5月5日16:18:46</para>
  21. ///
  22. /// 修改记录(Revision History):
  23. /// R1:
  24. /// 修改作者:
  25. /// 修改日期:
  26. /// 修改理由:
  27. ///
  28. /// </summary>
  29. public class OperatEntity: INotifyPropertyChanged
  30. {
  31. /// <summary>
  32. /// 展示数据
  33. /// </summary>
  34. /// <param name="node">内容</param>
  35. /// <param name="drawPath">图纸地址</param>
  36. /// <param name="subDatas">子级数据</param>
  37. /// <param name="isLayer">是否为图层</param>
  38. public OperatEntity(string node, string drawPath, ObservableCollection<OperatEntity> subDatas, bool isLayer)
  39. {
  40. Node = node;
  41. DrawPath = drawPath;
  42. SubDatas = subDatas;
  43. IsLayer = isLayer;
  44. }
  45. /// <summary>
  46. /// 唯一id
  47. /// </summary>
  48. public string Id { get; set; } = Guid.NewGuid().ToString();
  49. /// <summary>
  50. /// 内容
  51. /// </summary>
  52. public string Node { get; set; }
  53. /// <summary>
  54. /// 图纸地址
  55. /// </summary>
  56. public string DrawPath { get; set; }
  57. /// <summary>
  58. /// 子级数据
  59. /// </summary>
  60. public ObservableCollection<OperatEntity> SubDatas { get; set; } = new ObservableCollection<OperatEntity>();
  61. /// <summary>
  62. /// 是否为图层
  63. /// </summary>
  64. public bool IsLayer { get; set; } = false;
  65. /// <summary>
  66. /// 是否展示
  67. /// </summary>
  68. public string isShow { get; set; } = "Collapsed";
  69. /// <summary>
  70. /// 是否展示
  71. /// </summary>
  72. public string IsShow
  73. {
  74. get { return isShow; }
  75. set
  76. {
  77. if (value != isShow)
  78. {
  79. isShow = value;
  80. NotifyPropertyChanged("IsShow");
  81. }
  82. }
  83. }
  84. /// <summary>
  85. /// 是否选中
  86. /// </summary>
  87. public bool isCheck { get; set; } = false;
  88. /// <summary>
  89. /// 是否选中
  90. /// </summary>
  91. public bool IsCheck
  92. {
  93. get { return isCheck; }
  94. set
  95. {
  96. if (value != isCheck)
  97. {
  98. isCheck = value;
  99. NotifyPropertyChanged("IsCheck");
  100. }
  101. }
  102. }
  103. public event PropertyChangedEventHandler PropertyChanged;
  104. private void NotifyPropertyChanged(string propertyName = "")
  105. {
  106. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
  107. }
  108. }
  109. }