refactor: 迁移剩余对话框到 IApplicationDialogService,拆分 MatrixEditorViewModel 与 MainViewModel
对话框迁移(全部采用可选构造参数 dialogs,保持向后兼容): - SettingsViewModel:9 处 MessageBox + 4 处文件/文件夹对话框 - InspectionMapViewModel:4 处 HexMessageBox + 3 处 MessageBox(含三态确认)+ 1 处 OpenFileDialog - NavigationPropertyPanelViewModel:SaveFileDialog/OpenFileDialog/MessageBox(导航图保存、标定加载) - Debug 目录(SnapshotManagerViewModel/EventLogViewModel/SnapshotDiffViewModel):全部 MessageBox 与文件对话框 - IApplicationDialogService 新增 ConfirmThreeWay 方法及 SelectOpenFile/SelectSaveFile 可选 initialDirectory 参数 God Class 拆分: - 从 MatrixEditorViewModel 提取 MatrixOffsetCalculator(推荐示教点计算、自动生成偏移算法,纯静态计算无 UI 依赖) 和 MatrixExecutionCoordinator(模板程序加载与执行编排,替代内联 try-catch) - 从 MainViewModel 提取 WindowLauncherService,统一管理原 18+ 个 private Window 单例字段, 提供 ShowOrActivate/ShowOrActivateVisible/Show/CloseIfOpen 四种窗口生命周期模式 文档: - 修正 doc/代码评审.md 第二、三阶段标题状态矛盾及不准确的全称断言,新增第四阶段跟踪剩余工作 资源文件: - Resources.resx(默认/zh-CN/zh-TW/en-US)新增约 100+ 本地化键,覆盖上述对话框迁移涉及的消息、标题与文件过滤器 测试: - 同步更新 PipelineEditorViewModelTests/PipelinePropertyTests/CncEditorViewModelTests/MatrixEditorViewModelTests 的构造签名 - 全量 386 个测试通过,无回归
This commit is contained in:
@@ -126,7 +126,7 @@ namespace XplorePlane.Tests.ViewModels
|
||||
var viewModel = new MatrixEditorViewModel(
|
||||
matrixService.Object,
|
||||
Mock.Of<ICncProgramService>(),
|
||||
Mock.Of<IMatrixOrchestrationService>(),
|
||||
Mock.Of<IMatrixExecutionCoordinator>(),
|
||||
motionSystem.Object,
|
||||
Mock.Of<IEventAggregator>(),
|
||||
logger.Object,
|
||||
|
||||
Reference in New Issue
Block a user