LeakCheckStatusEnum.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Aitex.Core.RT.Log;
  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 MECF.Framework.Common.CommonData.EnumData
  11. {
  12. public enum LeakCheckStatusEnum
  13. {
  14. None = 0,
  15. BasePressureCheck = 10,
  16. LeakCheck = 20,
  17. LeakCheckDelay = 30,
  18. }
  19. public class LeakCheckStatusColorConverter : IValueConverter
  20. {
  21. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  22. {
  23. if (value is int intValue)
  24. {
  25. var status = (LeakCheckStatusEnum)intValue;
  26. return status.ToString();
  27. }
  28. throw new ArgumentException("Invalid type", nameof(value));
  29. }
  30. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  31. {
  32. throw new NotImplementedException();
  33. }
  34. }
  35. }