HHADR21RootView.xaml.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.ObjectModel;
  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. using Aitex.Core.UI.MVVM;
  17. using MECF.Framework.Simulator.Core.Aligners;
  18. using MECF.Framework.Simulator.Core.Commons;
  19. using MECF.Framework.Simulator.Core.Driver;
  20. namespace MECF.Framework.Simulator.Core.Robots
  21. {
  22. /// <summary>
  23. /// HHADR21View.xaml 的交互逻辑
  24. /// </summary>
  25. public partial class HHADR21RootView : UserControl
  26. {
  27. public HHADR21RootView()
  28. {
  29. InitializeComponent();
  30. this.DataContext = new HHADR21RootViewModel();
  31. this.Loaded += OnViewLoaded;
  32. }
  33. private void OnViewLoaded(object sender, RoutedEventArgs e)
  34. {
  35. (DataContext as TimerViewModelBase).Start();
  36. }
  37. }
  38. class HHADR21RootViewModel : SocketDeviceViewModel
  39. {
  40. public string Title
  41. {
  42. get { return "HongHu HHADR21 Robot Simulator"; }
  43. }
  44. private HHADR21RootSimulator _robot;
  45. public HHADR21RootViewModel() : base("HHADR21ViewModel")
  46. {
  47. Init(new HHADR21RootSimulator());
  48. }
  49. }
  50. }