SimuRevtechMatchPMBView.xaml.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Windows;
  2. using System.Windows.Controls;
  3. using System.Windows.Input;
  4. using System.Collections.Generic;
  5. using Aitex.Core.UI.MVVM;
  6. using Aitex.Core.Utilities;
  7. using MECF.Framework.Simulator.Core.Commons;
  8. using VirgoSimulator.Devices;
  9. namespace VirgoSimulator.Views
  10. {
  11. /// <summary>
  12. /// SimuRevtechMatchPMBView.xaml 的交互逻辑
  13. /// </summary>
  14. public partial class SimuRevtechMatchPMBView : UserControl
  15. {
  16. public SimuRevtechMatchPMBView()
  17. {
  18. InitializeComponent();
  19. this.DataContext = new MockRevtechMatchViewModelPMB();
  20. this.Loaded += OnViewLoaded;
  21. }
  22. private void OnViewLoaded(object sender, RoutedEventArgs e)
  23. {
  24. (DataContext as TimerViewModelBase)?.Start();
  25. }
  26. }
  27. class MockRevtechMatchViewModelPMB : SocketDeviceViewModel
  28. {
  29. public string Title
  30. {
  31. get { return "Revtech match PMB simulator"; }
  32. }
  33. public MockRevtechMatchViewModelPMB() : base("RevtechMatchPMBSimulator")
  34. {
  35. Init(new RevtechMatchMockPMB());
  36. }
  37. }
  38. }