终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

166 lines
6.2 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 AGVLOneArrive { get; set; }
  24. public RelayCommand AGVFryPotDownArrive { get; set; }
  25. public RelayCommand AGVFryPotUpArrive { get; set; }
  26. public RelayCommand AGVFryPotGetEmptyRoller { get; set; }
  27. //滚筒线2绑定命令
  28. public RelayCommand RollerLineTwoRunning { get; set; }
  29. //public RelayCommand EightWorkLoc { get; set; }
  30. public RelayCommand FryPotTwoInputArrive { get; set; }
  31. public RelayCommand FryPotTwoEmptyRollerArrive { get; set; }
  32. public RelayCommand AGVLTwoArrive { get; set; }
  33. public RelayCommand AGVFryPotTwoDownArrive { get; set; }
  34. public RelayCommand AGVFryPotTwoUpArrive { get; set; }
  35. public RelayCommand AGVFryPotTwoGetEmptyRoller { get; set; }
  36. //滚筒线3绑定命令
  37. public RelayCommand RollerLineThreeRunning { get; set; }
  38. //public RelayCommand EightWorkLoc { get; set; }
  39. public RelayCommand FryPotThreeInputArrive { get; set; }
  40. public RelayCommand FryPotThreeEmptyRollerArrive { get; set; }
  41. public RelayCommand AGVLThreeArrive { get; set; }
  42. public RelayCommand AGVFryPotThreeDownArrive { get; set; }
  43. public RelayCommand AGVFryPotThreeUpArrive { get; set; }
  44. public RelayCommand AGVFryPotThreeGetEmptyRoller { get; set; }
  45. public DebugViewModel()
  46. {
  47. RollerLineRunning = new RelayCommand(new Action(() =>
  48. {
  49. ActionManage.GetInstance.Send("RollerLineRunning");
  50. }));
  51. FryPotInputArrive = new RelayCommand(new Action(() =>
  52. {
  53. ActionManage.GetInstance.Send("FryPotInputArrive");
  54. }));
  55. FryPotEmptyRollerArrive = new RelayCommand(new Action(() =>
  56. {
  57. ActionManage.GetInstance.Send("FryPotEmptyRollerArrive");
  58. }));
  59. AGVLOneArrive = new RelayCommand(new Action(() =>
  60. {
  61. ActionManage.GetInstance.Send("AGVLOneArrive");
  62. }));
  63. AGVFryPotDownArrive = new RelayCommand(new Action(() =>
  64. {
  65. ActionManage.GetInstance.Send("AGVFryPotDownArrive");
  66. }));
  67. AGVFryPotUpArrive = new RelayCommand(new Action(() =>
  68. {
  69. ActionManage.GetInstance.Send("AGVFryPotUpArrive");
  70. }));
  71. AGVFryPotGetEmptyRoller = new RelayCommand(new Action(() =>
  72. {
  73. ActionManage.GetInstance.Send("AGVFryPotGetEmptyRoller");
  74. }));
  75. //滚筒线2
  76. RollerLineTwoRunning = new RelayCommand(new Action(() =>
  77. {
  78. ActionManage.GetInstance.Send("RollerLineTwoRunning");
  79. }));
  80. FryPotTwoInputArrive = new RelayCommand(new Action(() =>
  81. {
  82. ActionManage.GetInstance.Send("FryPotTwoInputArrive");
  83. }));
  84. FryPotTwoEmptyRollerArrive = new RelayCommand(new Action(() =>
  85. {
  86. ActionManage.GetInstance.Send("FryPotTwoEmptyRollerArrive");
  87. }));
  88. AGVLTwoArrive = new RelayCommand(new Action(() =>
  89. {
  90. ActionManage.GetInstance.Send("AGVLTwoArrive");
  91. }));
  92. AGVFryPotTwoDownArrive = new RelayCommand(new Action(() =>
  93. {
  94. ActionManage.GetInstance.Send("AGVFryPotTwoDownArrive");
  95. }));
  96. AGVFryPotTwoUpArrive = new RelayCommand(new Action(() =>
  97. {
  98. ActionManage.GetInstance.Send("AGVFryPotTwoUpArrive");
  99. }));
  100. AGVFryPotTwoGetEmptyRoller = new RelayCommand(new Action(() =>
  101. {
  102. ActionManage.GetInstance.Send("AGVFryPotTwoGetEmptyRoller");
  103. }));
  104. //滚筒线3
  105. RollerLineThreeRunning = new RelayCommand(new Action(() =>
  106. {
  107. ActionManage.GetInstance.Send("RollerLineThreeRunning");
  108. }));
  109. FryPotThreeInputArrive = new RelayCommand(new Action(() =>
  110. {
  111. ActionManage.GetInstance.Send("FryPotThreeInputArrive");
  112. }));
  113. FryPotThreeEmptyRollerArrive = new RelayCommand(new Action(() =>
  114. {
  115. ActionManage.GetInstance.Send("FryPotThreeEmptyRollerArrive");
  116. }));
  117. AGVLThreeArrive = new RelayCommand(new Action(() =>
  118. {
  119. ActionManage.GetInstance.Send("AGVLThreeArrive");
  120. }));
  121. AGVFryPotThreeDownArrive = new RelayCommand(new Action(() =>
  122. {
  123. ActionManage.GetInstance.Send("AGVFryPotThreeDownArrive");
  124. }));
  125. AGVFryPotThreeUpArrive = new RelayCommand(new Action(() =>
  126. {
  127. ActionManage.GetInstance.Send("AGVFryPotThreeUpArrive");
  128. }));
  129. AGVFryPotThreeGetEmptyRoller = new RelayCommand(new Action(() =>
  130. {
  131. ActionManage.GetInstance.Send("AGVFryPotThreeGetEmptyRoller");
  132. }));
  133. }
  134. }
  135. }