WaferConverter.cs 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. using Aitex.Core.Common;
  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;
  9. using System.Windows.Data;
  10. namespace EfemDualUI.Converter
  11. {
  12. public class WaferConverter : IMultiValueConverter
  13. {
  14. public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
  15. {
  16. //if (values[0] != null && values[0] != DependencyProperty.UnsetValue)
  17. //{
  18. // var status = (WaferStatus)values[0];
  19. // var waferDisplayMode = (WaferDisplayMode)values[1];
  20. // var waferOrigin = (string)values[2];
  21. // var laserMarker = (string)values[3];
  22. // var t7Code = (string)values[4];
  23. // if (status != WaferStatus.Empty)
  24. // {
  25. // switch (waferDisplayMode)
  26. // {
  27. // case WaferDisplayMode.None:
  28. // return string.Empty;
  29. // case WaferDisplayMode.WaferOrigin:
  30. // return waferOrigin;
  31. // case WaferDisplayMode.LaserMarker:
  32. // return laserMarker;
  33. // case WaferDisplayMode.T7Code:
  34. // return t7Code;
  35. // default:
  36. // break;
  37. // }
  38. // return string.Empty;
  39. // }
  40. //}
  41. return string.Empty;
  42. }
  43. public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
  44. {
  45. throw new NotImplementedException();
  46. }
  47. }
  48. public class WaferVisibilityConverter : IValueConverter
  49. {
  50. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  51. {
  52. return (value == null || (WaferStatus)value == WaferStatus.Empty) ? Visibility.Hidden : Visibility.Visible;
  53. }
  54. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  55. {
  56. throw new NotImplementedException();
  57. }
  58. }
  59. }