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 @@ - +