mirror of https://github.com/2dust/v2rayN
Added reminder that a reboot is required to modify settings
parent
e223b80b95
commit
c07c7ad82f
|
@ -1581,6 +1581,15 @@ namespace v2rayN.Resx {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Successful operation. Click the settings menu to reboot the app. 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string NeedRebootTips {
|
||||
get {
|
||||
return ResourceManager.GetString("NeedRebootTips", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Non-VMess or ss protocol 的本地化字符串。
|
||||
/// </summary>
|
||||
|
|
|
@ -1213,4 +1213,7 @@
|
|||
<data name="LvCustomRulesetPath4Singbox" xml:space="preserve">
|
||||
<value>Custom the rule-set of sing-box</value>
|
||||
</data>
|
||||
<data name="NeedRebootTips" xml:space="preserve">
|
||||
<value>Successful operation. Click the settings menu to reboot the app.</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1210,4 +1210,7 @@
|
|||
<data name="LvCustomRulesetPath4Singbox" xml:space="preserve">
|
||||
<value>自定义sing-box rule-set</value>
|
||||
</data>
|
||||
<data name="NeedRebootTips" xml:space="preserve">
|
||||
<value>操作成功。请点击设置菜单重启应用。</value>
|
||||
</data>
|
||||
</root>
|
|
@ -1183,4 +1183,7 @@
|
|||
<data name="LvCustomRulesetPath4Singbox" xml:space="preserve">
|
||||
<value>自訂sing-box rule-set</value>
|
||||
</data>
|
||||
<data name="NeedRebootTips" xml:space="preserve">
|
||||
<value>操作成功。 請點選設定選單重啟應用程式。</value>
|
||||
</data>
|
||||
</root>
|
|
@ -64,9 +64,9 @@ namespace v2rayN.ViewModels
|
|||
[Reactive] public bool EnableCheckPreReleaseUpdate { get; set; }
|
||||
[Reactive] public bool EnableDragDropSort { get; set; }
|
||||
[Reactive] public bool DoubleClick2Activate { get; set; }
|
||||
[Reactive] public int autoUpdateInterval { get; set; }
|
||||
[Reactive] public int trayMenuServersLimit { get; set; }
|
||||
[Reactive] public string currentFontFamily { get; set; }
|
||||
[Reactive] public int AutoUpdateInterval { get; set; }
|
||||
[Reactive] public int TrayMenuServersLimit { get; set; }
|
||||
[Reactive] public string CurrentFontFamily { get; set; }
|
||||
[Reactive] public int SpeedTestTimeout { get; set; }
|
||||
[Reactive] public string SpeedTestUrl { get; set; }
|
||||
[Reactive] public string SpeedPingTestUrl { get; set; }
|
||||
|
@ -161,9 +161,9 @@ namespace v2rayN.ViewModels
|
|||
EnableCheckPreReleaseUpdate = _config.guiItem.checkPreReleaseUpdate;
|
||||
EnableDragDropSort = _config.uiItem.enableDragDropSort;
|
||||
DoubleClick2Activate = _config.uiItem.doubleClick2Activate;
|
||||
autoUpdateInterval = _config.guiItem.autoUpdateInterval;
|
||||
trayMenuServersLimit = _config.guiItem.trayMenuServersLimit;
|
||||
currentFontFamily = _config.uiItem.currentFontFamily;
|
||||
AutoUpdateInterval = _config.guiItem.autoUpdateInterval;
|
||||
TrayMenuServersLimit = _config.guiItem.trayMenuServersLimit;
|
||||
CurrentFontFamily = _config.uiItem.currentFontFamily;
|
||||
SpeedTestTimeout = _config.speedTestItem.speedTestTimeout;
|
||||
SpeedTestUrl = _config.speedTestItem.speedTestUrl;
|
||||
SpeedPingTestUrl = _config.speedTestItem.speedPingTestUrl;
|
||||
|
@ -259,6 +259,10 @@ namespace v2rayN.ViewModels
|
|||
_noticeHandler?.Enqueue(ResUI.FillLocalListeningPort);
|
||||
return;
|
||||
}
|
||||
var needReboot = (EnableStatistics != _config.guiItem.enableStatistics
|
||||
|| EnableDragDropSort != _config.uiItem.enableDragDropSort
|
||||
|| EnableHWA != _config.guiItem.enableHWA
|
||||
|| CurrentFontFamily != _config.uiItem.currentFontFamily);
|
||||
|
||||
//if (Utile.IsNullOrEmpty(Kcpmtu.ToString()) || !Utile.IsNumeric(Kcpmtu.ToString())
|
||||
// || Utile.IsNullOrEmpty(Kcptti.ToString()) || !Utile.IsNumeric(Kcptti.ToString())
|
||||
|
@ -315,12 +319,12 @@ namespace v2rayN.ViewModels
|
|||
_config.uiItem.enableUpdateSubOnlyRemarksExist = EnableUpdateSubOnlyRemarksExist;
|
||||
_config.guiItem.enableSecurityProtocolTls13 = EnableSecurityProtocolTls13;
|
||||
_config.uiItem.autoHideStartup = AutoHideStartup;
|
||||
_config.guiItem.autoUpdateInterval = autoUpdateInterval;
|
||||
_config.guiItem.autoUpdateInterval = AutoUpdateInterval;
|
||||
_config.guiItem.checkPreReleaseUpdate = EnableCheckPreReleaseUpdate;
|
||||
_config.uiItem.enableDragDropSort = EnableDragDropSort;
|
||||
_config.uiItem.doubleClick2Activate = DoubleClick2Activate;
|
||||
_config.guiItem.trayMenuServersLimit = trayMenuServersLimit;
|
||||
_config.uiItem.currentFontFamily = currentFontFamily;
|
||||
_config.guiItem.trayMenuServersLimit = TrayMenuServersLimit;
|
||||
_config.uiItem.currentFontFamily = CurrentFontFamily;
|
||||
_config.speedTestItem.speedTestTimeout = SpeedTestTimeout;
|
||||
_config.speedTestItem.speedTestUrl = SpeedTestUrl;
|
||||
_config.speedTestItem.speedPingTestUrl = SpeedPingTestUrl;
|
||||
|
@ -343,7 +347,14 @@ namespace v2rayN.ViewModels
|
|||
|
||||
if (ConfigHandler.SaveConfig(_config) == 0)
|
||||
{
|
||||
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||
if (needReboot)
|
||||
{
|
||||
_noticeHandler?.Enqueue(ResUI.NeedRebootTips);
|
||||
}
|
||||
else
|
||||
{
|
||||
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||
}
|
||||
_view.DialogResult = true;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -178,9 +178,9 @@ namespace v2rayN.Views
|
|||
this.Bind(ViewModel, vm => vm.EnableCheckPreReleaseUpdate, v => v.togEnableCheckPreReleaseUpdate.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.EnableDragDropSort, v => v.togEnableDragDropSort.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.DoubleClick2Activate, v => v.togDoubleClick2Activate.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.autoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.trayMenuServersLimit, v => v.txttrayMenuServersLimit.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.currentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.AutoUpdateInterval, v => v.txtautoUpdateInterval.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.TrayMenuServersLimit, v => v.txttrayMenuServersLimit.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.CurrentFontFamily, v => v.cmbcurrentFontFamily.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SpeedTestTimeout, v => v.cmbSpeedTestTimeout.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SpeedTestUrl, v => v.cmbSpeedTestUrl.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SpeedPingTestUrl, v => v.cmbSpeedPingTestUrl.Text).DisposeWith(disposables);
|
||||
|
|
Loading…
Reference in New Issue