|
- 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");
- }));
- }
- }
- }
|