WaferIDReaderView.xaml.cs 1.2 KB

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