PropertyDefineTb.cs 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. /* ==============================================================================
  2. * 功能描述:PEPCodeTb
  3. * 创 建 者:Garrett
  4. * 创建日期:2018/4/8 11:11:50
  5. * ==============================================================================*/
  6. using System;
  7. using System.Collections.Generic;
  8. using System.Collections.ObjectModel;
  9. using System.ComponentModel;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using SAGA.DotNetUtils.WPF;
  14. using SAGA.DotNetUtils.WPF.UserControl.ComboboxTreeView;
  15. using SAGA.MBI.DataArrange;
  16. using SAGA.MBI.JsonConvert;
  17. namespace SAGA.MBI.Model
  18. {
  19. public class PropertyDefineTb
  20. {
  21. public PropertyDefineTb(string code)
  22. {
  23. Code = code;
  24. PropertyDefineItems = new List<PropertyDefineItem>();
  25. }
  26. private string m_Code;
  27. public string Code
  28. {
  29. get { return m_Code; }
  30. set { m_Code = value; }
  31. }
  32. private List<PropertyDefineItem> m_PropertyDefineItems;
  33. public List<PropertyDefineItem> PropertyDefineItems
  34. {
  35. get { return m_PropertyDefineItems; }
  36. set { m_PropertyDefineItems = value; }
  37. }
  38. }
  39. /// <summary>
  40. /// PEPCodeTb
  41. /// </summary>
  42. public class PropertyDefineItem:BaseViewModelStub
  43. {
  44. public PropertyDefineItem()
  45. { }
  46. #region Model
  47. private int _id;
  48. private string _owner;
  49. private string _architecture;
  50. private string _category;
  51. private string _subcategory;
  52. private string _name;
  53. private string _codename;
  54. private string _unit;
  55. private string _type;
  56. private string _inputtype;
  57. private string _enumsource;
  58. private string _remark;
  59. /// <summary>
  60. ///
  61. /// </summary>
  62. public int ID
  63. {
  64. set { _id = value; }
  65. get { return _id; }
  66. }
  67. /// <summary>
  68. ///
  69. /// </summary>
  70. public string Owner
  71. {
  72. set { _owner = value; }
  73. get { return _owner; }
  74. }
  75. /// <summary>
  76. ///
  77. /// </summary>
  78. public string Architecture
  79. {
  80. set { _architecture = value; }
  81. get { return _architecture; }
  82. }
  83. /// <summary>
  84. ///
  85. /// </summary>
  86. public string Category
  87. {
  88. set { _category = value; }
  89. get { return _category; }
  90. }
  91. /// <summary>
  92. ///
  93. /// </summary>
  94. public string SubCategory
  95. {
  96. set { _subcategory = value; }
  97. get { return _subcategory; }
  98. }
  99. /// <summary>
  100. ///
  101. /// </summary>
  102. public string Name
  103. {
  104. set { _name = value; }
  105. get { return _name; }
  106. }
  107. /// <summary>
  108. ///
  109. /// </summary>
  110. public string CodeName
  111. {
  112. set { _codename = value; }
  113. get { return _codename; }
  114. }
  115. /// <summary>
  116. ///
  117. /// </summary>
  118. public string Unit
  119. {
  120. set { _unit = value; }
  121. get { return _unit; }
  122. }
  123. /// <summary>
  124. ///
  125. /// </summary>
  126. public string Type
  127. {
  128. set { _type = value; }
  129. get { return _type; }
  130. }
  131. /// <summary>
  132. ///
  133. /// </summary>
  134. public string InputType
  135. {
  136. set { _inputtype = value; }
  137. get { return _inputtype; }
  138. }
  139. /// <summary>
  140. ///
  141. /// </summary>
  142. public string EnumSource
  143. {
  144. set { _enumsource = value; }
  145. get { return _enumsource; }
  146. }
  147. /// <summary>
  148. ///
  149. /// </summary>
  150. public string Remark
  151. {
  152. set { _remark = value; }
  153. get { return _remark; }
  154. }
  155. private string collection_cmpt_code;
  156. /// <summary>
  157. /// 对应的组件编码
  158. /// </summary>
  159. public string CollectionCmptCode
  160. {
  161. get { return collection_cmpt_code; }
  162. set { collection_cmpt_code = value; }
  163. }
  164. private bool m_IsShow=false;
  165. /// <summary>
  166. /// 是否显示
  167. /// </summary>
  168. public bool IsShow
  169. {
  170. get { return m_IsShow; }
  171. set { m_IsShow = value; }
  172. }
  173. private string classification ;
  174. /// <summary>
  175. /// 信息点所属类别
  176. /// </summary>
  177. public string Classification
  178. {
  179. get { return classification; }
  180. set { classification = value; }
  181. }
  182. #endregion Model
  183. #region BindingProperty
  184. private Object m_DataSource;
  185. public Object DataSource
  186. {
  187. get
  188. {
  189. if (m_DataSource == null)
  190. m_DataSource = new ObservableCollection<CMBTreeNodeItem<ICMBTreeNodeItem>>(DalCMBTreeView.ConvertToDataSource(EnumSource));
  191. return m_DataSource;
  192. }
  193. }
  194. #endregion
  195. }
  196. /// <summary>
  197. /// 组件编码对应Revit的输入方式
  198. /// </summary>
  199. public class ComponentCodeToInputType
  200. {
  201. /// <summary>
  202. /// 组件编码
  203. /// </summary>
  204. public string ComponentCode { get; set; }
  205. /// <summary>
  206. /// Revit组件类型
  207. /// </summary>
  208. public string InputType { get; set; }
  209. }
  210. }