CassetteConverter.cs 700 B

12345678910111213141516171819202122
  1. using System;
  2. using System.Windows;
  3. using System.Windows.Data;
  4. using MECF.Framework.Common.SubstrateTrackings;
  5. namespace EfemDualSimulator.Views.Converters
  6. {
  7. public class CassetteVisibilityConverter : IValueConverter
  8. {
  9. public object Convert(object value, Type targetType, object parameters, System.Globalization.CultureInfo culture)
  10. {
  11. CarrierInfo state = (CarrierInfo)value;
  12. return state.Status==CarrierStatus.Empty ? Visibility.Hidden : Visibility.Visible;
  13. }
  14. public object ConvertBack(object value, Type targetType, object parameters, System.Globalization.CultureInfo culture)
  15. {
  16. return null;
  17. }
  18. }
  19. }