mirror of
https://github.com/2dust/v2rayN.git
synced 2026-09-27 01:00:39 +03:00
Introduce a small update-notification feature: add AppEvents.HasUpdateNotified event and have TaskManager publish it when update messages exist. Add localized resource key (menuNewUpdate) and expose it in the ResUI designer; update resource files for several languages. In the UI, add a New Update button in MainWindow.xaml, wire its click to the existing check-update handler, bind its visibility to a new BlNewUpdate property on MainWindowViewModel, and subscribe the viewmodel to the new event. Also reset the notification flag after showing the Check Update dialog.
32 lines
1.6 KiB
C#
32 lines
1.6 KiB
C#
namespace ServiceLib.Events;
|
|
|
|
public static class AppEvents
|
|
{
|
|
public static readonly EventChannel<Unit> ReloadRequested = new();
|
|
public static readonly EventChannel<bool?> ShowHideWindowRequested = new();
|
|
public static readonly EventChannel<Unit> AddServerViaScanRequested = new();
|
|
public static readonly EventChannel<Unit> AddServerViaClipboardRequested = new();
|
|
public static readonly EventChannel<bool> SubscriptionsUpdateRequested = new();
|
|
public static readonly EventChannel<bool> HasUpdateNotified = new();
|
|
|
|
public static readonly EventChannel<Unit> ProfilesRefreshRequested = new();
|
|
public static readonly EventChannel<Unit> SubscriptionsRefreshRequested = new();
|
|
public static readonly EventChannel<Unit> ProxiesReloadRequested = new();
|
|
public static readonly EventChannel<ServerSpeedItem> DispatcherStatisticsRequested = new();
|
|
|
|
public static readonly EventChannel<string> SendSnackMsgRequested = new();
|
|
public static readonly EventChannel<string> SendMsgViewRequested = new();
|
|
|
|
public static readonly EventChannel<Unit> AppExitRequested = new();
|
|
public static readonly EventChannel<bool> ShutdownRequested = new();
|
|
|
|
public static readonly EventChannel<Unit> AdjustMainLvColWidthRequested = new();
|
|
|
|
public static readonly EventChannel<string> SetDefaultServerRequested = new();
|
|
|
|
public static readonly EventChannel<Unit> RoutingsMenuRefreshRequested = new();
|
|
public static readonly EventChannel<Unit> TestServerRequested = new();
|
|
public static readonly EventChannel<Unit> InboundDisplayRequested = new();
|
|
public static readonly EventChannel<ESysProxyType> SysProxyChangeRequested = new();
|
|
}
|