|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- using BPASmartClient.Helper;
- using FryPot_DosingSystem.Control;
- using Microsoft.Toolkit.Mvvm.ComponentModel;
- using Microsoft.Toolkit.Mvvm.Input;
- using System;
- using System.Collections.Generic;
- using System.Collections.ObjectModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Input;
-
- namespace FryPot_DosingSystem.ViewModel
- {
- internal class DebugViewModel : ObservableObject
- {
- 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};
- 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 };
- public ObservableCollection<ushort> LineThreeRollerCode { get; set; } = new ObservableCollection<ushort>() { 301,302,303,304,305,306,307,308};
- //滚筒线1绑定命令
- public RelayCommand RollerLineRunning { get; set; }
- public RelayCommand EightWorkLoc { get; set; }
- public RelayCommand FryPotInputArrive { get; set; }
- public RelayCommand FryPotEmptyRollerArrive { get; set; }
- public RelayCommand LineOneTaskExit { get; set; }
- public RelayCommand LineOneRecipeComSignal { get; set; }
-
- public RelayCommand AGVLOneArrive { get; set; }
- public RelayCommand AGVFryPotDownArrive { get; set; }
- public RelayCommand AGVFryPotUpArrive { get; set; }
- public RelayCommand AGVFryPotGetEmptyRoller { get; set; }
- public RelayCommand AGVLineOneLoadCom { get; set; }//线体1上料完成
-
- //滚筒线2绑定命令
- public RelayCommand RollerLineTwoRunning { get; set; }
- //public RelayCommand EightWorkLoc { get; set; }
- public RelayCommand FryPotTwoInputArrive { get; set; }
- public RelayCommand FryPotTwoEmptyRollerArrive { get; set; }
- public RelayCommand LineTwoTaskExit { get; set; }
- public RelayCommand LineTwoRecipeComSignal { get; set; }
-
- public RelayCommand AGVLTwoArrive { get; set; }
- public RelayCommand AGVFryPotTwoDownArrive { get; set; }
- public RelayCommand AGVFryPotTwoUpArrive { get; set; }
- public RelayCommand AGVFryPotTwoGetEmptyRoller { get; set; }
- public RelayCommand AGVLineTwoLoadCom { get; set; }//线体2上料完成
- //滚筒线3绑定命令
- public RelayCommand RollerLineThreeRunning { get; set; }
- //public RelayCommand EightWorkLoc { get; set; }
- public RelayCommand FryPotThreeInputArrive { get; set; }
- public RelayCommand FryPotThreeEmptyRollerArrive { get; set; }
- public RelayCommand LineThreeTaskExit { get; set; }
- public RelayCommand LineThreeRecipeComSignal { get; set; }
-
- public RelayCommand AGVLThreeArrive { get; set; }
- public RelayCommand AGVFryPotThreeDownArrive { get; set; }
- public RelayCommand AGVFryPotThreeUpArrive { get; set; }
- public RelayCommand AGVFryPotThreeGetEmptyRoller { get; set; }
- public RelayCommand AGVLineThreeLoadCom { get; set; }//线体3上料完成
-
- //AGV接口联调
- public RelayCommand AgvDebug { get; set; }
-
- //线体123空桶清洗以及回收
- public RelayCommand AgvArriveLineOneEmptyRollerLoc { get; set; }
-
- public RelayCommand AgvLineOneLoadEmptyCom { get; set; }
- public RelayCommand AgvArriveLineTwoEmptyRollerLoc { get; set; }
- public RelayCommand AgvLineTwoLoadEmptyCom { get; set; }
- public RelayCommand AgvArriveLineThreeEmptyRollerLoc { get; set; }
- public RelayCommand AgvLineThreeLoadEmptyCom { get; set; }
- public RelayCommand CleanPlateCallAgv { get; set; }
- public RelayCommand AgvArriveCleanPlateLoc { get; set; }//下料
- public RelayCommand AgvArriveCleanPlateLocCom { get; set; }//下料完成
- public RelayCommand AgvArriveLineFourLoc { get; set; }//下料
- public RelayCommand AgvArriveLineFourLocCom { get; set; }//4号线空桶下料完成
- public RelayCommand AgvArriveCleanPlateLocLoad { get; set; }//上料
- public RelayCommand AgvArriveCleanPlateLocLoadCom { get; set; }//上料完成
- public RelayCommand EmptyRollerCleanTaskRestart { get; set; }
-
- public RelayCommand LineTwoEmptyRollerCleanTaskRestart { get; set; }
-
- public RelayCommand LineThreeEmptyRollerCleanTaskRestart { get; set; }
-
-
- public DebugViewModel()
- {
- AgvDebug = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvDebug");
- }));
- AgvArriveCleanPlateLocCom = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveCleanPlateLocCom");
-
- });
- AgvArriveLineFourLocCom = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveLineFourLocCom");
- });
- AgvArriveCleanPlateLocLoadCom = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoadCom");
- });
- LineOneRecipeComSignal = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("LineOneRecipeComSignal");
- });
- LineTwoRecipeComSignal = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("LineTwoRecipeComSignal");
- });
- LineThreeRecipeComSignal = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("LineThreeRecipeComSignal");
- });
- EmptyRollerCleanTaskRestart = new RelayCommand(() =>
- {
-
- ActionManage.GetInstance.Send("EmptyRollerCleanTaskRestart");
- });
- LineTwoEmptyRollerCleanTaskRestart = new RelayCommand(() =>
- {
-
- ActionManage.GetInstance.Send("LineTwoEmptyRollerCleanTaskRestart");
- });
- LineThreeEmptyRollerCleanTaskRestart = new RelayCommand(() =>
- {
-
- ActionManage.GetInstance.Send("LineThreeEmptyRollerCleanTaskRestart");
- });
- AgvLineOneLoadEmptyCom = new RelayCommand(() => {
- ActionManage.GetInstance.Send("AgvLineOneLoadEmptyCom");
- });
- AgvLineTwoLoadEmptyCom = new RelayCommand(() => {
- ActionManage.GetInstance.Send("AgvLineTwoLoadEmptyCom");
- });
- AgvLineThreeLoadEmptyCom = new RelayCommand(() => {
- ActionManage.GetInstance.Send("AgvLineThreeLoadEmptyCom");
- });
- AGVLineOneLoadCom = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("AGVLineOneLoadCom");
-
- });
- AGVLineTwoLoadCom = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("AGVLineTwoLoadCom");
-
- });
- AGVLineThreeLoadCom = new RelayCommand(() =>
- {
- ActionManage.GetInstance.Send("AGVLineThreeLoadCom");
-
- });
- AgvArriveLineOneEmptyRollerLoc = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveLineOneEmptyRollerLoc");
- }));
- AgvArriveLineTwoEmptyRollerLoc = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveLineTwoEmptyRollerLoc");
- }));
- AgvArriveLineThreeEmptyRollerLoc = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveLineThreeEmptyRollerLoc");
- }));
- CleanPlateCallAgv = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("CleanPlateCallAgv");
- }));
- AgvArriveCleanPlateLoc = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveCleanPlateLoc");
- }));
- AgvArriveCleanPlateLocLoad = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveCleanPlateLocLoad");
- }));
- AgvArriveLineFourLoc = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AgvArriveLineFourLoc");
- }));
-
- RollerLineRunning = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("RollerLineRunning");
-
- }));
-
- FryPotInputArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("FryPotInputArrive");
-
- }));
- FryPotEmptyRollerArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("FryPotEmptyRollerArrive");
-
- }));
- AGVLOneArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVLOneArrive");
-
- }));
- AGVFryPotDownArrive = new RelayCommand(new Action(() =>
- {
-
- ActionManage.GetInstance.Send("AGVFryPotDownArrive");
- }));
- AGVFryPotUpArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVFryPotUpArrive");
-
- }));
- AGVFryPotGetEmptyRoller = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVFryPotGetEmptyRoller");
- }));
- //滚筒线2
- RollerLineTwoRunning = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("RollerLineTwoRunning");
-
- }));
-
- FryPotTwoInputArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("FryPotTwoInputArrive");
-
- }));
- FryPotTwoEmptyRollerArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("FryPotTwoEmptyRollerArrive");
-
- }));
- AGVLTwoArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVLTwoArrive");
-
- }));
- AGVFryPotTwoDownArrive = new RelayCommand(new Action(() =>
- {
-
- ActionManage.GetInstance.Send("AGVFryPotTwoDownArrive");
- }));
- AGVFryPotTwoUpArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVFryPotTwoUpArrive");
-
- }));
- AGVFryPotTwoGetEmptyRoller = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVFryPotTwoGetEmptyRoller");
- }));
- //滚筒线3
- RollerLineThreeRunning = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("RollerLineThreeRunning");
-
- }));
-
- FryPotThreeInputArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("FryPotThreeInputArrive");
-
- }));
- FryPotThreeEmptyRollerArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("FryPotThreeEmptyRollerArrive");
-
- }));
- AGVLThreeArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVLThreeArrive");
-
- }));
- AGVFryPotThreeDownArrive = new RelayCommand(new Action(() =>
- {
-
- ActionManage.GetInstance.Send("AGVFryPotThreeDownArrive");
- }));
- AGVFryPotThreeUpArrive = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVFryPotThreeUpArrive");
-
- }));
- AGVFryPotThreeGetEmptyRoller = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("AGVFryPotThreeGetEmptyRoller");
- }));
-
- LineOneTaskExit = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("LineOneTaskExit");
- }));
- LineTwoTaskExit = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("LineTwoTaskExit");
- }));
- LineThreeTaskExit = new RelayCommand(new Action(() =>
- {
- ActionManage.GetInstance.Send("LineThreeTaskExit");
- }));
- }
- }
- }
|