diff --git a/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj b/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj index 4c4964a1..eabbfbcd 100644 --- a/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj +++ b/BPASmartClient.ScreenLib/BPASmartClient.ScreenLib.csproj @@ -19,7 +19,7 @@ - + diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml index 1eb12eb5..e5617d76 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl1.xaml @@ -33,7 +33,7 @@ - + - 设备是否运行 + 设备工作状态 @@ -132,7 +132,7 @@ - + - 设备是否运行 + 设备工作状态 diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml index 58fe2d18..94f1cbc3 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl2.xaml @@ -33,7 +33,7 @@ - + - 设备是否运行 + 设备工作状态 @@ -131,7 +131,7 @@ - + - 设备是否运行 + 设备工作状态 diff --git a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml index 6447a3ea..5e3c1601 100644 --- a/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml +++ b/BPASmartClient.ScreenLib/分餐机/ScreenSplitMealsControl3.xaml @@ -33,7 +33,7 @@ - + - 设备是否运行 + 设备工作状态 @@ -131,7 +131,7 @@ - + - 设备是否运行 + 设备工作状态 diff --git a/BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml b/BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml index e3f23ade..35fb916c 100644 --- a/BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml +++ b/BPASmartClient.ScreenLib/煮面机/ScreenMorksControl.xaml @@ -203,7 +203,7 @@ - + @@ -220,7 +220,7 @@ - + @@ -244,7 +244,7 @@ - + @@ -261,7 +261,7 @@ - + @@ -285,7 +285,7 @@ - + @@ -302,7 +302,7 @@ - + @@ -345,10 +345,18 @@ - + + + + + + + + + @@ -375,7 +383,7 @@ - + diff --git a/BeDesignerSCADA/Converters/MathAbsConverter.cs b/BeDesignerSCADA/Converters/MathAbsConverter.cs new file mode 100644 index 00000000..4f4a2e01 --- /dev/null +++ b/BeDesignerSCADA/Converters/MathAbsConverter.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace BeDesignerSCADA.Converters +{ + [ValueConversion(typeof(float), typeof(float))] + public class MathAbsConverter : IValueConverter + { + static MathAbsConverter() + { + Instance = new MathAbsConverter(); + } + + public static MathAbsConverter Instance + { + get; + private set; + } + + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + return Math.Abs((float)value); + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/WpfTest/MainWindow.xaml.cs b/WpfTest/MainWindow.xaml.cs index 41174e5d..e436d4a4 100644 --- a/WpfTest/MainWindow.xaml.cs +++ b/WpfTest/MainWindow.xaml.cs @@ -250,17 +250,18 @@ namespace WpfTest }, MorkS_OrderCount = new Random().Next(0, 100), MorkS_ErrorOrderCount = new Random().Next(0, 100), - MorkS_NoodleUpOrDown_1 = k2 == 0 ? "true" : "false", - MorkS_NoodleUpOrDown_2 = k2 == 0 ? "true" : "false", - MorkS_NoodleUpOrDown_3 = k2 == 0 ? "true" : "false", - MorkS_NoodleUpOrDown_4 = k2 == 0 ? "true" : "false", - MorkS_NoodleUpOrDown_5 = k2 == 0 ? "true" : "false", - MorkS_NoodleUpOrDown_6 = k2 == 0 ? "true" : "false", + Morks_NoodleUpOrDown = new bool[] { + true,true,true,true,false,true + }, + + MorkS_Temp = false,// k2 == 0 ? "true" : "false", + MorkS_BinLocation = new Random().Next(0, 6), + Morks_SiloMeasUp = k2 == 0 , + Morks_SiloMeasDown = k2 == 0, + MorkS_NoBowMeas1= new Random().Next(0, 2)==1, + MorkS_NoBowMeas2 = new Random().Next(0, 2) == 1, + - MorkS_Temp = "false",// k2 == 0 ? "true" : "false", - MorkS_BinLocation = new Random().Next(0, 6).ToString(), - MorkS_SiloMeas = k2 == 0 ? "true" : "false", - MorkS_NoBowMeas = k2 == 0 ? "true" : "false", MakeOrder = new List { new OrderMakeModel { GoodName= name_s_zm[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=ORDER_STATUS.WAIT, SortNum="007".ToString()}, new OrderMakeModel { GoodName= name_s_zm[new Random().Next(0, 5)], StartTime=DateTime.Now.ToString("HH:mm:ss"), Status=ORDER_STATUS.WAIT, SortNum="008".ToString()}, @@ -284,6 +285,15 @@ namespace WpfTest { IsRun = k2 == 0 ? IsRun.运行 : IsRun.停止, WorkStatus = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + WorkStatus_1 = WorkStatus.待机, + WorkStatus_2 = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + WorkStatus_3 = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + WorkStatus_4 = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + WorkStatus_5 = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + WorkStatus_6 = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + RobotStatu1= k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + RobotStatu2 = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, + RobotStatu = k2 == 0 ? WorkStatus.工作 : WorkStatus.待机, //Alarm = new List { // new AlarmModel { AlarmTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), AlarmMs = "XXXX机构出现故障!!!!" }, diff --git a/WpfTest/WpfTest.csproj b/WpfTest/WpfTest.csproj index e72a3145..83a6eb68 100644 --- a/WpfTest/WpfTest.csproj +++ b/WpfTest/WpfTest.csproj @@ -8,7 +8,7 @@ - +