Update On Mon Oct 7 20:33:43 CEST 2024

This commit is contained in:
github-action[bot]
2024-10-07 20:33:44 +02:00
parent d52a909dcb
commit fd37c3e1de
1173 changed files with 17994 additions and 11185 deletions
@@ -1,6 +1,5 @@
using ReactiveUI;
using ReactiveUI.Fody.Helpers;
using Splat;
using System.Reactive;
namespace ServiceLib.ViewModels
@@ -102,8 +101,8 @@ namespace ServiceLib.ViewModels
public OptionSettingViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
{
_config = LazyConfig.Instance.Config;
_noticeHandler = Locator.Current.GetService<NoticeHandler>();
_config = AppHandler.Instance.Config;
_updateView = updateView;
#region Core
@@ -251,7 +250,7 @@ namespace ServiceLib.ViewModels
if (Utils.IsNullOrEmpty(localPort.ToString()) || !Utils.IsNumeric(localPort.ToString())
|| localPort <= 0 || localPort >= Global.MaxPort)
{
_noticeHandler?.Enqueue(ResUI.FillLocalListeningPort);
NoticeHandler.Instance.Enqueue(ResUI.FillLocalListeningPort);
return;
}
var needReboot = (EnableStatistics != _config.guiItem.enableStatistics
@@ -267,7 +266,7 @@ namespace ServiceLib.ViewModels
// || Utile.IsNullOrEmpty(KcpreadBufferSize.ToString()) || !Utile.IsNumeric(KcpreadBufferSize.ToString())
// || Utile.IsNullOrEmpty(KcpwriteBufferSize.ToString()) || !Utile.IsNumeric(KcpwriteBufferSize.ToString()))
//{
// _noticeHandler?.Enqueue(ResUI.FillKcpParameters);
// NoticeHandler.Instance.Enqueue(ResUI.FillKcpParameters);
// return;
//}
@@ -337,17 +336,17 @@ namespace ServiceLib.ViewModels
{
if (needReboot)
{
_noticeHandler?.Enqueue(ResUI.NeedRebootTips);
NoticeHandler.Instance.Enqueue(ResUI.NeedRebootTips);
}
else
{
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
NoticeHandler.Instance.Enqueue(ResUI.OperationSuccess);
}
await _updateView?.Invoke(EViewAction.CloseWindow, null);
}
else
{
_noticeHandler?.Enqueue(ResUI.OperationFailed);
NoticeHandler.Instance.Enqueue(ResUI.OperationFailed);
}
}