SlotToIndexConverter.cs 556 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Windows.Data;
  7. namespace Aitex.Sorter.UI.Converter
  8. {
  9. public class SlotToIndexConverter : IValueConverter
  10. {
  11. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  12. {
  13. var slot = (int)value;
  14. return (slot + 1).ToString("00");
  15. }
  16. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  17. {
  18. throw new NotImplementedException();
  19. }
  20. }
  21. }