FOUPStatusConverter.cs 924 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Windows.Data;
  3. namespace MECF.Framework.UI.Client.Ctrlib.Converter
  4. {
  5. public class FOUPStatusConverter : IValueConverter
  6. {
  7. public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  8. {
  9. if (value == null)
  10. return string.Empty;
  11. string result = string.Empty;
  12. int iValue;
  13. if (int.TryParse(value.ToString(), out iValue))
  14. {
  15. if (iValue == 0)
  16. result = "Loaded";
  17. else if (iValue == 1)
  18. result = "Mapped";
  19. }
  20. return result;
  21. }
  22. public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
  23. {
  24. throw new NotImplementedException();
  25. }
  26. }
  27. }