徐孝锋 il y a 7 mois
Parent
commit
f45f0564bd
1 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 12 0
      TeamAAS-VM/ViewModels/Product/PlcPointParamsViewModel.cs

+ 12 - 0
TeamAAS-VM/ViewModels/Product/PlcPointParamsViewModel.cs

@@ -709,6 +709,18 @@ namespace TeamAAS_VP.ViewModels.Product
                     _eventAggregator.GetEvent<SnackbarMessageNotification>().Publish(new MessageParameter() { Msg = $"{Lang.完成}!", Duration = 0.4 });
                     return;
                 }
+                else if (SelectedIndex == 8)
+                {
+                    //弹窗用户是否确认要示教该点位
+                    if (MessageBox.Show($"确认要示教点位 {SelectedPoint.Number} 吗?", "示教点位", MessageBoxButton.YesNo, MessageBoxImage.Question) != MessageBoxResult.Yes)
+                    {
+                        return;
+                    }
+                    var addpos = await Robot.GetAdditionalAxisCurrentPosAsync(Robot.AdditionalAxisList[0].Name);
+                    SelectedPoint.Z_Position_Start = addpos;
+                    _eventAggregator.GetEvent<SnackbarMessageNotification>().Publish(new MessageParameter() { Msg = $"{Lang.完成}!", Duration = 0.4 });
+                    return;
+                }
                 else
                 {
                     //弹窗用户是否确认要示教该点位