EventLogComboView.xaml.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Globalization;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. using System.Windows.Controls;
  9. using System.Windows.Data;
  10. using System.Windows.Documents;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace MECF.Framework.UI.Core.DeviceControl
  17. {
  18. /// <summary>
  19. /// EventLogComboView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class EventLogComboView : UserControl
  22. {
  23. public EventLogComboView()
  24. {
  25. InitializeComponent();
  26. }
  27. }
  28. public class CollectionLastIndexConverter : IValueConverter
  29. {
  30. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  31. {
  32. return (int)value - 1;
  33. }
  34. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  35. {
  36. throw new NotImplementedException();
  37. }
  38. }
  39. public class DateTimeToTextConverter : IValueConverter
  40. {
  41. public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
  42. {
  43. return ((DateTime)value).ToString("HH:mm:ss.fff");
  44. }
  45. public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
  46. {
  47. throw new NotImplementedException();
  48. }
  49. }
  50. }