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

TextConverter.cs 1.4 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. namespace BPASmartClient.CustomResource.Converters
  10. {
  11. public class TextConverter : IValueConverter
  12. {
  13. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  14. {
  15. string Text = string.Empty;
  16. switch ((ORDER_STATUS)value)
  17. {
  18. case ORDER_STATUS.WAIT:
  19. Text = "等待制作";
  20. break;
  21. case ORDER_STATUS.COOKING:
  22. Text = "开始制作";
  23. break;
  24. case ORDER_STATUS.COMPLETED_COOK:
  25. Text = "等待取餐";
  26. break;
  27. case ORDER_STATUS.COMPLETED_TAKE:
  28. Text = "取餐完成";
  29. break;
  30. case ORDER_STATUS.ERR_NOT_REPLY_WHEN_COOKING:
  31. Text = "制作超时";
  32. break;
  33. default:
  34. break;
  35. }
  36. return Text;
  37. }
  38. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  39. {
  40. throw new NotImplementedException();
  41. }
  42. }
  43. }