This commit is contained in:
DHR60
2026-06-23 05:46:36 +00:00
committed by GitHub
parent ef46f4e7e6
commit 3cebf492d1
2 changed files with 24 additions and 1 deletions

View File

@@ -324,6 +324,29 @@ public class Utils
.ReplaceLineBreaks(",");
}
public static string ParseProcess(string text)
{
if (text.IsNullOrEmpty())
{
return string.Empty;
}
if (text.StartsWith('"'))
{
text = text[1..];
}
if (text.EndsWith('"'))
{
text = text[..^1];
}
return List2String(text.Replace("", ",")
.Replace("\\", "/")
.ReplaceLineBreaks(",")
.Split(',', StringSplitOptions.RemoveEmptyEntries)
.Select(x => x.TrimEx())
.Where(x => x.IsNotEmpty())
.ToList());
}
public static List<string> GetEnumNames<TEnum>() where TEnum : Enum
{
return Enum.GetValues(typeof(TEnum))

View File

@@ -57,7 +57,7 @@ public class RoutingRuleDetailsViewModel : MyReactiveObject
{
Domain = Utils.Convert2Comma(Domain);
IP = Utils.Convert2Comma(IP);
Process = Utils.Convert2Comma(Process);
Process = Utils.ParseProcess(Process);
if (AutoSort)
{