UpdateData.cs 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. using InitializerModel;
  2. using PhihongEv.Lib;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace AwInitilizer.Model
  10. {
  11. public class UpdateData : INotifyPropertyChanged
  12. {
  13. private SystemID _SystemID;
  14. public SystemID SystemID {
  15. get => _SystemID;
  16. set
  17. {
  18. if(_SystemID!=value)
  19. {
  20. _SystemID = value;
  21. RaisePropertyChanged("SystemID");
  22. }
  23. }
  24. }
  25. private string _ModelName;
  26. public string ModelName {
  27. get => _ModelName;
  28. set
  29. {
  30. if(_ModelName!=value)
  31. {
  32. _ModelName = value;
  33. RaisePropertyChanged("ModelName");
  34. }
  35. }
  36. }
  37. private string _SerialNumber;
  38. public string SerialNumber
  39. {
  40. get => _SerialNumber;
  41. set
  42. {
  43. if (_SerialNumber != value)
  44. {
  45. _SerialNumber = value;
  46. RaisePropertyChanged("SerialNumber");
  47. }
  48. }
  49. }
  50. private string _FourGenModuleVersion;
  51. public string FourGenModuleVersion
  52. {
  53. get => _FourGenModuleVersion;
  54. set
  55. {
  56. if (_FourGenModuleVersion != value)
  57. {
  58. _FourGenModuleVersion = value;
  59. RaisePropertyChanged("FourGenModuleVersion");
  60. }
  61. }
  62. }
  63. private string _SubFourGenModuleVersion;
  64. public string SubFourGenModuleVersion
  65. {
  66. get => _SubFourGenModuleVersion;
  67. set
  68. {
  69. if (_SubFourGenModuleVersion != value)
  70. {
  71. _SubFourGenModuleVersion = value;
  72. RaisePropertyChanged("SubFourGenModuleVersion");
  73. }
  74. }
  75. }
  76. private bool _IsSimInsert;
  77. public bool IsSimInsert
  78. {
  79. get => _IsSimInsert;
  80. set
  81. {
  82. if(_IsSimInsert != value)
  83. {
  84. _IsSimInsert = value;
  85. RaisePropertyChanged("IsSimInsert");
  86. }
  87. }
  88. }
  89. private string _SimICCID;
  90. public string SimICCID {
  91. get => _SimICCID;
  92. set
  93. {
  94. if (_SimICCID != value)
  95. {
  96. _SimICCID = value;
  97. RaisePropertyChanged("SimICCID");
  98. RaisePropertyChanged("UiSimICCID");
  99. }
  100. }
  101. }
  102. private string _SimIMSI;
  103. public string SimIMSI
  104. {
  105. get => _SimIMSI;
  106. set
  107. {
  108. if (_SimIMSI != value)
  109. {
  110. _SimIMSI = value;
  111. RaisePropertyChanged("SimIMSI");
  112. RaisePropertyChanged("UiSimIMSI");
  113. }
  114. }
  115. }
  116. private bool _IsSubSimInsert;
  117. public bool IsSubSimInsert
  118. {
  119. get => _IsSubSimInsert;
  120. set
  121. {
  122. if(_IsSubSimInsert != value)
  123. {
  124. _IsSubSimInsert = value;
  125. RaisePropertyChanged("IsSubSimInsert");
  126. }
  127. }
  128. }
  129. private string _SubSimICCID;
  130. public string SubSimICCID
  131. {
  132. get => _SubSimICCID;
  133. set
  134. {
  135. if (_SubSimICCID != value)
  136. {
  137. _SubSimICCID = value;
  138. RaisePropertyChanged("SubSimICCID");
  139. RaisePropertyChanged("UiSimICCID");
  140. }
  141. }
  142. }
  143. private string _SubSimIMSI;
  144. public string SubSimIMSI
  145. {
  146. get => _SubSimIMSI;
  147. set
  148. {
  149. if (_SubSimIMSI != value)
  150. {
  151. _SubSimIMSI = value;
  152. RaisePropertyChanged("SubSimIMSI");
  153. RaisePropertyChanged("UiSimIMSI");
  154. }
  155. }
  156. }
  157. public string UiSimICCID => string.IsNullOrEmpty(SubSimICCID) ? SimICCID : $"{SimICCID}/{SubSimICCID}";
  158. public string UiSimIMSI => string.IsNullOrEmpty(SubSimIMSI) ? SimIMSI : $"{SimIMSI}/{SubSimIMSI}";
  159. private ButtonTestModeType _ButtonTestMode;
  160. public ButtonTestModeType ButtonTestMode
  161. {
  162. get => _ButtonTestMode;
  163. set
  164. {
  165. if (_ButtonTestMode != value)
  166. {
  167. _ButtonTestMode = value;
  168. RaisePropertyChanged("ButtonTestMode");
  169. }
  170. }
  171. }
  172. //private bool _SkipEmergencyButton;
  173. //public bool SkipEmergencyButton
  174. //{
  175. // get => _SkipEmergencyButton;
  176. // set
  177. // {
  178. // if (_SkipEmergencyButton != value)
  179. // {
  180. // _SkipEmergencyButton = value;
  181. // RaisePropertyChanged("SkipEmergencyButton");
  182. // }
  183. // }
  184. //}
  185. //private bool _SkipButtonTest;
  186. //public bool SkipButtonTest
  187. //{
  188. // get => _SkipButtonTest;
  189. // set
  190. // {
  191. // if (_SkipButtonTest != value)
  192. // {
  193. // _SkipButtonTest = value;
  194. // RaisePropertyChanged("SkipButtonTest");
  195. // }
  196. // }
  197. //}
  198. private string _IpAddress;
  199. public string IpAddress
  200. {
  201. get => _IpAddress;
  202. set
  203. {
  204. if (_IpAddress != value)
  205. {
  206. _IpAddress = value;
  207. RaisePropertyChanged("IpAddress");
  208. }
  209. }
  210. }
  211. private bool _IsDisableAuthRequired;
  212. public bool IsDisableAuthRequired
  213. {
  214. get => _IsDisableAuthRequired;
  215. set
  216. {
  217. if (_IsDisableAuthRequired != value)
  218. {
  219. _IsDisableAuthRequired = value;
  220. RaisePropertyChanged("IsDisableAuthRequired");
  221. }
  222. }
  223. }
  224. private List<FirmwareUpdateModel> _FirmwareUpdateModels;
  225. public List<FirmwareUpdateModel> FirmwareUpdateModels
  226. {
  227. get => _FirmwareUpdateModels;
  228. set
  229. {
  230. if (_FirmwareUpdateModels != value)
  231. {
  232. _FirmwareUpdateModels = value;
  233. RaisePropertyChanged("FirmwareUpdateModels");
  234. }
  235. }
  236. }
  237. public event PropertyChangedEventHandler PropertyChanged;
  238. internal void RaisePropertyChanged(string name)
  239. {
  240. PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
  241. }
  242. }
  243. }