From 338358a71c16a3faab51ff097863b962363bb5a8 Mon Sep 17 00:00:00 2001 From: "zhengxuan.zhang" Date: Thu, 23 Apr 2026 16:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=97=E5=AD=90=E8=B0=83=E8=8A=82=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=8E=A7=E4=BB=B6=E7=9A=84=E6=98=BE=E7=A4=BA=E4=B8=8E?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E7=9A=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ImageProcessing/ProcessorParameterVM.cs | 5 ++ .../ImageProcessing/PipelineEditorView.xaml | 53 +++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/XplorePlane/ViewModels/ImageProcessing/ProcessorParameterVM.cs b/XplorePlane/ViewModels/ImageProcessing/ProcessorParameterVM.cs index 7408d5a..dc807d0 100644 --- a/XplorePlane/ViewModels/ImageProcessing/ProcessorParameterVM.cs +++ b/XplorePlane/ViewModels/ImageProcessing/ProcessorParameterVM.cs @@ -19,6 +19,7 @@ namespace XplorePlane.ViewModels MinValue = parameter.MinValue; MaxValue = parameter.MaxValue; Options = parameter.Options; + IsVisible = parameter.IsVisible; ParameterType = parameter.ValueType?.Name?.ToLowerInvariant() switch { "int32" or "int" => "int", @@ -34,7 +35,11 @@ namespace XplorePlane.ViewModels public object MinValue { get; } public object MaxValue { get; } public string[]? Options { get; } + public bool IsVisible { get; } public string ParameterType { get; } + public bool HasOptions => Options is { Length: > 0 }; + public bool IsBool => ParameterType == "bool"; + public bool IsTextInput => !IsBool && !HasOptions; public bool IsValueValid { diff --git a/XplorePlane/Views/ImageProcessing/PipelineEditorView.xaml b/XplorePlane/Views/ImageProcessing/PipelineEditorView.xaml index fbff03e..35efed6 100644 --- a/XplorePlane/Views/ImageProcessing/PipelineEditorView.xaml +++ b/XplorePlane/Views/ImageProcessing/PipelineEditorView.xaml @@ -226,6 +226,16 @@ Foreground="#555" Text="参数配置" /> + + + @@ -241,6 +251,7 @@ Text="{Binding DisplayName}" TextTrimming="CharacterEllipsis" /> + + + + @@ -261,6 +276,44 @@ + + + + + + + + + +