diff --git a/FryPot_DosingSystem/App.xaml.cs b/FryPot_DosingSystem/App.xaml.cs index b871a928..cc270088 100644 --- a/FryPot_DosingSystem/App.xaml.cs +++ b/FryPot_DosingSystem/App.xaml.cs @@ -52,7 +52,7 @@ namespace FryPot_DosingSystem RecipeManage.Add(new SubMenumodel() { SubMenuName = "配方管理", - SubMenuPermission = new Permission[] { Permission.管理员 }, + SubMenuPermission = new Permission[] { Permission.管理员,Permission.技术员 }, AssemblyName = "FryPot_DosingSystem", ToggleWindowPath = "View.RecipeSetView" }); @@ -60,7 +60,7 @@ namespace FryPot_DosingSystem RecipeManage.Add(new SubMenumodel() { SubMenuName = "配方下发", - SubMenuPermission = new Permission[] { Permission.操作员,Permission.管理员 }, + SubMenuPermission = new Permission[] { Permission.操作员,Permission.管理员,Permission.技术员 }, AssemblyName = "FryPot_DosingSystem", ToggleWindowPath = "View.RecipeSendDownView" }); @@ -70,7 +70,7 @@ namespace FryPot_DosingSystem MainMenuIcon = "", MainMenuName = "配方管理", Alias = "Recipe Management", - MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员 }, + MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员,Permission.技术员 }, subMenumodels = RecipeManage, }); #endregion @@ -115,18 +115,19 @@ namespace FryPot_DosingSystem ObservableCollection DeviceMonitor = new ObservableCollection(); DeviceMonitor.Add(new SubMenumodel() { - SubMenuName = "原料设备列表", - SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, + SubMenuName = "PLC通讯设置", + SubMenuPermission = new Permission[] { Permission.管理员, Permission.技术员 }, AssemblyName = "FryPot_DosingSystem", - ToggleWindowPath = "View.DeviceListView" + ToggleWindowPath = "View.DeviceListVIew" }); DeviceMonitor.Add(new SubMenumodel() { - SubMenuName = "设备状态", - SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, + SubMenuName = "滚筒线运行状态", + SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员,Permission.观察员 }, AssemblyName = "FryPot_DosingSystem", ToggleWindowPath = "View.HardWareStatusView" + }); @@ -135,7 +136,7 @@ namespace FryPot_DosingSystem MainMenuIcon = "", MainMenuName = "设备监控", Alias = "Device Monitor", - MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, + MainMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员,Permission.观察员 }, subMenumodels = DeviceMonitor, }); #endregion @@ -153,7 +154,7 @@ namespace FryPot_DosingSystem UserManager.Add(new SubMenumodel() { SubMenuName = "密码修改", - SubMenuPermission = new Permission[] { Permission.管理员, Permission.操作员, Permission.技术员 }, + SubMenuPermission = new Permission[] { Permission.管理员, Permission.技术员 }, AssemblyName = "BPASmartClient.CustomResource", ToggleWindowPath = "Pages.View.PasswordChangeView" }); diff --git a/FryPot_DosingSystem/Control/DosingLogicControl.cs b/FryPot_DosingSystem/Control/DosingLogicControl.cs index a9feba2a..748d1afe 100644 --- a/FryPot_DosingSystem/Control/DosingLogicControl.cs +++ b/FryPot_DosingSystem/Control/DosingLogicControl.cs @@ -16,6 +16,7 @@ using System.Text; using System.Threading; using System.Threading.Tasks; using System.Windows.Media; +using System.Windows; namespace FryPot_DosingSystem.Control { @@ -73,7 +74,7 @@ namespace FryPot_DosingSystem.Control ReadPlcData(); IniteTask(); } - + /// /// AGV上下料上报数据解析 /// @@ -88,15 +89,15 @@ namespace FryPot_DosingSystem.Control { if (upDownReportData.body != null && upDownReportData.body is UpstreamrequestBody body) { - if (body.robotJobId== robotJobId && body.command == "LOAD")//同一任务号且处于上料阶段 + if (body.robotJobId == robotJobId && body.command == "LOAD")//同一任务号且处于上料阶段 { agvArriveUpLoad = true;//AGV到达上料位置 } - if ( body.robotJobId== robotJobId && body.command == "UNLOAD")//同一任务号且处于下料阶段 + if (body.robotJobId == robotJobId && body.command == "UNLOAD")//同一任务号且处于下料阶段 { agvArriveUnLoad = true;//AGV到达下料位置 } - + } } } @@ -116,7 +117,7 @@ namespace FryPot_DosingSystem.Control { if (agvUpReportData.body != null && agvUpReportData.body is AGVToUpSystemBody body) { - if (body.state == "ROLLER_LOAD_FINISH"&&body.jobData.startPointCode=="")//上料完成以及到达指定上料点位 + if (body.state == "ROLLER_LOAD_FINISH" && body.jobData.startPointCode == "")//上料完成以及到达指定上料点位 { agvFryPotEmptyRollerArrive = true; } @@ -260,12 +261,14 @@ namespace FryPot_DosingSystem.Control globalVar.CleadBarrelExitSingle = data[0]; })); - globalVar.rollerLineOne.OutMaterialingSingle = 1; - globalVar.rollerLineOne.StationOne = 401; + //globalVar.rollerLineOne.OutMaterialingSingle = 0; + //globalVar.rollerLineOne.StationOne = 401; + //globalVar.rollerLineOne.StationTwo = 402; + //globalVar.rollerLineOne.OutMaterialingTroubleSingle = 1; RollerLineStatusDisplay(); Thread.Sleep(10); }), "MainViewReadPlcData"); - + } /// /// 滚筒线运行状态显示 @@ -275,26 +278,30 @@ namespace FryPot_DosingSystem.Control hardWareStatusModel.RollerOneModel.LocOneRollerSerial = globalVar.rollerLineOne.StationOne; hardWareStatusModel.RollerOneModel.LocTwoRollerSerial = globalVar.rollerLineOne.StationTwo; hardWareStatusModel.RollerOneModel.LocThreeRollerSerial = globalVar.rollerLineOne.StationThree; - hardWareStatusModel.RollerOneModel.LocFourRollerSerial=globalVar.rollerLineOne.StationFour; - hardWareStatusModel.RollerOneModel.LocFiveRollerSerial=globalVar.rollerLineOne.StationFive; + hardWareStatusModel.RollerOneModel.LocFourRollerSerial = globalVar.rollerLineOne.StationFour; + hardWareStatusModel.RollerOneModel.LocFiveRollerSerial = globalVar.rollerLineOne.StationFive; hardWareStatusModel.RollerOneModel.LocSixRollerSerial = globalVar.rollerLineOne.StationSix; hardWareStatusModel.RollerOneModel.LocSevenRollerSerial = globalVar.rollerLineOne.StationSeven; hardWareStatusModel.RollerOneModel.LocEightRollerSerial = globalVar.rollerLineOne.StationEight; if (globalVar.rollerLineOne.OutMaterialingTroubleSingle == 0) { - // ActionManage.GetInstance.Send("RedToGray", 1);//无故障 + + hardWareStatusModel.RollerOneModel.RollerAlarmState = Color.FromRgb(130, 232, 139);//无故障 } else { - // ActionManage.GetInstance.Send("ToRed",1);//有故障 + + hardWareStatusModel.RollerOneModel.RollerAlarmState = Color.FromRgb(255, 51, 153);//有故障 } if (globalVar.rollerLineOne.OutMaterialingSingle == 1)//运行中 { - // ActionManage.GetInstance.Send("ToGreen",1); + + hardWareStatusModel.RollerOneModel.RollerRunState = Color.FromRgb(130, 232, 139);//运行中 } else { - // ActionManage.GetInstance.Send("GreenToGray",1); //未运行 + + hardWareStatusModel.RollerOneModel.RollerRunState = Color.FromRgb(84, 84, 84);//未运行 } hardWareStatusModel.RollerTwoModel.LocOneRollerSerial = globalVar.rollerLineTwo.StationOne; hardWareStatusModel.RollerTwoModel.LocTwoRollerSerial = globalVar.rollerLineTwo.StationTwo; @@ -306,22 +313,22 @@ namespace FryPot_DosingSystem.Control hardWareStatusModel.RollerTwoModel.LocEightRollerSerial = globalVar.rollerLineTwo.StationEight; if (globalVar.rollerLineTwo.OutMaterialingTroubleSingle == 0) { - //ActionManage.GetInstance.Send("RedToGray", 2);//无故障 + hardWareStatusModel.RollerTwoModel.RollerAlarmState = Color.FromRgb(130, 232, 139);//无故障 } else { - //ActionManage.GetInstance.Send("ToRed", 2);//有故障 + hardWareStatusModel.RollerTwoModel.RollerAlarmState = Color.FromRgb(255, 51, 153);//有故障 } if (globalVar.rollerLineTwo.OutMaterialingSingle == 1)//运行中 { - // ActionManage.GetInstance.Send("ToGreen",2); + hardWareStatusModel.RollerTwoModel.RollerRunState = Color.FromRgb(130, 232, 139);//运行中 } else { - // ActionManage.GetInstance.Send("GreenToGray", 2);//未运行 + hardWareStatusModel.RollerTwoModel.RollerRunState = Color.FromRgb(84, 84, 84);//未运行 } hardWareStatusModel.RollerThreeModel.LocOneRollerSerial = globalVar.rollerLineThree.StationOne; hardWareStatusModel.RollerThreeModel.LocTwoRollerSerial = globalVar.rollerLineThree.StationTwo; @@ -333,20 +340,22 @@ namespace FryPot_DosingSystem.Control hardWareStatusModel.RollerThreeModel.LocEightRollerSerial = globalVar.rollerLineThree.StationEight; if (globalVar.rollerLineThree.OutMaterialingTroubleSingle == 0) { - // ActionManage.GetInstance.Send("RedToGray", 3);//无故障 + hardWareStatusModel.RollerThreeModel.RollerAlarmState = Color.FromRgb(130, 232, 139);//无故障 } else { - // ActionManage.GetInstance.Send("ToRed", 3);//有故障 + hardWareStatusModel.RollerThreeModel.RollerAlarmState = Color.FromRgb(255, 51, 153);//有故障 } if (globalVar.rollerLineThree.OutMaterialingSingle == 1)//运行中 { - // ActionManage.GetInstance.Send("ToGreen", 3); + hardWareStatusModel.RollerThreeModel.RollerRunState = Color.FromRgb(130, 232, 139);//运行中 } else { - //ActionManage.GetInstance.Send("GreenToGray",3);//未运行 + hardWareStatusModel.RollerThreeModel.RollerRunState = Color.FromRgb(84, 84, 84);//未运行 } + //滚筒线4 + } /// /// 返回指定地址指定长度的数据 @@ -385,12 +394,18 @@ namespace FryPot_DosingSystem.Control /// public void RecipeDataParse(object obj) { - if (obj != null && obj is NewRecipeModel recipe) + Task.Run(new Action(() => { - RecipeQuene.Enqueue(recipe); - ReicpeNum++; - MessageLog.GetInstance.ShowRunLog($"接收到{ReicpeNum}个配方"); - } + if (obj != null && obj is NewRecipeModel recipe) + { + RecipeQuene.Enqueue(recipe); + ReicpeNum++; + MessageLog.GetInstance.ShowRunLog($"接收到第{ReicpeNum}个配方"); + } + + })); + + } /// @@ -652,7 +667,7 @@ namespace FryPot_DosingSystem.Control switch (OutputMaterialQuene.ElementAt(0).materialType.MaterialLoc / 100) { case 1: - erp: string id = Guid.NewGuid().ToString();//上游唯一ID + erp: string id = Guid.NewGuid().ToString("N");//上游唯一ID if (id == robotJobId) { goto erp; @@ -661,7 +676,7 @@ namespace FryPot_DosingSystem.Control robotJobId = id; FryCarryTaskErrorCodeAnalysis(info, 1); break; case 2: - erp1: string id1 = Guid.NewGuid().ToString();//上游唯一ID + erp1: string id1 = Guid.NewGuid().ToString("N");//上游唯一ID if (id1 == robotJobId) { goto erp1; @@ -670,7 +685,7 @@ namespace FryPot_DosingSystem.Control robotJobId = id1; FryCarryTaskErrorCodeAnalysis(info1, 2); break; case 3: - erp2: string id2 = Guid.NewGuid().ToString();//上游唯一ID + erp2: string id2 = Guid.NewGuid().ToString("N");//上游唯一ID if (id2 == robotJobId) { goto erp2; @@ -679,7 +694,7 @@ namespace FryPot_DosingSystem.Control robotJobId = id2; FryCarryTaskErrorCodeAnalysis(info2, 3); break; case 4: - erp3: string id3 = Guid.NewGuid().ToString();//上游唯一ID + erp3: string id3 = Guid.NewGuid().ToString("N");//上游唯一ID if (id3 == robotJobId) { goto erp3; @@ -688,7 +703,7 @@ namespace FryPot_DosingSystem.Control robotJobId = id3; FryCarryTaskErrorCodeAnalysis(info3, 4); break; case 5: - erp4: string id4 = Guid.NewGuid().ToString();//上游唯一ID + erp4: string id4 = Guid.NewGuid().ToString("N");//上游唯一ID if (id4 == robotJobId) { goto erp4; @@ -878,7 +893,7 @@ namespace FryPot_DosingSystem.Control if (globalVar.ExitMainTask) return; } - e: string id = Guid.NewGuid().ToString(); + e: string id = Guid.NewGuid().ToString("N"); if (id == robotJobId) goto e; string info = AGVHelper.GetInstance.AgvToLineOneLoadRoller(id); @@ -910,7 +925,7 @@ namespace FryPot_DosingSystem.Control if (id == robotJobId) goto p; string info = AGVHelper.GetInstance.AgvToLineTwoLoadRoller(id); - robotJobId= id; + robotJobId = id; Thread.Sleep(500); LineCarryTaskErrorCodeAnalysis(info, 2); } @@ -935,8 +950,8 @@ namespace FryPot_DosingSystem.Control if (globalVar.ExitMainTask) return; } - g: string id = Guid.NewGuid().ToString(); - if(id==robotJobId) + g: string id = Guid.NewGuid().ToString(); + if (id == robotJobId) goto g; string info = AGVHelper.GetInstance.AgvToLineThreeLoadRoller(id); robotJobId = id; diff --git a/FryPot_DosingSystem/Model/RollerLineBarrelSerialModel.cs b/FryPot_DosingSystem/Model/RollerLineBarrelSerialModel.cs index a1aa6f0f..3f01b166 100644 --- a/FryPot_DosingSystem/Model/RollerLineBarrelSerialModel.cs +++ b/FryPot_DosingSystem/Model/RollerLineBarrelSerialModel.cs @@ -10,35 +10,35 @@ namespace FryPot_DosingSystem.Model { internal class RollerLineBarrelSerialModel:ObservableObject { - private int _locOneRollerSerial; - public int LocOneRollerSerial { get { return _locOneRollerSerial; } set { _locOneRollerSerial = value;OnPropertyChanged(); } } + private ushort _locOneRollerSerial; + public ushort LocOneRollerSerial { get { return _locOneRollerSerial; } set { _locOneRollerSerial = value;OnPropertyChanged(); } } - private int _locTwoRollerSerial; - public int LocTwoRollerSerial { get { return _locTwoRollerSerial; } set { _locTwoRollerSerial = value; OnPropertyChanged(); } } + private ushort _locTwoRollerSerial; + public ushort LocTwoRollerSerial { get { return _locTwoRollerSerial; } set { _locTwoRollerSerial = value; OnPropertyChanged(); } } - private int _locThreeRollerSerial; - public int LocThreeRollerSerial { get { return _locThreeRollerSerial; } set { _locThreeRollerSerial = value; OnPropertyChanged(); } } + private ushort _locThreeRollerSerial; + public ushort LocThreeRollerSerial { get { return _locThreeRollerSerial; } set { _locThreeRollerSerial = value; OnPropertyChanged(); } } - private int _locFourRollerSerial; - public int LocFourRollerSerial { get { return _locFourRollerSerial; } set { _locFourRollerSerial = value; OnPropertyChanged(); } } + private ushort _locFourRollerSerial; + public ushort LocFourRollerSerial { get { return _locFourRollerSerial; } set { _locFourRollerSerial = value; OnPropertyChanged(); } } - private int _locFiveRollerSerial; - public int LocFiveRollerSerial { get { return _locFiveRollerSerial; } set { _locFiveRollerSerial = value; OnPropertyChanged(); } } + private ushort _locFiveRollerSerial; + public ushort LocFiveRollerSerial { get { return _locFiveRollerSerial; } set { _locFiveRollerSerial = value; OnPropertyChanged(); } } - private int _locSixRollerSerial; - public int LocSixRollerSerial { get { return _locSixRollerSerial; } set { _locSixRollerSerial = value; OnPropertyChanged(); } } + private ushort _locSixRollerSerial; + public ushort LocSixRollerSerial { get { return _locSixRollerSerial; } set { _locSixRollerSerial = value; OnPropertyChanged(); } } - private int _locSevenRollerSerial; - public int LocSevenRollerSerial { get { return _locSevenRollerSerial; } set { _locSevenRollerSerial = value; OnPropertyChanged(); } } + private ushort _locSevenRollerSerial; + public ushort LocSevenRollerSerial { get { return _locSevenRollerSerial; } set { _locSevenRollerSerial = value; OnPropertyChanged(); } } - private int _locEightRollerSerial; - public int LocEightRollerSerial { get { return _locEightRollerSerial; } set { _locEightRollerSerial = value; OnPropertyChanged(); } } + private ushort _locEightRollerSerial; + public ushort LocEightRollerSerial { get { return _locEightRollerSerial; } set { _locEightRollerSerial = value; OnPropertyChanged(); } } - //private Brush? _rollerRunState; - //public Brush RollerRunState { get { return _rollerRunState; } set { _rollerRunState = value; OnPropertyChanged(); } } + private Color _rollerRunState; + public Color RollerRunState { get { return _rollerRunState; } set { _rollerRunState = value; OnPropertyChanged(); } } - //private Color _rollerAlarmState; - //public Color RollerAlarmState { get { return _rollerAlarmState; } set { _rollerAlarmState = value; OnPropertyChanged(); } } + private Color _rollerAlarmState; + public Color RollerAlarmState { get { return _rollerAlarmState; } set { _rollerAlarmState = value; OnPropertyChanged(); } } } } diff --git a/FryPot_DosingSystem/View/DeviceListVIew.xaml b/FryPot_DosingSystem/View/DeviceListVIew.xaml index a6cd6871..7652df36 100644 --- a/FryPot_DosingSystem/View/DeviceListVIew.xaml +++ b/FryPot_DosingSystem/View/DeviceListVIew.xaml @@ -18,55 +18,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FryPot_DosingSystem/View/HardWareStatusView.xaml b/FryPot_DosingSystem/View/HardWareStatusView.xaml index 5365da2d..8ad623d3 100644 --- a/FryPot_DosingSystem/View/HardWareStatusView.xaml +++ b/FryPot_DosingSystem/View/HardWareStatusView.xaml @@ -7,9 +7,6 @@ xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> - - - @@ -35,10 +32,10 @@ - + - + @@ -46,7 +43,7 @@ - + @@ -79,7 +76,7 @@ - + @@ -194,7 +191,7 @@ - + @@ -202,7 +199,7 @@ - + @@ -350,7 +347,7 @@ - + @@ -358,7 +355,7 @@ - + @@ -506,7 +503,7 @@ - + @@ -514,7 +511,7 @@ - + diff --git a/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs b/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs index 0cab32b3..8e1ec40d 100644 --- a/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs +++ b/FryPot_DosingSystem/View/HardWareStatusView.xaml.cs @@ -1,4 +1,5 @@ using BPASmartClient.Helper; +using FryPot_DosingSystem.ViewModel; using System; using System.Collections.Generic; using System.Linq; @@ -24,50 +25,51 @@ namespace FryPot_DosingSystem.View public HardWareStatusView() { InitializeComponent(); - ActionManage.GetInstance.Register(new Action((a) => - { - switch (a) - { - case 1: gsGreen1.Color = Color.FromRgb(130, 232, 139);break; - case 2: gsGreen2.Color = Color.FromRgb(130, 232, 139); break; - case 3: gsGreen3.Color = Color.FromRgb(130, 232, 139); break; - case 4: gsGreen4.Color = Color.FromRgb(130, 232, 139); break; - } + this.DataContext = HardWareStatusViewModel.GetInstance; + //ActionManage.GetInstance.Register(new Action((a) => + //{ + // switch (a) + // { + // case 1: gsGreen1.Color = Color.FromRgb(130, 232, 139);break; + // case 2: gsGreen2.Color = Color.FromRgb(130, 232, 139); break; + // case 3: gsGreen3.Color = Color.FromRgb(130, 232, 139); break; + // case 4: gsGreen4.Color = Color.FromRgb(130, 232, 139); break; + // } - }), "ToGreen"); - ActionManage.GetInstance.Register(new Action((a) => - { - switch (a) - { - case 1: gsRed1.Color = Color.FromRgb(243, 165, 230); break; - case 2: gsRed2.Color = Color.FromRgb(243, 165, 230); break; - case 3: gsRed3.Color = Color.FromRgb(243, 165, 230); break; - case 4: gsRed4.Color = Color.FromRgb(243, 165, 230); break; - } + //}), "ToGreen"); + //ActionManage.GetInstance.Register(new Action((a) => + //{ + // switch (a) + // { + // case 1: gsRed1.Color = Color.FromRgb(243, 165, 230); break; + // case 2: gsRed2.Color = Color.FromRgb(243, 165, 230); break; + // case 3: gsRed3.Color = Color.FromRgb(243, 165, 230); break; + // case 4: gsRed4.Color = Color.FromRgb(243, 165, 230); break; + // } - }), "ToRed"); - ActionManage.GetInstance.Register(new Action((a) => - { - switch (a) - { - case 1: gsGreen1.Color = Color.FromRgb(84,84,84); break; - case 2: gsGreen2.Color = Color.FromRgb(84,84,84); break; - case 3: gsGreen3.Color = Color.FromRgb(84,84,84); break; - case 4: gsGreen4.Color = Color.FromRgb(84,84,84); break; - } + //}), "ToRed"); + //ActionManage.GetInstance.Register(new Action((a) => + //{ + // switch (a) + // { + // case 1: gsGreen1.Color = Color.FromRgb(84,84,84); break; + // case 2: gsGreen2.Color = Color.FromRgb(84,84,84); break; + // case 3: gsGreen3.Color = Color.FromRgb(84,84,84); break; + // case 4: gsGreen4.Color = Color.FromRgb(84,84,84); break; + // } - }), "GreenToGray"); - ActionManage.GetInstance.Register(new Action((a) => - { - switch (a) - { - case 1: gsRed1.Color = Color.FromRgb(84,84,84); break; - case 2: gsRed2.Color = Color.FromRgb(84,84,84); break; - case 3: gsRed3.Color = Color.FromRgb(84,84,84); break; - case 4: gsRed4.Color = Color.FromRgb(84,84,84); break; - } + //}), "GreenToGray"); + //ActionManage.GetInstance.Register(new Action((a) => + //{ + // switch (a) + // { + // case 1: gsRed1.Color = Color.FromRgb(84,84,84); break; + // case 2: gsRed2.Color = Color.FromRgb(84,84,84); break; + // case 3: gsRed3.Color = Color.FromRgb(84,84,84); break; + // case 4: gsRed4.Color = Color.FromRgb(84,84,84); break; + // } - }), "RedToGray"); + //}), "RedToGray"); } } diff --git a/FryPot_DosingSystem/View/MainWindow.xaml.cs b/FryPot_DosingSystem/View/MainWindow.xaml.cs index 73691795..11c4981a 100644 --- a/FryPot_DosingSystem/View/MainWindow.xaml.cs +++ b/FryPot_DosingSystem/View/MainWindow.xaml.cs @@ -37,7 +37,7 @@ namespace FryPot_DosingSystem.View HubHelper.GetInstance.Upstreamrequest = new Action((o) => { - var res = JsonConvert.DeserializeObject(o.ToString()); + var res = JsonConvert.DeserializeObject(o.ToString()); }); HubHelper.GetInstance.Connect("192.168.1.56", 8089); diff --git a/FryPot_DosingSystem/View/NewRecipeView.xaml b/FryPot_DosingSystem/View/NewRecipeView.xaml index f5c6e396..155b8795 100644 --- a/FryPot_DosingSystem/View/NewRecipeView.xaml +++ b/FryPot_DosingSystem/View/NewRecipeView.xaml @@ -4,7 +4,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:local="clr-namespace:FryPot_DosingSystem.View" - xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel" + xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel" xmlns:Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Classic" mc:Ignorable="d" Title="NewRecipeView" Height="550" Width="800" WindowStyle="None" WindowStartupLocation="CenterScreen" AllowsTransparency="True"> @@ -15,7 +15,7 @@ - + @@ -40,11 +40,152 @@ + + + + + + + - + + + + @@ -52,19 +193,22 @@ + - + - - - + + + - + @@ -84,20 +228,33 @@ - + + + + + - - + + - - + + diff --git a/FryPot_DosingSystem/View/RecipeSendDownView.xaml b/FryPot_DosingSystem/View/RecipeSendDownView.xaml index 823edbd6..7681694a 100644 --- a/FryPot_DosingSystem/View/RecipeSendDownView.xaml +++ b/FryPot_DosingSystem/View/RecipeSendDownView.xaml @@ -17,6 +17,7 @@ + @@ -26,57 +27,99 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - + + + + + + + + + diff --git a/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs b/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs index 580908f4..bb33d1ba 100644 --- a/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/DeviceListViewModel.cs @@ -20,7 +20,7 @@ namespace FryPot_DosingSystem.ViewModel public RelayCommand DeleteDevice { get; set; } public DeviceListViewModel() { - Json.Read(); + //Json.Read(); devices = Json.Data.Devices; DeviceName.Add("滚筒输送线"); DeviceName.Add("炒锅1"); diff --git a/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs b/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs index fe70994a..44bd2bdd 100644 --- a/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/HardWareStatusViewModel.cs @@ -13,14 +13,18 @@ namespace FryPot_DosingSystem.ViewModel internal class HardWareStatusViewModel:ObservableObject { private static HardWareStatusViewModel _instance; - public static HardWareStatusViewModel GetInstance=>_instance??=new HardWareStatusViewModel(); + public static HardWareStatusViewModel GetInstance => _instance ??= new HardWareStatusViewModel(); public HardWareStatusViewModel() { RollerOneModel = new RollerLineBarrelSerialModel(); RollerTwoModel = new RollerLineBarrelSerialModel(); RollerThreeModel = new RollerLineBarrelSerialModel(); - + } + + private int _lineOneOne; + public int LineOneOne { get { return _lineOneOne; }set { _lineOneOne = value;OnPropertyChanged(); } } + /// /// 线体1 工位->桶号 /// diff --git a/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs b/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs index 08f064f1..838f21bc 100644 --- a/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs +++ b/FryPot_DosingSystem/ViewModel/RecipeSetDownViewModel.cs @@ -58,7 +58,7 @@ namespace FryPot_DosingSystem.ViewModel public void RecipeSetDown(NewRecipeModel recipeModel) { ActionManage.GetInstance.Send("RecipeSetDown",recipeModel); - recipeModel.RecipeSetInfo = "下发成功"; + } }