曲线回读+测试报告导出前期工作
This commit is contained in:
@@ -567,7 +567,7 @@ namespace ADP.ViewModels
|
||||
ScopedContext? targetContext = CurrentContext;
|
||||
|
||||
if (runningScope == "default" || string.IsNullOrEmpty(runningScope) || targetContext == null) return;
|
||||
|
||||
CurrentConfig.CurrentADPFile = "新建ADP文件";
|
||||
// 💡 2. 严格对快照隔离的 Context 数据进行清理,不影响其他工位
|
||||
targetContext.CurrentFilePath = null;
|
||||
targetContext.Program.Parameters.Clear();
|
||||
@@ -631,7 +631,7 @@ namespace ADP.ViewModels
|
||||
LoggerHelper.WarnWithNotify(runningScope, $"文件格式不正确或为空: {filePath}");
|
||||
return;
|
||||
}
|
||||
|
||||
CurrentConfig.CurrentADPFile = filePath;
|
||||
// 💡 2. 严格赋值给快照锁定下的当前工位上下文,实现数据完全隔离
|
||||
targetContext.Program.Parameters = program.Parameters;
|
||||
targetContext.Program.StepCollection = program.StepCollection;
|
||||
@@ -691,6 +691,7 @@ namespace ADP.ViewModels
|
||||
if (saveFileDialog.ShowDialog() == true)
|
||||
{
|
||||
// 💡 2. 将新路径安全写入快照工位
|
||||
CurrentConfig.CurrentADPFile = saveFileDialog.FileName;
|
||||
targetContext.CurrentFilePath = saveFileDialog.FileName;
|
||||
|
||||
// 💡 3. 调用你的底层文件保存逻辑,传入快照工位的 Program 模型
|
||||
@@ -850,7 +851,7 @@ namespace ADP.ViewModels
|
||||
break;
|
||||
case "测试报告导出界面":
|
||||
if (_globalInfo.CurrentScope != "default") return;
|
||||
_regionManager.RequestNavigate("ShellViewManager", "CurveRecallView");
|
||||
_regionManager.RequestNavigate("ShellViewManager", "ExportView");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user