Files
XplorePlane/XP.ImageProcessing.Processors/Core/ProcessorParameter.cs
T
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

61 lines
2.1 KiB
C#

// ============================================================================
// Copyright © 2026 Hexagon Technology Center GmbH. All Rights Reserved.
// 文件名: ProcessorParameter.cs
// 描述: 图像处理算子参数定义类,用于描述算子的可配置参数
// 功能:
// - 定义参数的基本属性(名称、类型、默认值)
// - 支持参数范围约束(最小值、最大值)
// - 支持枚举类型参数(下拉选项)
// - 提供参数描述信息用于UI显示
// - 统一的参数管理机制
// 作者: 李伟 wei.lw.li@hexagon.com
// ============================================================================
namespace XP.ImageProcessing.Core;
/// <summary>
/// 图像处理算子参数定义
/// </summary>
public class ProcessorParameter
{
/// <summary>参数名称(代码中使用)</summary>
public string Name { get; set; }
/// <summary>显示名称(UI中显示)</summary>
public string DisplayName { get; set; }
/// <summary>参数类型</summary>
public Type ValueType { get; set; }
/// <summary>当前值</summary>
public object Value { get; set; }
/// <summary>最小值(可选)</summary>
public object? MinValue { get; set; }
/// <summary>最大值(可选)</summary>
public object? MaxValue { get; set; }
/// <summary>参数描述</summary>
public string Description { get; set; }
/// <summary>可选值列表(用于下拉框)</summary>
public string[]? Options { get; set; }
/// <summary>参数是否可见</summary>
public bool IsVisible { get; set; } = true;
public ProcessorParameter(string name, string displayName, Type valueType, object defaultValue,
object? minValue = null, object? maxValue = null, string description = "", string[]? options = null)
{
Name = name;
DisplayName = displayName;
ValueType = valueType;
Value = defaultValue;
MinValue = minValue;
MaxValue = maxValue;
Description = description;
Options = options;
}
}