PmIoView.xaml.cs 906 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Globalization;
  3. using System.Windows.Controls;
  4. using System.Windows.Data;
  5. namespace VirgoUI.Client.Models.PMs
  6. {
  7. /// <summary>
  8. /// Interaction logic for IOView.xaml
  9. /// </summary>
  10. public partial class PmIoView : UserControl
  11. {
  12. public PmIoView()
  13. {
  14. InitializeComponent();
  15. }
  16. }
  17. public class DisplayNameConverter : IValueConverter
  18. {
  19. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  20. {
  21. if (value is string s1)
  22. {
  23. int idx = s1.IndexOf('_');
  24. return s1.Substring(idx + 1);
  25. }
  26. return value;
  27. }
  28. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  29. {
  30. throw new NotImplementedException();
  31. }
  32. }
  33. }