|
1234567891011121314151617181920212223242526272829303132333435 |
- 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.SmallBatchingSystem.Converter
- {
- 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();
- }
- }
- }
|