Commit Graph

6 Commits

Author SHA1 Message Date
XplorePlane Developer 957157ae80 fix: 修复编译错误、BGA向导预览、算子重复插入及状态栏消息
## Compilation fixes
- Fix XAML namespace reference XplorePlane.Converters → XplorePlane.Helpers (EventLogView, StateDisplayView)
- Add missing using for ISampleTypeRepository / JsonSampleTypeRepository in App.xaml.cs
- Fix ILoggerService.Warn() calls using Exception as first arg instead of message string
- Serialize CncProgram to JSON when passing to MatrixLayout (expects string, not CncProgram object)
- Suppress CS8632 nullable annotation warnings project-wide

## BGA wizard fixes
- Fix preview not showing on step 3: force RefreshBgaPreview() when entering final step
- Add step validation in CanNext() to prevent skipping to preview with invalid inputs
- Notify NextCommand.CanExecuteChanged when inputs change
- Fix RunProgress runtime binding error: set Mode=OneWay for ProgressBar.Value

## Operator toolbox: prevent duplicate insertion
- Add static OperatorTarget property for direct dispatch to active pipeline
- PipelineEditorView registers as toolbox target on load (floating window only)
- CNC page sets initial target; PipelineEditorWindow resets to CNC pipeline on close
- '+' button inserts only to the active pipeline instead of broadcasting to all subscribers

## Pipeline editor status bar messages
- Add StatusBarMessageEvent / StatusBarMessagePayload to CommonEvents.cs
- PipelineEditorViewModel publishes status on all ops (add/remove/reorder/save/execute)
- MainViewModel subscribes and displays on main window bottom status bar
- Auto-clear after timeout (3s info, 5s error)

## docs
- Merge three architecture docs into consolidated XplorePlane-架构与结构说明.md
2026-07-24 15:59:16 +08:00
zhengxuan.zhang e4f1cc2e05 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 个测试通过,无回归
2026-07-17 13:04:11 +08:00
zhengxuan.zhang 5dd3d9e8f5 完成代码评审第三阶段整改 2026-07-17 10:38:21 +08:00
zhengxuan.zhang 7202817a0c 按建议完成四层目录统一,并同步调整命名空间和所有引用。
主要结果:
Cnc/Matrix 已统一。
Inspection/{Archive, Documentation, Results, Pool} 已统一。
Main/{Viewport, Overlay, Recording} 已统一。
Hardware/{Camera, Coordinate} 已统一。
权限、账户、登录统一归入 Security。
2026-07-16 17:10:29 +08:00
zhengxuan.zhang f996798560 feat(matrix): 优化矩阵示教与位置管理
- 将 2×2 矩阵推荐示教点调整为对角位置 1、4
- 根据对角示教坐标自动推算其余位置
- 支持右键记录任意矩阵位置的实时坐标
- 支持通过右键菜单启用或禁用指定位置
- 使用不同颜色区分已示教、当前、自动生成和禁用状态
- 持久化补充示教点并完善矩阵专项测试
2026-07-16 16:06:15 +08:00
zhengxuan.zhang e03affe868 CNC编码窗体名称不统一,保持与右侧属性面板中算子名称 2026-07-16 15:55:23 +08:00