diff --git a/MECF.Framework.Common/MECF/Framework/Common/OperationCenter/IInvokeService.cs b/MECF.Framework.Common/MECF/Framework/Common/OperationCenter/IInvokeService.cs index edf6a5e..6bed0b3 100644 --- a/MECF.Framework.Common/MECF/Framework/Common/OperationCenter/IInvokeService.cs +++ b/MECF.Framework.Common/MECF/Framework/Common/OperationCenter/IInvokeService.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.ServiceModel; using Aitex.Core.Common; +using Aitex.Core.Common.DeviceData; using Aitex.Sorter.Common; using MECF.Framework.Common.Device.Bases; using MECF.Framework.Common.Equipment; diff --git a/MECF.Framework.UI.Core/Converters/ColorConverter_IsTestOK.cs b/MECF.Framework.UI.Core/Converters/ColorConverter_IsTestOK.cs new file mode 100644 index 0000000..f739a11 --- /dev/null +++ b/MECF.Framework.UI.Core/Converters/ColorConverter_IsTestOK.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; + +namespace Aitex.Core.UI.Converters +{ + /// + /// 输入数值检测 + /// + public class ColorConverter_IsTestOK : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value == null || value.ToString().Length == 0) + return new SolidColorBrush(Colors.Gray); + if (value.ToString() == "OK") + return new SolidColorBrush(Colors.Green); + else if (value.ToString() == "NG") + return new SolidColorBrush(Colors.MediumVioletRed); + else + return new SolidColorBrush(Colors.Gray); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} diff --git a/MECF.Framework.UI.Core/MECF.Framework.UI.Core.csproj b/MECF.Framework.UI.Core/MECF.Framework.UI.Core.csproj index f1e90fd..37b8578 100644 --- a/MECF.Framework.UI.Core/MECF.Framework.UI.Core.csproj +++ b/MECF.Framework.UI.Core/MECF.Framework.UI.Core.csproj @@ -324,6 +324,7 @@ +