using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data; using System.Windows.Data; using System.Globalization; using System.Windows.Media; namespace BPASmartClient.CustomResource.Converters { public class ForegroundConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { SolidColorBrush returnValue = new SolidColorBrush(Color.FromArgb(255, 0, 204, 255)); if (value != null) { if (value.ToString() == "等待配料") returnValue = new SolidColorBrush(Color.FromArgb(255, 236, 187, 17));//黄 FFECBB11 else if (value.ToString() == "正在配料") returnValue = new SolidColorBrush(Color.FromArgb(255, 22, 219, 234));//篮 FF16DBEA else if (value.ToString() == "配料完成") returnValue = new SolidColorBrush(Color.FromArgb(255, 43, 208, 111));//绿 FF2BD06F } return returnValue; } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }