终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

228 řádky
8.8 KiB

  1. using BPASmartClient.Helper;
  2. using FryPot_DosingSystem.Control;
  3. using Microsoft.Toolkit.Mvvm.ComponentModel;
  4. using Microsoft.Toolkit.Mvvm.Input;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Collections.ObjectModel;
  8. using System.Linq;
  9. using System.Text;
  10. using System.Threading.Tasks;
  11. namespace FryPot_DosingSystem.ViewModel
  12. {
  13. internal class DebugViewModel : ObservableObject
  14. {
  15. public ObservableCollection<ushort> LineOneRollerCode { get; set; } = new ObservableCollection<ushort>() { 101,102,103,104,105,106,107,108,401,402,403,404,405,406,407,408};
  16. public ObservableCollection<ushort> LineTwoRollerCode { get; set; } = new ObservableCollection<ushort>() {201,202,203,204,205,206,207,208,501,502,503,504,505,506,507,508 };
  17. public ObservableCollection<ushort> LineThreeRollerCode { get; set; } = new ObservableCollection<ushort>() { 301,302,303,304,305,306,307,308};
  18. //滚筒线1绑定命令
  19. public RelayCommand RollerLineRunning { get; set; }
  20. public RelayCommand EightWorkLoc { get; set; }
  21. public RelayCommand FryPotInputArrive { get; set; }
  22. public RelayCommand FryPotEmptyRollerArrive { get; set; }
  23. public RelayCommand LineOneTaskExit { get; set; }
  24. public RelayCommand AGVLOneArrive { get; set; }
  25. public RelayCommand AGVFryPotDownArrive { get; set; }
  26. public RelayCommand AGVFryPotUpArrive { get; set; }
  27. public RelayCommand AGVFryPotGetEmptyRoller { get; set; }
  28. //滚筒线2绑定命令
  29. public RelayCommand RollerLineTwoRunning { get; set; }
  30. //public RelayCommand EightWorkLoc { get; set; }
  31. public RelayCommand FryPotTwoInputArrive { get; set; }
  32. public RelayCommand FryPotTwoEmptyRollerArrive { get; set; }
  33. public RelayCommand LineTwoTaskExit { get; set; }
  34. public RelayCommand AGVLTwoArrive { get; set; }
  35. public RelayCommand AGVFryPotTwoDownArrive { get; set; }
  36. public RelayCommand AGVFryPotTwoUpArrive { get; set; }
  37. public RelayCommand AGVFryPotTwoGetEmptyRoller { get; set; }
  38. //滚筒线3绑定命令
  39. public RelayCommand RollerLineThreeRunning { get; set; }
  40. //public RelayCommand EightWorkLoc { get; set; }
  41. public RelayCommand FryPotThreeInputArrive { get; set; }
  42. public RelayCommand FryPotThreeEmptyRollerArrive { get; set; }
  43. public RelayCommand LineThreeTaskExit { get; set; }
  44. public RelayCommand AGVLThreeArrive { get; set; }
  45. public RelayCommand AGVFryPotThreeDownArrive { get; set; }
  46. public RelayCommand AGVFryPotThreeUpArrive { get; set; }
  47. public RelayCommand AGVFryPotThreeGetEmptyRoller { get; set; }
  48. //AGV接口联调
  49. public RelayCommand AgvDebug { get; set; }
  50. //线体123空桶清洗以及回收
  51. public RelayCommand AgvArriveLineOneEmptyRollerLoc { get; set; }
  52. public RelayCommand AgvArriveLineTwoEmptyRollerLoc { get; set; }
  53. public RelayCommand AgvArriveLineThreeEmptyRollerLoc { get; set; }
  54. public RelayCommand CleanPlateCallAgv { get; set; }
  55. public RelayCommand AgvArriveCleanPlateLoc { get; set; }//下料
  56. public RelayCommand AgvArriveLineFourLoc { get; set; }
  57. public RelayCommand AgvArriveCleanPlateLocLoad { get; set; }//上料
  58. public DebugViewModel()
  59. {
  60. AgvDebug = new RelayCommand(new Action(() =>
  61. {
  62. ActionManage.GetInstance.Send("AgvDebug");
  63. }));
  64. AgvArriveLineOneEmptyRollerLoc = new RelayCommand(new Action(() =>
  65. {
  66. ActionManage.GetInstance.Send("AgvArriveLineOneEmptyRollerLoc");
  67. }));
  68. AgvArriveLineTwoEmptyRollerLoc = new RelayCommand(new Action(() =>
  69. {
  70. ActionManage.GetInstance.Send("AgvArriveLineTwoEmptyRollerLoc");
  71. }));
  72. AgvArriveLineThreeEmptyRollerLoc = new RelayCommand(new Action(() =>
  73. {
  74. ActionManage.GetInstance.Send("AgvArriveLineThreeEmptyRollerLoc");
  75. }));
  76. CleanPlateCallAgv = new RelayCommand(new Action(() =>
  77. {
  78. ActionManage.GetInstance.Send("CleanPlateCallAgv");
  79. }));
  80. AgvArriveCleanPlateLoc = new RelayCommand(new Action(() =>
  81. {
  82. ActionManage.GetInstance.Send("AgvArriveCleanPlateLoc");
  83. }));
  84. AgvArriveCleanPlateLocLoad = new RelayCommand(new Action(() =>
  85. {
  86. ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoad");
  87. }));
  88. AgvArriveLineFourLoc = new RelayCommand(new Action(() =>
  89. {
  90. ActionManage.GetInstance.Send("AgvArriveLineFourLoc");
  91. }));
  92. RollerLineRunning = new RelayCommand(new Action(() =>
  93. {
  94. ActionManage.GetInstance.Send("RollerLineRunning");
  95. }));
  96. FryPotInputArrive = new RelayCommand(new Action(() =>
  97. {
  98. ActionManage.GetInstance.Send("FryPotInputArrive");
  99. }));
  100. FryPotEmptyRollerArrive = new RelayCommand(new Action(() =>
  101. {
  102. ActionManage.GetInstance.Send("FryPotEmptyRollerArrive");
  103. }));
  104. AGVLOneArrive = new RelayCommand(new Action(() =>
  105. {
  106. ActionManage.GetInstance.Send("AGVLOneArrive");
  107. }));
  108. AGVFryPotDownArrive = new RelayCommand(new Action(() =>
  109. {
  110. ActionManage.GetInstance.Send("AGVFryPotDownArrive");
  111. }));
  112. AGVFryPotUpArrive = new RelayCommand(new Action(() =>
  113. {
  114. ActionManage.GetInstance.Send("AGVFryPotUpArrive");
  115. }));
  116. AGVFryPotGetEmptyRoller = new RelayCommand(new Action(() =>
  117. {
  118. ActionManage.GetInstance.Send("AGVFryPotGetEmptyRoller");
  119. }));
  120. //滚筒线2
  121. RollerLineTwoRunning = new RelayCommand(new Action(() =>
  122. {
  123. ActionManage.GetInstance.Send("RollerLineTwoRunning");
  124. }));
  125. FryPotTwoInputArrive = new RelayCommand(new Action(() =>
  126. {
  127. ActionManage.GetInstance.Send("FryPotTwoInputArrive");
  128. }));
  129. FryPotTwoEmptyRollerArrive = new RelayCommand(new Action(() =>
  130. {
  131. ActionManage.GetInstance.Send("FryPotTwoEmptyRollerArrive");
  132. }));
  133. AGVLTwoArrive = new RelayCommand(new Action(() =>
  134. {
  135. ActionManage.GetInstance.Send("AGVLTwoArrive");
  136. }));
  137. AGVFryPotTwoDownArrive = new RelayCommand(new Action(() =>
  138. {
  139. ActionManage.GetInstance.Send("AGVFryPotTwoDownArrive");
  140. }));
  141. AGVFryPotTwoUpArrive = new RelayCommand(new Action(() =>
  142. {
  143. ActionManage.GetInstance.Send("AGVFryPotTwoUpArrive");
  144. }));
  145. AGVFryPotTwoGetEmptyRoller = new RelayCommand(new Action(() =>
  146. {
  147. ActionManage.GetInstance.Send("AGVFryPotTwoGetEmptyRoller");
  148. }));
  149. //滚筒线3
  150. RollerLineThreeRunning = new RelayCommand(new Action(() =>
  151. {
  152. ActionManage.GetInstance.Send("RollerLineThreeRunning");
  153. }));
  154. FryPotThreeInputArrive = new RelayCommand(new Action(() =>
  155. {
  156. ActionManage.GetInstance.Send("FryPotThreeInputArrive");
  157. }));
  158. FryPotThreeEmptyRollerArrive = new RelayCommand(new Action(() =>
  159. {
  160. ActionManage.GetInstance.Send("FryPotThreeEmptyRollerArrive");
  161. }));
  162. AGVLThreeArrive = new RelayCommand(new Action(() =>
  163. {
  164. ActionManage.GetInstance.Send("AGVLThreeArrive");
  165. }));
  166. AGVFryPotThreeDownArrive = new RelayCommand(new Action(() =>
  167. {
  168. ActionManage.GetInstance.Send("AGVFryPotThreeDownArrive");
  169. }));
  170. AGVFryPotThreeUpArrive = new RelayCommand(new Action(() =>
  171. {
  172. ActionManage.GetInstance.Send("AGVFryPotThreeUpArrive");
  173. }));
  174. AGVFryPotThreeGetEmptyRoller = new RelayCommand(new Action(() =>
  175. {
  176. ActionManage.GetInstance.Send("AGVFryPotThreeGetEmptyRoller");
  177. }));
  178. LineOneTaskExit = new RelayCommand(new Action(() =>
  179. {
  180. ActionManage.GetInstance.Send("LineOneTaskExit");
  181. }));
  182. LineTwoTaskExit = new RelayCommand(new Action(() =>
  183. {
  184. ActionManage.GetInstance.Send("LineTwoTaskExit");
  185. }));
  186. LineThreeTaskExit = new RelayCommand(new Action(() =>
  187. {
  188. ActionManage.GetInstance.Send("LineThreeTaskExit");
  189. }));
  190. }
  191. }
  192. }