setting_re2

设置架构革新中
This commit is contained in:
lincube
2026-03-13 00:33:00 +08:00
parent 40a3a00cfe
commit c4df243610
92 changed files with 2048 additions and 10520 deletions

View File

@@ -40,7 +40,6 @@ public partial class App : Application
private DesktopShellState _desktopShellState = DesktopShellState.ForegroundDesktop;
private ShutdownIntent _shutdownIntent;
private readonly IndependentSettingsModuleService _independentSettingsModuleService = new();
private TrayIcons? _trayIcons;
private PluginRuntimeService? _pluginRuntimeService;
private MainWindow? _mainWindow;
@@ -55,7 +54,9 @@ public partial class App : Application
internal void OpenIndependentSettingsModule(string source, string? pageTag = null)
{
_independentSettingsModuleService.ShowOrActivate(source, pageTag);
AppLogger.Info(
"SettingsFacade",
$"Settings UI entry is disabled by hard-cut migration. Source='{source}'; PageTag='{pageTag ?? "<default>"}'.");
}
public override void Initialize()
@@ -105,11 +106,6 @@ public partial class App : Application
RestoreOrCreateMainWindow(showSingleInstanceNotice: false, source: "TrayMenu");
}
private void OnTraySettingsClick(object? sender, EventArgs e)
{
OpenIndependentSettingsModule("TrayMenu");
}
private void OnTrayRestartClick(object? sender, EventArgs e)
{
_ = _hostApplicationLifecycle.TryRestart(new HostApplicationLifecycleRequest(
@@ -206,12 +202,6 @@ public partial class App : Application
menu.Items.Add(new NativeMenuItemSeparator());
var settingsItem = new NativeMenuItem(L("tray.menu.settings", "Settings"));
settingsItem.Click += OnTraySettingsClick;
menu.Items.Add(settingsItem);
menu.Items.Add(new NativeMenuItemSeparator());
var restartItem = new NativeMenuItem(L("tray.menu.restart", "Restart App"));
restartItem.Click += OnTrayRestartClick;
menu.Items.Add(restartItem);
@@ -361,8 +351,6 @@ public partial class App : Application
_exitCleanupCompleted = true;
AppSettingsService.SettingsSaved -= OnAppSettingsSaved;
_independentSettingsModuleService.CloseIfOpen();
try
{
_pluginRuntimeService?.Dispose();