diff --git a/src/BD.WTTS.Client.AppHost/BD.WTTS.Client.AppHost.csproj b/src/BD.WTTS.Client.AppHost/BD.WTTS.Client.AppHost.csproj
index 713154cd9..229577c92 100644
--- a/src/BD.WTTS.Client.AppHost/BD.WTTS.Client.AppHost.csproj
+++ b/src/BD.WTTS.Client.AppHost/BD.WTTS.Client.AppHost.csproj
@@ -11,9 +11,6 @@
Properties\app.manifest
APP_HOST;$(DefineConstants)
true
-
-
-
..\..\res\icons\app\v2\Icon.ico
@@ -28,6 +25,10 @@
false
+
+
+
+
Properties
diff --git a/src/BD.WTTS.Client.AppHost/Program.cs b/src/BD.WTTS.Client.AppHost/Program.cs
index 8b49d4046..9f61feb7b 100644
--- a/src/BD.WTTS.Client.AppHost/Program.cs
+++ b/src/BD.WTTS.Client.AppHost/Program.cs
@@ -12,8 +12,9 @@ static partial class Program
{
public const string dotnet_version_major = "7";
public const string dotnet_version_minor = "0";
- public const string dotnet_version_build = "3";
+ public const string dotnet_version_build = "4";
public const string dotnet_version = $"{dotnet_version_major}.{dotnet_version_minor}.{dotnet_version_build}";
+
const string dotnet_runtime = "Microsoft.NETCore.App";
const string aspnetcore_runtime = "Microsoft.AspNetCore.App";
@@ -21,6 +22,33 @@ static partial class Program
const string dotnet_type = "BD.WTTS.Program, Steam++";
const string dotnet_type_method = "CustomEntryPoint";
+ ///
+ /// 是否依赖 AspNetCore
+ ///
+ ///
+ static bool RequireAspNetCore(string baseDirectory)
+ {
+ foreach (var moduleName in new[] {
+ // 依赖 AspNetCore 的模块名
+ "Accelerator",
+ "ArchiSteamFarm",
+ })
+ {
+ var module_path =
+#if NET35
+ PathCombine
+#else
+ Path.Combine
+#endif
+ (baseDirectory, "modules", moduleName);
+ if (Directory.Exists(module_path) && !PathIsDirectoryEmpty(module_path))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
#if NET7_0_OR_GREATER
[LibraryImport("shlwapi.dll", EntryPoint = "PathIsDirectoryEmptyW", SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
[return: MarshalAs(UnmanagedType.Bool)]
@@ -91,7 +119,9 @@ static partial class Program
{
Architecture.X86 => "x86",
Architecture.X64 => "x64",
+ Architecture.Arm => "Arm32",
Architecture.Arm64 => "Arm64",
+ Architecture.Armv6 => "Armv6",
_ => throw new ArgumentOutOfRangeException(nameof(architecture), architecture, null),
};
@@ -136,7 +166,8 @@ static partial class Program
[STAThread]
static int Main()
{
- // TODO 合并32位与64位本机库?检查进程是否是x64,加载不同的运行库与程序集
+ // TODO 合并 32 位与 64 位本机库?检查进程是否是 x64,加载不同的运行库与程序集
+ // 允许在 64 位系统上使用 32 位运行
#if DEBUG
Console.WriteLine($"Environment.Version: {Environment.Version}");
@@ -150,6 +181,7 @@ static partial class Program
#else
AppDomain.CurrentDomain.BaseDirectory;
#endif
+ var requireAspNetCore = RequireAspNetCore(baseDirectory);
string hostfxr_path, dotnet_runtime_path, aspnetcore_runtime_path, config_path, dotnetlib_path;
// STEP 0: Search HostFxr
@@ -166,9 +198,17 @@ static partial class Program
{
// 此应用程序必须安装 {0} 才能运行,你想现在就下载并安装运行时吗?
var archStr = ToString(GetProcessArchitecture());
- var _AspNetCoreRuntime = string.Format(AspNetCoreRuntimeFormat1, archStr);
var _NetRuntime = string.Format(NetRuntimeFormat1, archStr);
- var _Runtime = $"{_AspNetCoreRuntime} {And} {_NetRuntime}";
+ string _Runtime;
+ if (requireAspNetCore)
+ {
+ var _AspNetCoreRuntime = string.Format(AspNetCoreRuntimeFormat1, archStr);
+ _Runtime = $"{_AspNetCoreRuntime} {And} {_NetRuntime}";
+ }
+ else
+ {
+ _Runtime = _NetRuntime;
+ }
var text = string.Format(FrameworkMissingFailureFormat1, _Runtime);
var result = ShowErrMessageBox(text, WPFMessageBoxButton.YesNo);
if (result == WPFMessageBoxResult.Yes)
@@ -187,30 +227,56 @@ static partial class Program
{
if (Directory.Exists(dotnet_root) && !PathIsDirectoryEmpty(dotnet_root))
{
+ var dir_hostfxr_path =
+#if NET35
+ PathCombine
+#else
+ Path.Combine
+#endif
+ (dotnet_root, "host", "fxr");
+ string usable_dotnet_version = dotnet_version;
+ var dotnet_version_max = Directory.GetDirectories(dir_hostfxr_path, $"{dotnet_version_major}.*").Select(x =>
+ {
+ try
+ {
+ return new Version(Path.GetFileName(x));
+ }
+ catch
+ {
+ return null;
+ }
+ }).Where(x => x != null).Max();
+ if (dotnet_version_max != null)
+ {
+ usable_dotnet_version = dotnet_version_max.ToString();
+ }
+
hostfxr_path =
#if NET35
PathCombine
#else
Path.Combine
#endif
- (dotnet_root, "host", "fxr", dotnet_version, "hostfxr.dll");
+ (dir_hostfxr_path, usable_dotnet_version, "hostfxr.dll");
+
dotnet_runtime_path =
#if NET35
PathCombine
#else
Path.Combine
#endif
- (dotnet_root, "shared", dotnet_runtime, dotnet_version);
- aspnetcore_runtime_path =
+ (dotnet_root, "shared", dotnet_runtime, usable_dotnet_version);
+
+ aspnetcore_runtime_path = requireAspNetCore ?
#if NET35
PathCombine
#else
Path.Combine
#endif
- (dotnet_root, "shared", aspnetcore_runtime, dotnet_version);
+ (dotnet_root, "shared", aspnetcore_runtime, usable_dotnet_version) : null!;
if (File.Exists(hostfxr_path) &&
Directory.Exists(dotnet_runtime_path) && !PathIsDirectoryEmpty(dotnet_runtime_path) &&
- Directory.Exists(aspnetcore_runtime_path) && !PathIsDirectoryEmpty(aspnetcore_runtime_path))
+ (!requireAspNetCore || (Directory.Exists(aspnetcore_runtime_path) && !PathIsDirectoryEmpty(aspnetcore_runtime_path))))
{
break;
}
@@ -465,7 +531,13 @@ static partial class Program
{
X86 = 0,
X64 = 1,
+ Arm = 2,
Arm64 = 3,
+ //Wasm = 4,
+ //S390x = 5,
+ //LoongArch64 = 6, // SkiaSharp incompatibility.
+ Armv6 = 7,
+ //Ppc64le = 8,
}
#endif
diff --git a/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/linux-x64.pubxml b/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/linux-x64.pubxml
index 856aa0407..504da1759 100644
--- a/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/linux-x64.pubxml
+++ b/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/linux-x64.pubxml
@@ -6,7 +6,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
Release
Any CPU
- bin\Release\Publish\linux-x64
+ bin\Release\Publish\linux-x64\
FileSystem
<_TargetId>Folder
net7.0
@@ -18,14 +18,15 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
Size
none
false
+ false
+ false
+ false
+
true
true
true
false
false
- false
- false
- false
\ No newline at end of file
diff --git a/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-any.pubxml b/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-any.pubxml
index 3ca1d7ae9..746f2bcef 100644
--- a/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-any.pubxml
+++ b/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-any.pubxml
@@ -9,7 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
bin\Release\Publish\win-any\
FileSystem
<_TargetId>Folder
- net3.5
+ net35
false
false
false
diff --git a/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-x64.pubxml b/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-x64.pubxml
index c44f238fa..7e77b912e 100644
--- a/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-x64.pubxml
+++ b/src/BD.WTTS.Client.AppHost/Properties/PublishProfiles/win-x64.pubxml
@@ -18,14 +18,14 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
Size
none
false
+ false
+ false
+ false
true
true
true
false
false
- false
- false
- false
\ No newline at end of file
diff --git a/src/BD.WTTS.Client.Avalonia.App/Program/Program.CompatibilityCheck.cs b/src/BD.WTTS.Client.Avalonia.App/Program/Program.CompatibilityCheck.cs
index ee0e1825e..ef3ee004a 100644
--- a/src/BD.WTTS.Client.Avalonia.App/Program/Program.CompatibilityCheck.cs
+++ b/src/BD.WTTS.Client.Avalonia.App/Program/Program.CompatibilityCheck.cs
@@ -64,6 +64,8 @@ static partial class Program
{
if (Environment.UserInteractive)
{
+ // 在 Win 11 上 MessageBox 与 net35 WPF 上的样式不一致,net35 中的 Title 缺少一些 Padding
+ // 发布此 win-any 与 win-x64 可比较区别
return WPFMessageBox.Show(error, AppResources.Error, button, WPFMessageBoxImage.Error);
}
}
@@ -72,13 +74,17 @@ static partial class Program
}
+ Console.WriteLine("---------------------------");
Console.WriteLine(AppResources.Error);
+ Console.WriteLine("---------------------------");
Console.WriteLine(error);
+ Console.WriteLine("---------------------------");
switch (button)
{
case WPFMessageBoxButton.OKCancel:
{
Console.WriteLine("OK/Cancel");
+ Console.WriteLine("---------------------------");
var line = Console.ReadLine();
if (string.Equals(line, nameof(WPFMessageBoxResult.OK)) || string.Equals(line, nameof(WPFMessageBoxResult.Yes)) || string.Equals(line, "o") || string.Equals(line, "y"))
return WPFMessageBoxResult.OK;
@@ -89,6 +95,7 @@ static partial class Program
case WPFMessageBoxButton.YesNoCancel:
{
Console.WriteLine("Yes/No/Cancel");
+ Console.WriteLine("---------------------------");
var line = Console.ReadLine();
if (string.Equals(line, nameof(WPFMessageBoxResult.OK)) || string.Equals(line, nameof(WPFMessageBoxResult.Yes)) || string.Equals(line, "o") || string.Equals(line, "y"))
return WPFMessageBoxResult.Yes;
@@ -101,6 +108,7 @@ static partial class Program
case WPFMessageBoxButton.YesNo:
{
Console.WriteLine("Yes/No");
+ Console.WriteLine("---------------------------");
var line = Console.ReadLine();
if (string.Equals(line, nameof(WPFMessageBoxResult.OK)) || string.Equals(line, nameof(WPFMessageBoxResult.Yes)) || string.Equals(line, "o") || string.Equals(line, "y"))
return WPFMessageBoxResult.Yes;
diff --git a/src/BD.WTTS.Client.Avalonia.App/Program/Program.OnCreateApplication.cs b/src/BD.WTTS.Client.Avalonia.App/Program/Program.OnCreateApplication.cs
index 61affab1d..bf45de619 100644
--- a/src/BD.WTTS.Client.Avalonia.App/Program/Program.OnCreateApplication.cs
+++ b/src/BD.WTTS.Client.Avalonia.App/Program/Program.OnCreateApplication.cs
@@ -160,6 +160,7 @@ static partial class Program
}
#if DEBUG
+ Console.WriteLine($"CurrentUICulture: {CultureInfo.CurrentUICulture}");
Console.WriteLine($"RID: {GlobalDllImportResolver.RID}");
Console.WriteLine($"DefaultFontFamilyName: {SkiaSharp.SKTypeface.Default.FamilyName}");
Console.WriteLine($"DefaultFontFamilyName2: {IPlatformService.Instance.GetDefaultFontFamily()}");
diff --git a/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/linux-x64.pubxml b/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/linux-x64.pubxml
index 42324e3eb..4c9798411 100644
--- a/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/linux-x64.pubxml
+++ b/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/linux-x64.pubxml
@@ -15,5 +15,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
false
false
false
+ false
+ false
+ false
+ false
\ No newline at end of file
diff --git a/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml b/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml
index 5911deecc..41c63ef8e 100644
--- a/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml
+++ b/src/BD.WTTS.Client.Avalonia.App/Properties/PublishProfiles/win-x64.pubxml
@@ -15,5 +15,9 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
false
false
false
+ false
+ false
+ false
+ false
\ No newline at end of file
diff --git a/src/BD.WTTS.Client/Extensions/CompositeDisposableExtensions.cs b/src/BD.WTTS.Client/Extensions/CompositeDisposableExtensions.cs
index f1ec4d01e..b32355665 100644
--- a/src/BD.WTTS.Client/Extensions/CompositeDisposableExtensions.cs
+++ b/src/BD.WTTS.Client/Extensions/CompositeDisposableExtensions.cs
@@ -50,7 +50,7 @@ public static partial class CompositeDisposableExtensions
public async ValueTask DisposeAsync()
{
- await DisposeAsyncCore().ConfigureAwait(false);
+ await DisposeAsyncCoreAsync().ConfigureAwait(false);
Dispose(disposing: false);
GC.SuppressFinalize(this);
@@ -67,7 +67,7 @@ public static partial class CompositeDisposableExtensions
}
}
- async ValueTask DisposeAsyncCore()
+ async ValueTask DisposeAsyncCoreAsync()
{
if (_asyncDisposableResource is not null)
{
diff --git a/src/BD.WTTS.Client/Helpers/GlobalDllImportResolver.cs b/src/BD.WTTS.Client/Helpers/GlobalDllImportResolver.cs
index d42e6463f..81a7544bd 100644
--- a/src/BD.WTTS.Client/Helpers/GlobalDllImportResolver.cs
+++ b/src/BD.WTTS.Client/Helpers/GlobalDllImportResolver.cs
@@ -41,6 +41,7 @@ public static partial class GlobalDllImportResolver
Architecture.X64 => "linux-x64", // 大多数桌面发行版,如 CentOS、Debian、Fedora、Ubuntu 及派生版本
Architecture.Arm64 => "linux-arm64", // 在 64 位 ARM 上运行的 Linux 发行版本,如 Raspberry Pi Model 3 及更高版本上的 Ubuntu 服务器 64 位
Architecture.Arm => "linux-arm", // 在 ARM 上运行的 Linux 发行版本,如 Raspberry Pi Model 2 及更高版本上的 Raspbian
+ Architecture.Armv6 => "linux-armv6",
_ => throw new PlatformNotSupportedException(),
};
#else
diff --git a/src/BD.WTTS.Client/Helpers/UI/SendSmsUIHelper.cs b/src/BD.WTTS.Client/Helpers/UI/SendSmsUIHelper.cs
index d539ee6ad..3e5bd49dc 100644
--- a/src/BD.WTTS.Client/Helpers/UI/SendSmsUIHelper.cs
+++ b/src/BD.WTTS.Client/Helpers/UI/SendSmsUIHelper.cs
@@ -33,7 +33,7 @@ public static class SendSmsUIHelper
var isStartSendSmsTimer = validator.Validate(request_);
if (isStartSendSmsTimer) i.StartSendSmsTimer();
- await i.SendSms(request_, isStartSendSmsTimer);
+ await i.SendSmsAsync(request_, isStartSendSmsTimer);
}
static async void StartSendSmsTimer(this IViewModel i)
@@ -85,7 +85,7 @@ public static class SendSmsUIHelper
while (b);
}
- static async ValueTask SendSms(this IViewModel i, SendSmsRequest request, bool isStartSendSmsTimer)
+ static async ValueTask SendSmsAsync(this IViewModel i, SendSmsRequest request, bool isStartSendSmsTimer)
{
i.TbSmsCodeFocus?.Invoke();
diff --git a/src/BD.WTTS.Client/Helpers/UI/ThirdPartyLoginHelper.cs b/src/BD.WTTS.Client/Helpers/UI/ThirdPartyLoginHelper.cs
index b73640f98..72280fdc5 100644
--- a/src/BD.WTTS.Client/Helpers/UI/ThirdPartyLoginHelper.cs
+++ b/src/BD.WTTS.Client/Helpers/UI/ThirdPartyLoginHelper.cs
@@ -45,7 +45,7 @@ public static class ThirdPartyLoginHelper
}
else
{
- await OnMessage(modelvm.Value, null);
+ await OnMessageAsync(modelvm.Value, null);
}
});
}
@@ -56,7 +56,7 @@ public static class ThirdPartyLoginHelper
///
///
///
- public static async Task OnMessage(string msg, IWebSocketConnection? socket = null)
+ public static async Task OnMessageAsync(string msg, IWebSocketConnection? socket = null)
{
if (tempAes == null) return;
var byteArray = msg.Base64UrlDecodeToByteArray();
@@ -177,7 +177,7 @@ public static class ThirdPartyLoginHelper
ws.Start(socket =>
{
- socket.OnMessage = async message => await OnMessage(message, socket);
+ socket.OnMessage = async message => await OnMessageAsync(message, socket);
});
}
diff --git a/src/BD.WTTS.Client/Services/Certificate/ICertificateManager.cs b/src/BD.WTTS.Client/Services/Certificate/ICertificateManager.cs
index be832759d..6b88ee068 100644
--- a/src/BD.WTTS.Client/Services/Certificate/ICertificateManager.cs
+++ b/src/BD.WTTS.Client/Services/Certificate/ICertificateManager.cs
@@ -74,13 +74,13 @@ public interface ICertificateManager
///
/// 由平台实现的信任根证书引导,有 Root 权限将尝试执行信任,否则则 UI 引导,跳转网页或弹窗
///
- ValueTask PlatformTrustRootCertificateGuide();
+ ValueTask PlatformTrustRootCertificateGuideAsync();
///
/// 安装根证书,如果没有证书将生成一个新的
///
/// 返回根证书是否受信任
- ValueTask SetupRootCertificate();
+ ValueTask SetupRootCertificateAsync();
///
/// 删除根证书,如果没有证书将返回
diff --git a/src/BD.WTTS.Client/Services/Mvvm/Advertisement/AdvertiseService.cs b/src/BD.WTTS.Client/Services/Mvvm/Advertisement/AdvertiseService.cs
index f0753c7d7..0a2bcf4af 100644
--- a/src/BD.WTTS.Client/Services/Mvvm/Advertisement/AdvertiseService.cs
+++ b/src/BD.WTTS.Client/Services/Mvvm/Advertisement/AdvertiseService.cs
@@ -74,13 +74,13 @@ public sealed class AdvertiseService : ReactiveObject
{
if (IsInitialized == false)
{
- await RefrshAdvertise();
+ await RefrshAdvertiseAsync();
IsInitialized = true;
CheckShow();
}
}
- public async Task RefrshAdvertise()
+ public async Task RefrshAdvertiseAsync()
{
var client = IMicroServiceClient.Instance.Advertisement;
var result = await client.All();
diff --git a/src/BD.WTTS.Client/Services/Mvvm/Identity/UserService.cs b/src/BD.WTTS.Client/Services/Mvvm/Identity/UserService.cs
index 607609bee..30399da80 100644
--- a/src/BD.WTTS.Client/Services/Mvvm/Identity/UserService.cs
+++ b/src/BD.WTTS.Client/Services/Mvvm/Identity/UserService.cs
@@ -41,7 +41,7 @@ public sealed class UserService : ReactiveObject
break;
}
}
- await windowManager.ShowDialog(windowName, isDialog: isDialog, resizeMode: default);
+ await windowManager.ShowDialogAsync(windowName, isDialog: isDialog, resizeMode: default);
}
public void NavigateUserCenterPage()
@@ -85,7 +85,7 @@ public sealed class UserService : ReactiveObject
public DateTimeOffset? LastSignInTime { get; set; }
- public async Task SignIn()
+ public async Task SignInAsync()
{
if (User == null)
{
diff --git a/src/BD.WTTS.Client/Services/Mvvm/NotificationService.cs b/src/BD.WTTS.Client/Services/Mvvm/NotificationService.cs
index 39dea8142..84dfaa724 100644
--- a/src/BD.WTTS.Client/Services/Mvvm/NotificationService.cs
+++ b/src/BD.WTTS.Client/Services/Mvvm/NotificationService.cs
@@ -28,7 +28,7 @@ public sealed class NotificationService : ReactiveObject
NoticeTypes = new();
}
- public async Task GetNews()
+ public async Task GetNewsAsync()
{
var data = await notificationRepo.GetAllAsync(w => w.ExpirationTime > DateTimeOffset.Now);
UnreadNotificationsCount = data.Count(x => !x.HasRead);
@@ -50,7 +50,7 @@ public sealed class NotificationService : ReactiveObject
#pragma warning disable CS0618 // 类型或成员已过时
Click = new NotificationBuilderClickAction(() =>
{
- IWindowManager.Instance.Show(AppEndPoint.Notice);
+ IWindowManager.Instance.ShowAsync(AppEndPoint.Notice);
}),
#pragma warning restore CS0618 // 类型或成员已过时
});
@@ -61,14 +61,14 @@ public sealed class NotificationService : ReactiveObject
INotificationService.Instance.Notify(notice);
}
- await InsertNotificationRecord(noticeList);
+ await InsertNotificationRecordAsync(noticeList);
}
- DeleteExpiredRecordAsync();
+ DeleteExpiredRecord();
}
}
- public async Task LoadNoticeTypes()
+ public async Task LoadNoticeTypesAsync()
{
var client = IMicroServiceClient.Instance.Notice;
var result = await client.Types();
@@ -81,7 +81,7 @@ public sealed class NotificationService : ReactiveObject
}
}
- public async Task LoadNotification(NoticeGroupDTO? selectGroup)
+ public async Task LoadNotificationAsync(NoticeGroupDTO? selectGroup)
{
var client = IMicroServiceClient.Instance.Notice;
var typeid = selectGroup == DefaultType ? null : selectGroup?.Id;
@@ -94,12 +94,12 @@ public sealed class NotificationService : ReactiveObject
// item.PictureStream = httpService.GetImageAsync(item.Picture, ImageChannelType.NoticePicture);
//}
NoticesSource.Clear();
- var data = await LoadHasReadRecord(result.Content.DataSource);
+ var data = await LoadHasReadRecordAsync(result.Content.DataSource);
NoticesSource.AddOrUpdate(data);
}
}
- public async Task> LoadHasReadRecord(IEnumerable notices)
+ public async Task> LoadHasReadRecordAsync(IEnumerable notices)
{
var data = await notificationRepo.GetAllAsync(w => w.ExpirationTime > DateTimeOffset.Now);
if (data.Any_Nullable())
@@ -118,7 +118,7 @@ public sealed class NotificationService : ReactiveObject
return notices;
}
- public async Task InsertNotificationRecord(IEnumerable notices)
+ public async Task InsertNotificationRecordAsync(IEnumerable notices)
{
var data = await notificationRepo.GetAllAsync(w => w.ExpirationTime > DateTimeOffset.Now);
var newData = notices
@@ -136,14 +136,14 @@ public sealed class NotificationService : ReactiveObject
}
}
- public async Task MarkNotificationHasRead(params Notification[] notice)
+ public async Task MarkNotificationHasReadAsync(params Notification[] notice)
{
await notificationRepo.UpdateRangeAsync(notice);
UnreadNotificationsCount -= notice.Length;
UnreadNotificationsCount = UnreadNotificationsCount < 0 ? 0 : UnreadNotificationsCount;
}
- public async void DeleteExpiredRecordAsync()
+ public async void DeleteExpiredRecord()
{
var data = await notificationRepo.GetAllAsync(w => w.ExpirationTime < DateTimeOffset.Now);
await notificationRepo.DeleteRangeAsync(data);
diff --git a/src/BD.WTTS.Client/Services/UI/Views/Windows/IWindowManager.cs b/src/BD.WTTS.Client/Services/UI/Views/Windows/IWindowManager.cs
index 5b3f60ea3..80ce61c05 100644
--- a/src/BD.WTTS.Client/Services/UI/Views/Windows/IWindowManager.cs
+++ b/src/BD.WTTS.Client/Services/UI/Views/Windows/IWindowManager.cs
@@ -19,7 +19,7 @@ public interface IWindowManager
///
///
///
- Task Show(
+ Task ShowAsync(
AppEndPoint appEndPoint,
TWindowViewModel? viewModel = null,
string title = "",
@@ -39,7 +39,7 @@ public interface IWindowManager
///
///
///
- Task Show(Type typeWindowViewModel,
+ Task ShowAsync(Type typeWindowViewModel,
AppEndPoint appEndPoint,
WindowViewModel? viewModel = null,
string title = "",
@@ -57,7 +57,7 @@ public interface IWindowManager
///
///
///
- Task Show(AppEndPoint appEndPoint,
+ Task ShowAsync(AppEndPoint appEndPoint,
WindowViewModel? viewModel = null,
string title = "",
ResizeMode resizeMode = ResizeMode.NoResize,
@@ -75,7 +75,7 @@ public interface IWindowManager
///
///
///
- Task ShowDialog(
+ Task ShowDialogAsync(
AppEndPoint appEndPoint,
TWindowViewModel? viewModel = null,
string title = "",
@@ -94,7 +94,7 @@ public interface IWindowManager
///
///
///
- Task ShowDialog(Type typeWindowViewModel,
+ Task ShowDialogAsync(Type typeWindowViewModel,
AppEndPoint appEndPoint,
WindowViewModel? viewModel = null,
string title = "",
@@ -110,7 +110,7 @@ public interface IWindowManager
///
///
///
- Task ShowDialog(AppEndPoint appEndPoint,
+ Task ShowDialogAsync(AppEndPoint appEndPoint,
WindowViewModel? viewModel = null,
string title = "",
ResizeMode resizeMode = ResizeMode.NoResize,
@@ -144,7 +144,7 @@ public interface IWindowManager
var windowName = vm.GetType().Name.TrimEnd(nameof(WindowViewModel));
if (Enum.TryParse(windowName, out var appEndPoint))
{
- await Show(appEndPoint, vm);
+ await ShowAsync(appEndPoint, vm);
}
}
}
diff --git a/src/BD.WTTS.Client/UI/ViewModels/Windows/Main/MainWindowViewModel.cs b/src/BD.WTTS.Client/UI/ViewModels/Windows/Main/MainWindowViewModel.cs
index 3bc00db75..93b2e6841 100644
--- a/src/BD.WTTS.Client/UI/ViewModels/Windows/Main/MainWindowViewModel.cs
+++ b/src/BD.WTTS.Client/UI/ViewModels/Windows/Main/MainWindowViewModel.cs
@@ -133,7 +133,7 @@ public sealed partial class MainWindowViewModel : WindowViewModel
{
foreach (var plugin in StartupOptions.Value.Plugins!)
{
- await plugin.OnInitialize();
+ await plugin.OnInitializeAsync();
}
}
//if (ASFSettings.AutoRunArchiSteamFarm.Value)
diff --git a/src/BD.WTTS.Client/UI/ViewModels/Windows/TextBoxWindowViewModel.cs b/src/BD.WTTS.Client/UI/ViewModels/Windows/TextBoxWindowViewModel.cs
index 674518f85..a0c18fe8d 100644
--- a/src/BD.WTTS.Client/UI/ViewModels/Windows/TextBoxWindowViewModel.cs
+++ b/src/BD.WTTS.Client/UI/ViewModels/Windows/TextBoxWindowViewModel.cs
@@ -89,7 +89,7 @@ public class TextBoxWindowViewModel : DialogWindowViewModel, ITextBoxWindowViewM
public static async Task ShowDialogAsync(TextBoxWindowViewModel? vm = null)
{
vm ??= new TextBoxWindowViewModel();
- var r = await IWindowManager.Instance.ShowDialog(
+ var r = await IWindowManager.Instance.ShowDialogAsync(
AppEndPoint.TextBox,
vm, string.Empty, ResizeMode.NoResize);
if (r)
diff --git a/src/BD.WTTS.Client/UI/Widgets/MessageBox.cs b/src/BD.WTTS.Client/UI/Widgets/MessageBox.cs
index 0f8ab7d59..0ec5b6161 100644
--- a/src/BD.WTTS.Client/UI/Widgets/MessageBox.cs
+++ b/src/BD.WTTS.Client/UI/Widgets/MessageBox.cs
@@ -134,7 +134,7 @@ public static partial class MessageBox
IsShowRememberChoose = isDoNotShow,
};
- var r = await IWindowManager.Instance.ShowDialog(
+ var r = await IWindowManager.Instance.ShowDialogAsync(
AppEndPoint.MessageBox, viewModel, caption, ResizeMode.NoResize);
if (r && viewModel.RememberChoose && isDoNotShow)