Commit Graph

13 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
XplorePlane Developer 1e037199f2 修复编译错误 2026-07-24 10:22:20 +08:00
zhengxuan.zhang f30c42ad1f 修复汇总:
CncNodeExecutionProgress record — 新增 ErrorMessage 可选参数,用于传递具体错误信息到 UI 层

CncExecutionService 主循环 —

新增 nodeErrorMessage 局部变量收集错误信息
Pipeline 返回 null 时设 nodeSucceeded = false 并记录默认错误描述
catch 块中同时记录 ex.Message 到 nodeErrorMessage
progress report 传递 ErrorMessage: nodeErrorMessage
CncEditorViewModel.OnExecutionProgress — Failed 状态时:

读取 progress.ErrorMessage 显示具体原因
StatusMessage 包含错误详情
新增弹窗通知:_dialogs.Show("Cnc_NodeExecutionFailed", ...) 弹出错误对话框
现在 CNC 执行中任何算子异常都会同时通过:

底部状态栏显示红色错误文字
节点树中节点变红(Failed 状态)
弹窗提醒用户具体哪个节点失败及原因
2026-07-22 16:24:29 +08:00
zhengxuan.zhang d1f1c09988 CncPageView.xaml — 运动参数标签从 (μm) 改为 (mm):载物台 X/Y、射线源 Z、探测器 Z、FOD、FDD
StateModels.cs — MotionState record 注释修正:直线轴单位标注从 μm 改为 mm,与实际从 ActualPosition(mm)读取的值一致
2026-07-22 15:48:31 +08:00
zhengxuan.zhang 0abb204c82 1. 插入CNC后自动关闭窗体
三个 ViewModel 新增 Action RequestClose 属性
ExecuteInsertToCnc 成功后调用 RequestClose?.Invoke()
code-behind 中绑定 RequestClose = () => Close()
2. 输出控制 CheckBox 联动表格列显隐

新建 BindingProxy 辅助类(解决 DataGridColumn 不继承 DataContext 的问题)
三个面板的 DataGrid 列通过 Visibility="{Binding Data.OutputXxx, Source={StaticResource Proxy}, Converter={StaticResource BoolToVis}}" 绑定到对应的输出控制属性
取消勾选某项后,对应列即时隐藏;CNC 执行时 Processor 会读取这些 OutputXxx 参数来决定写入 manifest.json 的字段
2026-07-22 15:40:27 +08:00
zhengxuan.zhang 8b1d20bd34 高级算子模块 输出参数的控制 2026-07-22 15:40:20 +08:00
zhengxuan.zhang 98b7fe3d48 修复CNC检测模块Pipeline预览执行时源图像循环污染问题
编辑Pipeline(启用/禁用算子等)触发预览后,结果图像会更新到主视口,
导致下次预览从视口取到的是上次结果而非原图,形成输入循环。

修复方式:
- 选中检测模块时快照当前视口原始源图像并缓存到 _originalSourceImage
- ResolvePreviewSourceImage 优先返回缓存的原图
- 切换/取消选中模块时清空缓存
2026-07-22 14:51:12 +08:00
zhengxuan.zhang c5327b0204 修复测量工具按钮激活态被hover覆盖的问题
- 为测量工具按钮(点点距、点线距、角度、通孔填锡率、气泡测量)
  增加激活态自定义 ControlTemplate,彻底避免 Telerik RadRibbonButton
  内部 VisualStateManager 的 hover 效果覆盖激活背景色
- 提取共享模板 ActiveMeasureButtonTemplate,减少重复定义
- 激活态模板使用 TemplateBinding Text 正确显示按钮文字
2026-07-22 14:19:09 +08:00
zhengxuan.zhang 00aaa5b97d 1、调整主界面按钮,将硬件相关按钮降低级别;2、将相机设置移入设置页面中 2026-07-22 13:06:34 +08:00
zhengxuan.zhang 0b255db509 增加导航图 2026-07-07 14:31:00 +08:00
zhengxuan.zhang 9c6dfb6259 补充必要配置文件 2026-07-07 10:32:26 +08:00
zhengxuan.zhang e367819610 Merge branch 'TURBO-003-CNC' into Feature/TURBO-002-Cnc
# Conflicts:
#	XP.Camera/Calibration/Resources/CalibrationResources.Designer.cs
2026-07-07 10:25:18 +08:00
zhengxuan.zhang d9660beb25 新建 Calibration文件夹统一存放 标定文件 2026-07-07 09:31:48 +08:00