AGV_DisMember.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.ComponentModel;
  6. using System.Windows.Controls;
  7. namespace AGV_WPF_DisMember
  8. {
  9. public class AGV_DisMember : INotifyPropertyChanged
  10. {
  11. public string txtAGVNum { get; set; }
  12. public string txtWL { get; set; }
  13. public string txtTrafficNum { get; set; }
  14. public string txtTrafficNumList { get; set; }
  15. public string txtTrafficState { get; set; }
  16. public string txtStatus { get; set; }
  17. public string txtWorkLine { get; set; }
  18. public string txtLineNum { get; set; }
  19. public string txtMarkNum { get; set; }
  20. public string txtMarkFunction { get; set; }
  21. public string txtSpeed { get; set; }
  22. public string txtDockNum { get; set; }
  23. public string txtAgvAlias { get; set; }//AGV别名
  24. public string txtVoltage { get; set; }//电压
  25. public string txtCurrent { get; set; }//温度
  26. public string txtTemperature { get; set; }
  27. public string txtLoadingStatus { get; set; }
  28. public string txtAlerts { get; set; }
  29. public Label AgvLabel;
  30. public Image AgvImage;
  31. public string txtElectricity { get; set; }//电流
  32. public string txtPower { get; set; }//电量
  33. /************************************************************************/
  34. /* 修改日期2014.11.24
  35. * 增加管制区的管制AGV*/
  36. /************************************************************************/
  37. public string txtTrafficAgv { get; set; }
  38. public string txtTrafficAgvList { get; set; }
  39. public string txtOffLineCount { get; set; }//掉线计数
  40. public string txtIsMainAgv { get; set; }
  41. public event PropertyChangedEventHandler PropertyChanged;
  42. public AGV_DisMember()
  43. {
  44. txtAGVNum = "AGV?";
  45. txtAgvAlias = "AGV?";
  46. txtWL = "失败";
  47. txtTrafficNum = "0";
  48. txtTrafficNumList = "0";
  49. txtTrafficState = "初始化...";
  50. txtTrafficAgv = "无";
  51. txtTrafficAgvList = "无";
  52. txtStatus = "初始化...";
  53. txtWorkLine = "0";
  54. txtLineNum = "0";
  55. txtMarkNum = "0";
  56. txtMarkFunction = "初始化...";
  57. txtSpeed = "初始化...";
  58. txtDockNum = "0";
  59. txtOffLineCount = "0";
  60. txtVoltage = "0";
  61. txtPower=txtElectricity = txtCurrent = "0";
  62. txtTemperature = "0";
  63. txtLoadingStatus = "空车";
  64. txtIsMainAgv = "无效";
  65. txtAlerts = "无效";
  66. }
  67. public string txtElectricityValue
  68. {
  69. get { return this.txtElectricity; }
  70. set
  71. {
  72. if (value != this.txtElectricity)
  73. {
  74. this.txtElectricity = value;
  75. NotifyPropertyChanged("txtElectricity");
  76. }
  77. }
  78. }
  79. public string txtPowerValue
  80. {
  81. get { return this.txtPower; }
  82. set
  83. {
  84. if (value != this.txtPower)
  85. {
  86. this.txtPower = value;
  87. NotifyPropertyChanged("txtPower");
  88. }
  89. }
  90. }
  91. public string txtAgvAliasValue
  92. {
  93. get { return txtAgvAlias; }
  94. set
  95. {
  96. if (value != this.txtAgvAlias)
  97. {
  98. txtAgvAlias = value;
  99. NotifyPropertyChanged("txtAgvAlias");
  100. }
  101. }
  102. }
  103. public string txtTrafficAgvValue
  104. {
  105. get { return txtTrafficAgv; }
  106. set
  107. {
  108. if (value != this.txtTrafficAgv)
  109. {
  110. txtTrafficAgv = value;
  111. NotifyPropertyChanged("txtTrafficAgv");
  112. }
  113. }
  114. }
  115. public string txtTrafficAgvListValue
  116. {
  117. get { return txtTrafficAgvList; }
  118. set
  119. {
  120. if (value != this.txtTrafficAgvList)
  121. {
  122. txtTrafficAgvList = value;
  123. NotifyPropertyChanged("txtTrafficAgvList");
  124. }
  125. }
  126. }
  127. public string txtOffLineCountValue
  128. {
  129. get { return txtOffLineCount; }
  130. set
  131. {
  132. if (value != this.txtOffLineCount)
  133. {
  134. txtOffLineCount = value;
  135. NotifyPropertyChanged("txtOffLineCount");
  136. }
  137. }
  138. }
  139. public string txtAGVNumValue
  140. {
  141. get { return this.txtAGVNum; }
  142. set
  143. {
  144. if (value != this.txtAGVNum)
  145. {
  146. this.txtAGVNum = value;
  147. NotifyPropertyChanged("txtAGVNum");
  148. }
  149. }
  150. }
  151. public string txtWLValue
  152. {
  153. get { return this.txtWL; }
  154. set
  155. {
  156. if (value != this.txtWL)
  157. {
  158. this.txtWL = value;
  159. NotifyPropertyChanged("txtWL");
  160. }
  161. }
  162. }
  163. public string txtTrafficNumValue
  164. {
  165. get { return this.txtTrafficNum; }
  166. set
  167. {
  168. if (value != this.txtTrafficNum)
  169. {
  170. this.txtTrafficNum = value;
  171. NotifyPropertyChanged("txtTrafficNum");
  172. }
  173. }
  174. }
  175. public string txtTrafficNumListValue
  176. {
  177. get { return this.txtTrafficNumList; }
  178. set
  179. {
  180. if (value != this.txtTrafficNumList)
  181. {
  182. this.txtTrafficNumList = value;
  183. NotifyPropertyChanged("txtTrafficNumList");
  184. }
  185. }
  186. }
  187. public string txtTrafficStateValue
  188. {
  189. get { return this.txtTrafficState; }
  190. set
  191. {
  192. if (value != this.txtTrafficState)
  193. {
  194. this.txtTrafficState = value;
  195. NotifyPropertyChanged("txtTrafficState");
  196. }
  197. }
  198. }
  199. public string txtStatusValue
  200. {
  201. get { return this.txtStatus; }
  202. set
  203. {
  204. if (value != this.txtStatus)
  205. {
  206. this.txtStatus = value;
  207. NotifyPropertyChanged("txtStatus");
  208. }
  209. }
  210. }
  211. public string txtAlertsValue
  212. {
  213. get { return this.txtAlerts; }
  214. set
  215. {
  216. if (value != this.txtAlerts)
  217. {
  218. this.txtAlerts = value;
  219. NotifyPropertyChanged("txtAlerts");
  220. }
  221. }
  222. }
  223. public string txtWorkLineValue
  224. {
  225. get { return this.txtWorkLine; }
  226. set
  227. {
  228. if (value != this.txtWorkLine)
  229. {
  230. this.txtWorkLine = value;
  231. NotifyPropertyChanged("txtWorkLine");
  232. }
  233. }
  234. }
  235. public string txtLineNumValue
  236. {
  237. get { return this.txtLineNum; }
  238. set
  239. {
  240. if (value != this.txtLineNum)
  241. {
  242. this.txtLineNum = value;
  243. NotifyPropertyChanged("txtLineNum");
  244. }
  245. }
  246. }
  247. public string txtMarkNumValue
  248. {
  249. get { return this.txtMarkNum; }
  250. set
  251. {
  252. if (value != this.txtMarkNum)
  253. {
  254. this.txtMarkNum = value;
  255. NotifyPropertyChanged("txtMarkNum");
  256. }
  257. }
  258. }
  259. public string txtMarkFunctionValue
  260. {
  261. get { return this.txtMarkFunction; }
  262. set
  263. {
  264. if (value != this.txtMarkFunction)
  265. {
  266. this.txtMarkFunction = value;
  267. NotifyPropertyChanged("txtMarkFunction");
  268. }
  269. }
  270. }
  271. public string txtSpeedValue
  272. {
  273. get { return this.txtSpeed; }
  274. set
  275. {
  276. if (value != this.txtSpeed)
  277. {
  278. this.txtSpeed = value;
  279. NotifyPropertyChanged("txtSpeed");
  280. }
  281. }
  282. }
  283. public string txtDockNumValue
  284. {
  285. get { return this.txtDockNum; }
  286. set
  287. {
  288. if (value != this.txtDockNum)
  289. {
  290. this.txtDockNum = value;
  291. NotifyPropertyChanged("txtDockNum");
  292. }
  293. }
  294. }
  295. public string txtVoltageValue
  296. {
  297. get { return this.txtVoltage; }
  298. set
  299. {
  300. if (value != this.txtVoltage)
  301. {
  302. this.txtVoltage = value;
  303. NotifyPropertyChanged("txtVoltage");
  304. }
  305. }
  306. }
  307. public string txtCurrentValue
  308. {
  309. get { return this.txtCurrent; }
  310. set
  311. {
  312. if (value != this.txtCurrent)
  313. {
  314. this.txtCurrent = value;
  315. NotifyPropertyChanged("txtCurrent");
  316. }
  317. }
  318. }
  319. public string txtTemperatureValue
  320. {
  321. get { return this.txtTemperature; }
  322. set
  323. {
  324. if (value != this.txtTemperature)
  325. {
  326. this.txtTemperature = value;
  327. NotifyPropertyChanged("txtTemperature");
  328. }
  329. }
  330. }
  331. public string oldtrafficnum;
  332. public string txtLoadingStatusValue
  333. {
  334. get { return this.txtLoadingStatus; }
  335. set
  336. {
  337. if (value != this.txtLoadingStatus)
  338. {
  339. this.oldtrafficnum = this.txtLoadingStatus;
  340. NotifyPropertyChanged("txtLoadingStatus");
  341. }
  342. }
  343. }
  344. public string txtIsMainAgvValue
  345. {
  346. get { return this.txtIsMainAgv; }
  347. set
  348. {
  349. if (value != this.txtIsMainAgv)
  350. {
  351. this.txtIsMainAgv = value;
  352. }
  353. }
  354. }
  355. private void NotifyPropertyChanged(String info)
  356. {
  357. if (PropertyChanged != null)
  358. {
  359. PropertyChanged(this, new PropertyChangedEventArgs(info));
  360. }
  361. }
  362. /// <summary>
  363. /// Dispose resources
  364. /// </summary>
  365. public void Dispose()
  366. {
  367. // This object will be cleaned up by the Dispose method.
  368. GC.SuppressFinalize(this);
  369. }
  370. }
  371. }