终端一体化运控平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

ForegroundConverter.cs 1.3 KiB

pirms 2 gadiem
1234567891011121314151617181920212223242526272829303132333435
  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. }