SPaceTRanRobotView.xaml.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. /// SPaceTRanRobot.xaml 的交互逻辑
  24. /// </summary>
  25. public partial class SPaceTRanRobotView : UserControl
  26. {
  27. public SPaceTRanRobotView()
  28. {
  29. InitializeComponent();
  30. this.DataContext = new SPaceTRanRobotViewModel();
  31. this.Loaded += OnViewLoaded;
  32. }
  33. private void OnViewLoaded(object sender, RoutedEventArgs e)
  34. {
  35. (DataContext as TimerViewModelBase).Start();
  36. }
  37. }
  38. class SPaceTRanRobotViewModel : SocketDeviceViewModel
  39. {
  40. public string Title
  41. {
  42. get { return "SUNWAY SPaceTRan Robot Simulator"; }
  43. }
  44. public SPaceTRanRobotViewModel() : base("SPaceTRanRobotViewModel")
  45. {
  46. Init(new SPaceTRanRobotSimulator());
  47. }
  48. }
  49. }