终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

47 lines
1.7 KiB

  1. using BPA.Message.Enum;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Globalization;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Windows.Data;
  9. using System.Windows.Media;
  10. namespace BPASmartClient.CustomResource.Converters
  11. {
  12. public class ColorConverter : 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. switch ((ORDER_STATUS)value)
  18. {
  19. case ORDER_STATUS.WAIT:
  20. returnValue = new SolidColorBrush(Color.FromArgb(255, 0, 204, 255));
  21. break;
  22. case ORDER_STATUS.COOKING:
  23. returnValue = new SolidColorBrush(Color.FromArgb(255, 0, 255, 127));
  24. break;
  25. case ORDER_STATUS.COMPLETED_COOK:
  26. returnValue = new SolidColorBrush(Color.FromArgb(255, 255, 215, 00));
  27. break;
  28. case ORDER_STATUS.COMPLETED_TAKE:
  29. returnValue = new SolidColorBrush(Color.FromArgb(255, 102, 204, 153));
  30. break;
  31. case ORDER_STATUS.ERR_NOT_REPLY_WHEN_COOKING:
  32. returnValue = new SolidColorBrush(Color.FromArgb(255, 255, 0, 0));
  33. break;
  34. default:
  35. break;
  36. }
  37. return returnValue;
  38. }
  39. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  40. {
  41. throw new NotImplementedException();
  42. }
  43. }
  44. }