IoView.xaml.cs 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Data;
  8. using System.Windows.Documents;
  9. using System.Windows.Input;
  10. using System.Windows.Media;
  11. using System.Windows.Media.Imaging;
  12. using System.Windows.Navigation;
  13. using System.Windows.Shapes;
  14. using Aitex.Core.UI.View.Common;
  15. using Aitex.Sorter.UI.ViewModel;
  16. namespace Aitex.Sorter.UI.Views
  17. {
  18. /// <summary>
  19. /// IoView.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class IoView : UserControl, IBaseView
  22. {
  23. public IoView()
  24. {
  25. InitializeComponent();
  26. DataContext = new IoViewModel();
  27. IsVisibleChanged += View_IsVisibleChanged;
  28. }
  29. private void View_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
  30. {
  31. (DataContext as IoViewModel).EnableTimer(IsVisible);
  32. }
  33. }
  34. }