WaferDropConverter.cs 848 B

1234567891011121314151617181920212223242526272829303132
  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 WaferDropConverter : 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 isDestination = (bool)values[1];
  20. return (status == WaferStatus.Empty || status == WaferStatus.Dummy) && !isDestination;
  21. }
  22. return false;
  23. }
  24. public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
  25. {
  26. throw new NotImplementedException();
  27. }
  28. }
  29. }