终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

36 行
1.3 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Data;
  7. using System.Windows.Data;
  8. using System.Globalization;
  9. using System.Windows.Media;
  10. namespace BPASmartClient.SmallBatchingSystem.Converter
  11. {
  12. public class ForegroundConverter : IValueConverter
  13. {
  14. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  15. {
  16. SolidColorBrush returnValue = new SolidColorBrush(Color.FromArgb(255, 0, 204, 255));
  17. if (value != null)
  18. {
  19. if (value.ToString() == "等待配料")
  20. returnValue = new SolidColorBrush(Color.FromArgb(255, 236, 187, 17));//黄 FFECBB11
  21. else if (value.ToString() == "正在配料")
  22. returnValue = new SolidColorBrush(Color.FromArgb(255, 22, 219, 234));//篮 FF16DBEA
  23. else if (value.ToString() == "配料完成")
  24. returnValue = new SolidColorBrush(Color.FromArgb(255, 43, 208, 111));//绿 FF2BD06F
  25. }
  26. return returnValue;
  27. }
  28. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  29. {
  30. throw new NotImplementedException();
  31. }
  32. }
  33. }