徐孝锋 8 月之前
父节点
当前提交
32cbb9ac50

+ 2 - 2
TeamAAS-VM/ViewModels/Calibration/FixedUpCameraFindP0ViewModel.cs

@@ -25,7 +25,7 @@ using TeamAAS_VP.Services;
 
 namespace TeamAAS_VP.ViewModels.Calibration
 {
-    public class FixedUpCameraFindP0ViewModel : BindableBase
+    public class FixedUpCameraFindP0ViewModel : BindableBase, IConfirmNavigationRequest
     {
         IRegionManager _regionManager;
         IRegionNavigationService _regionNavigationService;
@@ -384,7 +384,7 @@ namespace TeamAAS_VP.ViewModels.Calibration
             {
                 SelectCalibration.FixedUpCameraFindP0Info = new FixedUpCameraFindP0Info();
             }
-            if (ToolBlockEdit != null)
+            if (ToolBlockEdit.Subject==null)
             {
                 string prcPath = FilePath.CalibrationPath + "//" + SelectCalibration.Name + "//" + "FixedUpCameraTool.vpp";
                 if (File.Exists(prcPath))

+ 6 - 0
TeamAAS-VM/Views/Calibration/FixedUpCameraFindP0.xaml.cs

@@ -1,4 +1,5 @@
 using System.Windows.Controls;
+using TeamAAS_VP.ViewModels.Calibration;
 
 namespace TeamAAS_VP.Views.Calibration
 {
@@ -7,9 +8,14 @@ namespace TeamAAS_VP.Views.Calibration
     /// </summary>
     public partial class FixedUpCameraFindP0 : UserControl
     {
+        FixedUpCameraFindP0ViewModel VM;
         public FixedUpCameraFindP0()
         {
             InitializeComponent();
+            VM = DataContext as FixedUpCameraFindP0ViewModel;
+
+            ((FixedUpCameraFindP0ViewModel)DataContext).ToolBlockEdit = this.ToolBlockEditV2;
         }
+        
     }
 }