Move ShowInTaskbar and RunningCoreType to AppManager

This commit is contained in:
2dust
2025-12-24 16:01:28 +08:00
parent 5478c90180
commit 027252e687
15 changed files with 35 additions and 34 deletions
+17
View File
@@ -31,6 +31,23 @@ public sealed class AppManager
public string LinuxSudoPwd { get; set; }
public bool ShowInTaskbar { get; set; }
public ECoreType RunningCoreType { get; set; }
public bool IsRunningCore(ECoreType type)
{
switch (type)
{
case ECoreType.Xray when RunningCoreType is ECoreType.Xray or ECoreType.v2fly or ECoreType.v2fly_v5:
case ECoreType.sing_box when RunningCoreType is ECoreType.sing_box or ECoreType.mihomo:
return true;
default:
return false;
}
}
#endregion Property
#region App