Advertisement
Guest User

Untitled

a guest
Oct 19th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.54 KB | None | 0 0
  1. namespace FirmwareGenerator
  2. {
  3. [Serializable]
  4. public class CfObject
  5. {
  6. private string _name;
  7.  
  8. [XmlAttribute("name")]
  9. public string Name
  10. {
  11. get { return _name; }
  12. set { _name = value; }
  13. }
  14.  
  15. }
  16.  
  17. [Serializable, XmlRoot("CFMemoryTemplate")]
  18. public class CfMemoryTemplate : CfObject
  19. {
  20. private string _pID;
  21.  
  22. private CfObject[] _items;
  23.  
  24. [XmlAttribute("PID")]
  25. public string Pid
  26. {
  27. get { return _pID; }
  28. set { _pID = value; }
  29. }
  30.  
  31. [XmlElement("CfParam", typeof(CfParam))]
  32. [XmlElement("CfDesc", typeof(CfDesc))]
  33. [XmlElement("CfItemList", typeof(CfItemList))]
  34. [XmlElement("CfImg", typeof(CfImg))]
  35. public CfObject[] Items
  36. {
  37. get { return _items; }
  38. set { _items = value; }
  39. }
  40.  
  41. }
  42.  
  43. [Serializable]
  44. public class CfParam : CfObject
  45. {
  46. private string _value;
  47.  
  48. [XmlAttribute("value")]
  49. public string Value
  50. {
  51. get { return _value; }
  52. set { _value = value; }
  53. }
  54. }
  55.  
  56. [Serializable]
  57. public class CfDesc : CfObject
  58. {
  59. private object[] _items;
  60.  
  61. [XmlElement("CfDescNumber", typeof(CfDescNumber))]
  62. [XmlElement("CfDescCount", typeof(CfDescCount))]
  63. [XmlElement("CfDescAddr", typeof(CfDescAddr))]
  64. [XmlElement("CfDescText", typeof(CfDescText))]
  65. [XmlElement("CfDescCrc", typeof(CfDescCrc))]
  66. [XmlElement("CfDescSize", typeof(CfDescSize))]
  67. public object[] Items
  68. {
  69. get { return _items; }
  70. set { _items = value; }
  71. }
  72.  
  73. }
  74.  
  75.  
  76. [Serializable]
  77. public class CfItemList : CfObject
  78. {
  79. private string _path;
  80.  
  81. private CfObject[] _items;
  82.  
  83. private ItemTemplate _itemTemplate;
  84.  
  85. [XmlAttribute("path")]
  86. public string Path
  87. {
  88. get { return _path; }
  89. set { _path = value; }
  90. }
  91.  
  92. [XmlElement("ItemTemplate")]
  93. public ItemTemplate ItemTemplateProp
  94. {
  95. get { return _itemTemplate; }
  96. set { _itemTemplate = value; }
  97. }
  98.  
  99. [XmlElement("CfImg", typeof(CfImg))]
  100. [XmlElement("CfDesc", typeof(CfDesc))]
  101. public CfObject[] Items
  102. {
  103. get { return _items; }
  104. set { _items = value; }
  105. }
  106.  
  107. }
  108.  
  109. [Serializable]
  110. public class CfDescNumber : CfObject
  111. {
  112. private string _path;
  113.  
  114. private string _value;
  115.  
  116. private byte _size;
  117.  
  118. [XmlAttribute("path")]
  119. public string Path
  120. {
  121. get { return _path; }
  122. set { _path = value; }
  123.  
  124. }
  125.  
  126. [XmlAttribute("value")]
  127. public string Value
  128. {
  129. get { return _value; }
  130. set { _value = value; }
  131.  
  132. }
  133.  
  134. [XmlAttribute("size")]
  135. public byte Size
  136. {
  137. get { return _size; }
  138. set { _size = value; }
  139.  
  140. }
  141. }
  142.  
  143. [Serializable]
  144. public class CfDescCount : CfObject
  145. {
  146. private string _path;
  147.  
  148. [XmlAttribute("path")]
  149. public string Path
  150. {
  151. get { return _path; }
  152. set { _path = value; }
  153. }
  154. }
  155.  
  156. [Serializable]
  157. public class ItemTemplate
  158. {
  159. private CfObject[] _items;
  160.  
  161. [XmlElement("CfImg", typeof(CfImg))]
  162. [XmlElement("CfDesc", typeof(CfDesc))]
  163. public CfObject[] Items
  164. {
  165. get { return _items; }
  166. set { _items = value; }
  167. }
  168. }
  169.  
  170. [Serializable]
  171. public class CfImg : CfObject
  172. {
  173. private uint _type;
  174.  
  175. private string _path;
  176.  
  177. [XmlAttribute("type")]
  178. public uint Type
  179. {
  180. get { return _type; }
  181. set { _type = value; }
  182. }
  183.  
  184. [XmlAttribute("path")]
  185. public string Path
  186. {
  187. get { return _path; }
  188. set { _path = value; }
  189. }
  190. }
  191.  
  192. [Serializable]
  193. public class CfDescAddr : CfObject
  194. {
  195. private string _path;
  196.  
  197. [XmlAttribute("path")]
  198. public string Path
  199. {
  200. get { return _path; }
  201. set { _path = value; }
  202.  
  203. }
  204. }
  205.  
  206. [Serializable]
  207. public class CfDescSize : CfObject
  208. {
  209. private string _path;
  210.  
  211. [XmlAttribute("path")]
  212. public string Path
  213. {
  214. get { return _path; }
  215. set { _path = value; }
  216.  
  217. }
  218. }
  219.  
  220. [Serializable]
  221. public class CfDescText : CfObject
  222. {
  223. private string _path;
  224.  
  225. private string _value;
  226.  
  227. private byte _size;
  228.  
  229. [XmlAttribute("path")]
  230. public string Path
  231. {
  232. get { return _path; }
  233. set { _path = value; }
  234.  
  235. }
  236.  
  237. [XmlAttribute("value")]
  238. public string Value
  239. {
  240. get { return _value; }
  241. set { _value = value; }
  242.  
  243. }
  244.  
  245. [XmlAttribute("size")]
  246. public byte Size
  247. {
  248. get { return _size; }
  249. set { _size = value; }
  250.  
  251. }
  252. }
  253.  
  254. [Serializable]
  255. public class CfDescCrc : CfObject
  256. {
  257. private string _path;
  258.  
  259. [XmlAttribute("path")]
  260. public string Path
  261. {
  262. get { return _path; }
  263. set { _path = value; }
  264.  
  265. }
  266. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement