MainView.xaml.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using System;
  2. using System.Globalization;
  3. using System.Windows.Controls;
  4. using System.Windows.Data;
  5. using OpenSEMI.Ctrlib.Window;
  6. namespace EfemDualUI
  7. {
  8. /// <summary>
  9. /// Interaction logic for MainView.xaml
  10. /// </summary>
  11. public partial class MainView : CustomWnd
  12. {
  13. public MainView()
  14. {
  15. InitializeComponent();
  16. }
  17. private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
  18. {
  19. }
  20. }
  21. public class CollectionLastIndexConverter : IValueConverter
  22. {
  23. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  24. {
  25. return (int)value - 1;
  26. }
  27. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  28. {
  29. throw new NotImplementedException();
  30. }
  31. }
  32. public class DateTimeToTextConverter : IValueConverter
  33. {
  34. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  35. {
  36. return ((DateTime)value).ToString("HH:mm:ss.fff");
  37. }
  38. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  39. {
  40. throw new NotImplementedException();
  41. }
  42. }
  43. }