Revert Add Sandbox detection

This commit is contained in:
ema
2025-07-08 03:42:39 +08:00
parent b5773fc721
commit 3fd444102d
3 changed files with 2 additions and 5 deletions

View File

@@ -43,7 +43,6 @@ public partial class App : Application
public static readonly string AppPath = Path.GetDirectoryName(AppFullPath);
public static readonly bool Is64Bit = Environment.Is64BitProcess;
public static readonly bool IsUWP = ProcessHelper.IsRunningAsUWP();
public static readonly bool IsSandBox = !ProcessHelper.IsFullTrust();
public static readonly bool IsWin11 = Environment.OSVersion.Version >= new Version(10, 0, 21996);
public static readonly bool IsWin10 = !IsWin11 && Environment.OSVersion.Version >= new Version(10, 0);
public static readonly bool IsGPUInBlacklist = SystemHelper.IsGPUInBlacklist();

View File

@@ -44,8 +44,6 @@ internal class TrayIconManager : IDisposable
})
{ Enabled = !App.IsUWP };
private readonly string _attr = App.IsUWP ? $" (UWP{(App.IsSandBox ? string.Empty : "-SandBox")})" : string.Empty;
private TrayIconManager()
{
_icon = new NotifyIcon
@@ -55,7 +53,7 @@ internal class TrayIconManager : IDisposable
Icon = GetTrayIconByDPI(),
ContextMenu = new ContextMenu(
[
new MenuItem($"v{Application.ProductVersion}{_attr}") {Enabled = false},
new MenuItem($"v{Application.ProductVersion}{(App.IsUWP ? " (UWP)" : string.Empty)}") {Enabled = false},
new MenuItem("-"),
new MenuItem(TranslationHelper.Get("Icon_CheckUpdate"), (_, _) => Updater.CheckForUpdates()),
new MenuItem(TranslationHelper.Get("Icon_GetPlugin"),