终端一体化运控平台
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
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.CustomResource.Converters
  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. }