From b5405d2f7943587066d0feae035b67ca95d83826 Mon Sep 17 00:00:00 2001
From: tfarcraw <123211521@163.com>
Date: Tue, 10 Nov 2026 00:26:53 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B0=86=E5=88=A4=E5=AE=9A=E6=9D=A1=E4=BB=B6?=
=?UTF-8?q?=E6=96=B9=E6=B3=95=E5=90=8D=E7=A7=B0=E7=BB=9F=E4=B8=80=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E4=B8=BA=E4=B8=AD=E6=96=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../RecipeEditor/ConditionMethodLabels.cs | 20 +++++++++++++++++++
.../VVMs/RecipeEditor/RecipeEditor.axaml | 12 ++++++++---
2 files changed, 29 insertions(+), 3 deletions(-)
create mode 100644 src/SopHelper.Avalonia/VVMs/RecipeEditor/ConditionMethodLabels.cs
diff --git a/src/SopHelper.Avalonia/VVMs/RecipeEditor/ConditionMethodLabels.cs b/src/SopHelper.Avalonia/VVMs/RecipeEditor/ConditionMethodLabels.cs
new file mode 100644
index 0000000..a22c66f
--- /dev/null
+++ b/src/SopHelper.Avalonia/VVMs/RecipeEditor/ConditionMethodLabels.cs
@@ -0,0 +1,20 @@
+using Avalonia.Data.Converters;
+using SopHelper.Engine.Sop;
+
+namespace SopHelper.VVMs.RecipeEditor;
+
+/// 判定方法的界面名称;配方仍使用引擎的稳定标识。
+public static class ConditionMethodLabels
+{
+ public static FuncValueConverter Converter { get; } = new(method => method switch
+ {
+ ConditionMethod.TimeElapsed => "持续计时",
+ ConditionMethod.HandInRegion => "手在区域内",
+ ConditionMethod.HandMove => "手从起点移到终点",
+ ConditionMethod.HandNearObject => "手靠近物体",
+ ConditionMethod.ObjectPresent => "物体出现在画面中",
+ ConditionMethod.ObjectInZone => "物体在区域内",
+ ConditionMethod.PersonPresent => "人员在场",
+ _ => method ?? "",
+ });
+}
diff --git a/src/SopHelper.Avalonia/VVMs/RecipeEditor/RecipeEditor.axaml b/src/SopHelper.Avalonia/VVMs/RecipeEditor/RecipeEditor.axaml
index b88ca54..03ec233 100644
--- a/src/SopHelper.Avalonia/VVMs/RecipeEditor/RecipeEditor.axaml
+++ b/src/SopHelper.Avalonia/VVMs/RecipeEditor/RecipeEditor.axaml
@@ -150,7 +150,7 @@
-
+
@@ -160,7 +160,13 @@
-
+
+
+
+
+
+
+
@@ -218,7 +224,7 @@
-
+