Optimization and improvement, using event subscribers

This commit is contained in:
2dust
2025-09-23 14:27:42 +08:00
parent 6929886b3e
commit 0377e7ce19
6 changed files with 38 additions and 26 deletions

View File

@@ -259,7 +259,7 @@ public partial class MainWindow : WindowBase<MainWindowViewModel>
case EGlobalHotkey.SystemProxySet:
case EGlobalHotkey.SystemProxyUnchanged:
case EGlobalHotkey.SystemProxyPac:
Locator.Current.GetService<StatusBarViewModel>()?.SetListenerType((ESysProxyType)((int)e - 1));
AppEvents.SysProxyChangeRequested.OnNext((ESysProxyType)((int)e - 1));
break;
}
}