FileNodeItem.cs 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. using System.Windows;
  2. namespace OldWorldData.CommonData;
  3. [DataContract]
  4. public class FileNodeItem
  5. {
  6. public FileNodeItem()
  7. {
  8. this.Files = new List<FileNodeItem>();
  9. this.IsFile = false;
  10. }
  11. private string name = string.Empty;
  12. [DataMember]
  13. public string Name
  14. {
  15. get { return name; }
  16. set { name = value; }
  17. }
  18. [DataMember]
  19. public string FullPath { get; set; }
  20. [DataMember]
  21. public FileNodeItem Parent { get; set; }
  22. [DataMember]
  23. public List<FileNodeItem> Files { get; set; }
  24. [DataMember]
  25. public bool IsFile { get; set; }
  26. [DataMember]
  27. public string PrefixPath { get; set; }
  28. public string AllParentPath { get; set; }
  29. private string creator = string.Empty;
  30. [DataMember]
  31. public string Creator
  32. {
  33. get { return creator; }
  34. set { creator = value; }
  35. }
  36. private string revisor = string.Empty;
  37. [DataMember]
  38. public string Revisor
  39. {
  40. get { return revisor; }
  41. set { revisor = value; }
  42. }
  43. private string description = string.Empty;
  44. [DataMember]
  45. public string Description
  46. {
  47. get { return description; }
  48. set { description = value; }
  49. }
  50. private string creatTime = string.Empty;
  51. [DataMember]
  52. public string CreatTime
  53. {
  54. get { return creatTime; }
  55. set { creatTime = value; }
  56. }
  57. private string reviseTime = string.Empty;
  58. [DataMember]
  59. public string ReviseTime
  60. {
  61. get { return reviseTime; }
  62. set { reviseTime = value; }
  63. }
  64. private string permission = string.Empty;
  65. [DataMember]
  66. public string Permission
  67. {
  68. get { return permission; }
  69. set { permission = value; }
  70. }
  71. private string level = string.Empty;
  72. [DataMember]
  73. public string Level
  74. {
  75. get { return level; }
  76. set { level = value; }
  77. }
  78. private bool _IsSelected;
  79. [DataMember]
  80. public bool IsSelected
  81. {
  82. get { return _IsSelected; }
  83. set { _IsSelected = value; }
  84. }
  85. [DataMember]
  86. public bool IsExpanded { get; set; }
  87. private Visibility _IsVisiable;
  88. [DataMember]
  89. public Visibility IsVisiable
  90. {
  91. get { return _IsVisiable; }
  92. set { _IsVisiable = value; }
  93. }
  94. private bool _IsChecked;
  95. [DataMember]
  96. public bool IsChecked
  97. {
  98. get { return _IsChecked; }
  99. set { _IsChecked = value; }
  100. }
  101. [DataMember]
  102. public bool IsBackupSelected { get; set; }
  103. private void SetAllChild(FileNodeItem fileNode, bool value)
  104. {
  105. if (!fileNode.IsFile)
  106. {
  107. SetAllChild(fileNode, value);
  108. }
  109. else
  110. {
  111. fileNode.IsBackupSelected = value;
  112. }
  113. }
  114. private bool _IsEnable;
  115. [DataMember]
  116. public bool IsEnable
  117. {
  118. get { return _IsEnable; }
  119. set { _IsEnable = value; }
  120. }
  121. }