终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 

121 rinda
7.3 KiB

  1. using BPASmartClient.Helper;
  2. using BPASmartClient.MorkF.Model;
  3. using Microsoft.Toolkit.Mvvm.ComponentModel;
  4. using Microsoft.Toolkit.Mvvm.Input;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. namespace BPASmartClient.MorkF.ViewModel
  11. {
  12. internal class DebugViewModel : ObservableObject
  13. {
  14. public bool SimOrderEnable { get { return General_Config.SimOrderAllow; } set { General_Config.SimOrderAllow = value; OnPropertyChanged(); } }
  15. public RelayCommand PlcInite { get; set; }
  16. public RelayCommand SimulateOrder { get; set; }
  17. public RelayCommand MaterialOne { get; set; }
  18. public RelayCommand MaterialTwo { get; set; }
  19. public RelayCommand MaterialThree { get; set; }
  20. public RelayCommand MaterialFour { get; set; }
  21. public RelayCommand MaterialFive { get; set; }
  22. public RelayCommand OpenExhaust { get;set; }
  23. public RelayCommand CloaseExhaust { get; set; }
  24. public RelayCommand StartQXOne { get; set; }
  25. public RelayCommand StartQXTwo { get; set; }
  26. public RelayCommand ShreddCabbage { get; set; }
  27. public RelayCommand FryPork { get; set; }
  28. public RelayCommand XingBaoGu { get; set; }
  29. public RelayCommand TakePot { get; set; }
  30. public RelayCommand TakePotReset { get; set; }
  31. public RelayCommand TakeMaterial { get; set; }
  32. public RelayCommand OutMeal { get; set; }
  33. public RelayCommand AddOil { get; set; }
  34. public RelayCommand TempTurnOff { get; set; }
  35. public RelayCommand OneBlock { get; set; }
  36. public RelayCommand TwoBlock { get; set; }
  37. public RelayCommand ThreeBlock { get; set; }
  38. public RelayCommand OverTurnOff { get; set; }
  39. public RelayCommand OverOneBlock { get; set; }
  40. public RelayCommand OverTwoBlock { get; set; }
  41. public RelayCommand OverThreeBlock { get; set; }
  42. public RelayCommand OverGoOn { get; set; }
  43. public RelayCommand OverGoDown { get; set; }
  44. public RelayCommand AutoModel { get; set; }
  45. public RelayCommand ManualModel { get; set; }
  46. public RelayCommand SecAddOil { get; set; }
  47. public RelayCommand SecTempTurnOff { get; set; }
  48. public RelayCommand SecOneBlock { get; set; }
  49. public RelayCommand SecTwoBlock { get; set; }
  50. public RelayCommand SecThreeBlock { get; set; }
  51. public RelayCommand SecOverTurnOff { get; set; }
  52. public RelayCommand SecOverOneBlock { get; set; }
  53. public RelayCommand SecOverTwoBlock { get; set; }
  54. public RelayCommand SecOverThreeBlock { get; set; }
  55. public RelayCommand SecOverGoOn { get; set; }
  56. public RelayCommand SecOverGoDown { get; set; }
  57. public RelayCommand SecAutoModel { get; set; }
  58. public RelayCommand SecManualModel { get; set; }
  59. public DebugViewModel()
  60. {
  61. PlcInite = new RelayCommand(() => { ActionManage.GetInstance.Send("InitCommand"); });
  62. SimulateOrder = new RelayCommand(() => {ActionManage.GetInstance.Send("SimultaorOrder"); });
  63. MaterialOne= new RelayCommand(() => { ActionManage.GetInstance.Send("MaterialOne"); });
  64. MaterialTwo = new RelayCommand(() => { ActionManage.GetInstance.Send("MaterialTwo"); });
  65. MaterialThree = new RelayCommand(() => { ActionManage.GetInstance.Send("MaterialThree"); });
  66. MaterialFour = new RelayCommand(() => { ActionManage.GetInstance.Send("MaterialFour"); });
  67. MaterialFive = new RelayCommand(() => { ActionManage.GetInstance.Send("MaterialFive"); });
  68. OpenExhaust = new RelayCommand(() => { ActionManage.GetInstance.Send("OpenExhaust"); });
  69. CloaseExhaust = new RelayCommand(() => { ActionManage.GetInstance.Send("CloseExhaust"); });
  70. StartQXOne=new RelayCommand(() => { ActionManage.GetInstance.Send("StartQXOne",1); });
  71. StartQXTwo = new RelayCommand(() => { ActionManage.GetInstance.Send("StartQXTwo",2); });
  72. ShreddCabbage = new RelayCommand(() => { ActionManage.GetInstance.Send("ShreddCabbage"); });
  73. FryPork = new RelayCommand(() => { ActionManage.GetInstance.Send("FryPork"); });
  74. XingBaoGu = new RelayCommand(() => { ActionManage.GetInstance.Send("XingBaoGu"); });
  75. TakePot = new RelayCommand(() => { ActionManage.GetInstance.Send("TakePot"); });
  76. TakePotReset = new RelayCommand(() => { ActionManage.GetInstance.Send("TakePotReset"); });
  77. TakeMaterial= new RelayCommand(() => { ActionManage.GetInstance.Send("TakeMaterial"); });
  78. OutMeal = new RelayCommand(() => { ActionManage.GetInstance.Send("OutMeal"); });
  79. AddOil = new RelayCommand(() => { ActionManage.GetInstance.Send("AddOil", 1); });
  80. TempTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("TakeOff", 1); });
  81. OneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OneBlock",1); });
  82. TwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("TwoBlock",1); });
  83. ThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("ThreeBlock",1); });
  84. OverTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTurnOff",1); });
  85. OverOneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverOneBlock",1); });
  86. OverTwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTwoBlock",1); });
  87. OverThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverThreeBlock",1); });
  88. OverGoOn = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoOn",1); });
  89. OverGoDown = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoDown",1); });
  90. AutoModel = new RelayCommand(()=>{ActionManage.GetInstance.Send("AutoModel",1); });
  91. ManualModel = new RelayCommand(() => { ActionManage.GetInstance.Send("ManualModel",1); });
  92. SecAddOil = new RelayCommand(() => { ActionManage.GetInstance.Send("AddOil", 2); });
  93. SecTempTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("TakeOff", 2); });
  94. SecOneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OneBlock", 2); });
  95. SecTwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("TwoBlock", 2); });
  96. SecThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("ThreeBlock", 2); });
  97. SecOverTurnOff = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTurnOff", 2); });
  98. SecOverOneBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverOneBlock", 2); });
  99. SecOverTwoBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverTwoBlock", 2); });
  100. SecOverThreeBlock = new RelayCommand(() => { ActionManage.GetInstance.Send("OverThreeBlock", 2); });
  101. SecOverGoOn = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoOn", 2); });
  102. SecOverGoDown = new RelayCommand(() => { ActionManage.GetInstance.Send("OverGoDown", 2); });
  103. SecAutoModel = new RelayCommand(() => { ActionManage.GetInstance.Send("AutoModel", 2); });
  104. SecManualModel = new RelayCommand(() => { ActionManage.GetInstance.Send("ManualModel", 2); });
  105. }
  106. }
  107. }