From bedb5769fec4f3e2ee8410893bff9b8b01827a3d Mon Sep 17 00:00:00 2001 From: fyf Date: Wed, 9 Nov 2022 18:00:14 +0800 Subject: [PATCH] 1 --- .../BPASmartClient.ScreenLib.csproj | 2 +- .../炒锅/ScreenMaxWokControl.xaml | 31 +++++++---- .../炒锅/ScreenMinWokControl.xaml | 34 ++++++++---- WpfTest/MainWindow.xaml.cs | 52 +++++++++---------- WpfTest/WpfTest.csproj | 2 +- 5 files changed, 74 insertions(+), 47 deletions(-) diff --git a/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj b/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj index 0a472b76..d4b3414a 100644 --- a/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj +++ b/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj @@ -19,7 +19,7 @@ - + diff --git a/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml b/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml index 41c72ccd..4607acfb 100644 --- a/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml +++ b/BPASmartClient.ScreenLib/炒锅/ScreenMaxWokControl.xaml @@ -112,21 +112,27 @@ - - - + + + - + + + + + + + + - @@ -300,14 +306,21 @@ - - - + + + - + + + + + + + + diff --git a/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml b/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml index 5bfda26b..08f2522f 100644 --- a/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml +++ b/BPASmartClient.ScreenLib/炒锅/ScreenMinWokControl.xaml @@ -112,14 +112,21 @@ - - - + + + - + + + + + + + + @@ -127,12 +134,12 @@ - + @@ -300,14 +307,21 @@ - - - + + + - + + + + + + + + diff --git a/WpfTest/MainWindow.xaml.cs b/WpfTest/MainWindow.xaml.cs index 6d0943f9..e78dcae9 100644 --- a/WpfTest/MainWindow.xaml.cs +++ b/WpfTest/MainWindow.xaml.cs @@ -139,11 +139,11 @@ namespace WpfTest MaxWok_Dishes_1 = "猪肉炖粉条", MaxWok_Task_1 = "炒菜中", MaxWok_Process_1 = new List { - new ProcessModel{ Id=0,Name= "清洗", IsRun=M>=0 ?true:false}, - new ProcessModel{ Id=1,Name= "到菜", IsRun=M>=1 ?true:false}, - new ProcessModel{ Id=2,Name= "翻炒", IsRun=M>=2?true:false}, - new ProcessModel{ Id=3,Name= "调料", IsRun=M>=3 ?true:false}, - new ProcessModel{ Id=4,Name= "完成", IsRun=M>=4 ?true:false}, + new ProcessModel{ Id=0,Name= "清洗", Status=(M==0) ? ProcessStatus.正在执行:((M>0)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=1,Name= "到菜", Status=(M==1) ? ProcessStatus.正在执行:((M>1)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=2,Name= "翻炒", Status=(M==2) ? ProcessStatus.正在执行:((M>2)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=3,Name= "调料", Status=(M==3) ? ProcessStatus.正在执行:((M>3)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=4,Name= "完成", Status=(M==4) ? ProcessStatus.正在执行:((M>4)?ProcessStatus.执行完成:ProcessStatus.未执行)}, }, MaxWok_HeatGear_1 = "1", MaxWok_StirGear_1 = "2", @@ -155,11 +155,11 @@ namespace WpfTest MaxWok_Dishes_2 = "烂肉排骨", MaxWok_Task_2 = "结算中", MaxWok_Process_2 = new List { - new ProcessModel{ Id=0,Name= "清洗", IsRun=k>=0 ?true:false}, - new ProcessModel{ Id=1,Name= "到菜", IsRun=k>=1 ?true:false}, - new ProcessModel{ Id=2,Name= "翻炒", IsRun=k>=2 ?true:false}, - new ProcessModel{ Id=3,Name= "调料", IsRun=k>=3 ?true:false}, - new ProcessModel{ Id=4,Name= "完成", IsRun=k>=4 ?true:false}, + new ProcessModel{ Id=0,Name= "清洗", Status=(k==0) ? ProcessStatus.正在执行:((k>0)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=1,Name= "到菜", Status=(k==1) ? ProcessStatus.正在执行:((k>1)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=2,Name= "翻炒", Status=(k==2) ? ProcessStatus.正在执行:((k>2)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=3,Name= "调料", Status=(k==3) ? ProcessStatus.正在执行:((k>3)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=4,Name= "完成", Status=(k==4) ? ProcessStatus.正在执行:((k>4)?ProcessStatus.执行完成:ProcessStatus.未执行)}, }, MaxWok_HeatGear_2 = "2", MaxWok_StirGear_2 = "3", @@ -194,11 +194,11 @@ namespace WpfTest MinWok_Dishes_1 = "猪肉炖粉条", MinWok_Task_1 = "炒菜中", MinWok_Process_1 = new List { - new ProcessModel{ Id=0,Name= "清洗", IsRun=M>=0 ?true:false}, - new ProcessModel{ Id=1,Name= "到菜", IsRun=M>=1 ?true:false}, - new ProcessModel{ Id=2,Name= "翻炒", IsRun=M>=2?true:false}, - new ProcessModel{ Id=3,Name= "调料", IsRun=M>=3 ?true:false}, - new ProcessModel{ Id=4,Name= "完成", IsRun=M>=4 ?true:false}, + new ProcessModel{ Id=0,Name= "清洗", Status=(M==0) ? ProcessStatus.正在执行:((M>0)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=1,Name= "到菜", Status=(M==1) ? ProcessStatus.正在执行:((M>1)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=2,Name= "翻炒", Status=(M==2) ? ProcessStatus.正在执行:((M>2)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=3,Name= "调料", Status=(M==3) ? ProcessStatus.正在执行:((M>3)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=4,Name= "完成", Status=(M==4) ? ProcessStatus.正在执行:((M>4)?ProcessStatus.执行完成:ProcessStatus.未执行)}, }, MinWok_HeatGear_1 = "1", MinWok_StirGear_1 = "2", @@ -210,11 +210,11 @@ namespace WpfTest MinWok_Dishes_2 = "烂肉排骨", MinWok_Task_2 = "结算中", MinWok_Process_2 = new List { - new ProcessModel{ Id=0,Name= "清洗", IsRun=k>=0 ?true:false}, - new ProcessModel{ Id=1,Name= "到菜", IsRun=k>=1 ?true:false}, - new ProcessModel{ Id=2,Name= "翻炒", IsRun=k>=2 ?true:false}, - new ProcessModel{ Id=3,Name= "调料", IsRun=k>=3 ?true:false}, - new ProcessModel{ Id=4,Name= "完成", IsRun=k>=4 ?true:false}, + new ProcessModel{ Id=0,Name= "清洗", Status=(k==0) ? ProcessStatus.正在执行:((k>0)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=1,Name= "到菜", Status=(k==1) ? ProcessStatus.正在执行:((k>1)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=2,Name= "翻炒", Status=(k==2) ? ProcessStatus.正在执行:((k>2)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=3,Name= "调料", Status=(k==3) ? ProcessStatus.正在执行:((k>3)?ProcessStatus.执行完成:ProcessStatus.未执行)}, + new ProcessModel{ Id=4,Name= "完成", Status=(k==4) ? ProcessStatus.正在执行:((k>4)?ProcessStatus.执行完成:ProcessStatus.未执行)}, }, MinWok_HeatGear_2 = "2", MinWok_StirGear_2 = "3", @@ -245,7 +245,7 @@ namespace WpfTest new StatsModel{Name= name_s[3],Count=new Random().Next(0, 100)}, new StatsModel{Name= name_s[4],Count=new Random().Next(0, 100)}, }, - MorkS_OrderCount= new Random().Next(0, 100), + MorkS_OrderCount = new Random().Next(0, 100), MorkS_ErrorOrderCount = new Random().Next(0, 100), MorkS_NoodleUpOrDown_1 = new Random().Next(0, 2) == 0 ? "true" : "false", MorkS_NoodleUpOrDown_2 = new Random().Next(0, 2) == 0 ? "true" : "false", @@ -258,7 +258,7 @@ namespace WpfTest MorkS_BinLocation = new Random().Next(0, 6).ToString(), MorkS_SiloMeas = new Random().Next(0, 2) == 0 ? "true" : "false", MorkS_NoBowMeas = new Random().Next(0, 2) == 0 ? "true" : "false", - MakeOrder=new List { + MakeOrder = new List { new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()}, new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()}, new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()}, @@ -271,7 +271,7 @@ namespace WpfTest new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()}, new OrderMakeModel { GoodName= name_s[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=oRDER_STATUS[new Random().Next(0, 5)], SortNum=new Random().Next(0,100).ToString()}, }, - + }; } else if (screen == ScreenDeviceType.分餐机) @@ -307,7 +307,7 @@ namespace WpfTest SplitMeals_CreditCardCount_3 = new Random().Next(0, 100), SplitMeals_CreditCardNameBefore_3 = name_XM[new Random().Next(0, 5)], - SplitMeals_CreditCardName_3= name_XM[new Random().Next(0, 5)], + SplitMeals_CreditCardName_3 = name_XM[new Random().Next(0, 5)], SplitMeals_CookType_3 = new List() { "担担面", "鸡蛋面", "火鸡面" }, SplitMeals_CreditCardCount_4 = new Random().Next(0, 100), @@ -333,7 +333,7 @@ namespace WpfTest System.Windows.Application.Current?.Dispatcher.Invoke((Action)(() => { - + if (textwb.Text.Length > 100000) { textwb.Text = ""; @@ -373,7 +373,7 @@ namespace WpfTest i++; } } - + } } } diff --git a/WpfTest/WpfTest.csproj b/WpfTest/WpfTest.csproj index 31e879ea..3be6b765 100644 --- a/WpfTest/WpfTest.csproj +++ b/WpfTest/WpfTest.csproj @@ -8,7 +8,7 @@ - +