CalibrationTeachCenterPoint.xaml.cs 855 B

12345678910111213141516171819202122232425262728
  1. using System.Windows.Controls;
  2. using TeamAAS_VP.Core.Robots;
  3. using TeamAAS_VP.ViewModels.Calibration;
  4. namespace TeamAAS_VP.Views.Calibration
  5. {
  6. /// <summary>
  7. /// Interaction logic for CalibrationTeachCenterPoint
  8. /// </summary>
  9. public partial class CalibrationTeachCenterPoint : UserControl
  10. {
  11. CalibrationTeachCenterPointViewModel VM;
  12. public CalibrationTeachCenterPoint()
  13. {
  14. InitializeComponent();
  15. VM=DataContext as CalibrationTeachCenterPointViewModel;
  16. VM.PropertyChanged += VM_PropertyChanged;
  17. }
  18. private void VM_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
  19. {
  20. if (e.PropertyName== "Robot")
  21. {
  22. this.robotManual.Robot = VM.Robot as XYZU_Robot;
  23. }
  24. }
  25. }
  26. }