diff --git a/Directory.Packages.props b/Directory.Packages.props
index 7897bf006..2451645fb 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -3,7 +3,7 @@
-
+
diff --git a/references/ArchiSteamFarm b/references/ArchiSteamFarm
index d0b94bf39..5d77b6d75 160000
--- a/references/ArchiSteamFarm
+++ b/references/ArchiSteamFarm
@@ -1 +1 @@
-Subproject commit d0b94bf397f5205cc3565bd04eaadd3ceda6b234
+Subproject commit 5d77b6d75dc77d7afa3a11af081625511ca5e0a4
diff --git a/src/AboutAppInfoPopup.cs b/src/AboutAppInfoPopup.cs
index d14e71144..ea764d357 100644
--- a/src/AboutAppInfoPopup.cs
+++ b/src/AboutAppInfoPopup.cs
@@ -10,7 +10,6 @@ using AndroidApplication = Android.App.Application;
#endif
using System.Properties;
using System.Text;
-using System.Windows;
using System.Linq;
using System.Diagnostics;
using System.Application.Services;
@@ -373,17 +372,25 @@ namespace System.Application.UI
#endif
#if AVALONIA
- if (IApplication.IsAvaloniaApp)
+ if (OperatingSystem2.Application.UseAvalonia)
{
b.Append("[avalonia.ver] ");
- b.Append(GetAssemblyVersion(Type.GetType(IApplication.TypeNames.Avalonia)!.Assembly));
+ b.Append(GetAssemblyVersion(OperatingSystem2.Application.Types.Avalonia!.Assembly));
b.AppendLine();
}
#endif
- if (IApplication.IsXamarinForms)
+ if (OperatingSystem2.Application.UseXamarinForms)
{
b.Append("[forms.ver] ");
- b.Append(GetAssemblyVersion(Type.GetType(IApplication.TypeNames.XamarinForms)!.Assembly));
+ b.Append(GetAssemblyVersion(OperatingSystem2.Application.Types.XamarinForms!.Assembly));
+ b.AppendLine();
+ }
+
+ var controllerType = Type.GetType("Microsoft.AspNetCore.Mvc.ControllerBase, Microsoft.AspNetCore.Mvc.Core");
+ if (controllerType != null)
+ {
+ b.Append("[mvc.ver] ");
+ b.Append(GetAssemblyVersion(controllerType.Assembly));
b.AppendLine();
}
diff --git a/src/Common.CoreLib/IOPath.cs b/src/Common.CoreLib/IOPath.cs
index 7a4948f2b..98b574669 100644
--- a/src/Common.CoreLib/IOPath.cs
+++ b/src/Common.CoreLib/IOPath.cs
@@ -158,25 +158,25 @@ namespace System
#if !NET35
#region BaseDirectory
- public const string DirName_Bin = "Bin";
+ //public const string DirName_Bin = "Bin";
- static readonly Lazy _BaseDirectory = new(() =>
- {
- var value = AppContext.BaseDirectory;
- if (OperatingSystem2.IsWindows && !DesktopBridge.IsRunningAsUwp) // 启用将发布 Host 入口点重定向到 Bin 目录中时重定向基目录
- {
- var value2 = new DirectoryInfo(value);
- if (value2.Parent != null && string.Equals(value2.Name, DirName_Bin, StringComparison.OrdinalIgnoreCase))
- {
- value = value2.Parent.FullName;
- }
- }
- return value;
- });
+ //static readonly Lazy _BaseDirectory = new(() =>
+ //{
+ // var value = AppContext.BaseDirectory;
+ // if (OperatingSystem2.IsWindows && !DesktopBridge.IsRunningAsUwp) // 启用将发布 Host 入口点重定向到 Bin 目录中时重定向基目录
+ // {
+ // var value2 = new DirectoryInfo(value);
+ // if (value2.Parent != null && string.Equals(value2.Name, DirName_Bin, StringComparison.OrdinalIgnoreCase))
+ // {
+ // value = value2.Parent.FullName;
+ // }
+ // }
+ // return value;
+ //});
public static string BaseDirectory =>
- //AppContext.BaseDirectory;
- _BaseDirectory.Value;
+ AppContext.BaseDirectory;
+ //_BaseDirectory.Value;
#endregion
#endif
diff --git a/src/ST.Client.Mobile.Droid/README.md b/src/ST.Client.Android/README.md
similarity index 100%
rename from src/ST.Client.Mobile.Droid/README.md
rename to src/ST.Client.Android/README.md
diff --git a/src/ST.Client.Mobile.Droid.App/Properties/AndroidManifest.xml b/src/ST.Client.Mobile.Droid.App/Properties/AndroidManifest.xml
index 8a143b76b..184dcf0ef 100644
--- a/src/ST.Client.Mobile.Droid.App/Properties/AndroidManifest.xml
+++ b/src/ST.Client.Mobile.Droid.App/Properties/AndroidManifest.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/src/ST.Client/ImageSouce.cs b/src/ST.Client/ImageSouce.cs
index 64e4b8a50..ac0013a8f 100644
--- a/src/ST.Client/ImageSouce.cs
+++ b/src/ST.Client/ImageSouce.cs
@@ -113,7 +113,7 @@ namespace System.Application
{
if (filePathOrResUri == null)
return null;
- if (IApplication.IsAvaloniaApp)
+ if (OperatingSystem2.Application.UseAvalonia)
{
if (filePathOrResUri.StartsWith("avares:"))
return filePathOrResUri;
diff --git a/src/ST.Client/Services/Mvvm/UserService.cs b/src/ST.Client/Services/Mvvm/UserService.cs
index 301169541..b6ef783d6 100644
--- a/src/ST.Client/Services/Mvvm/UserService.cs
+++ b/src/ST.Client/Services/Mvvm/UserService.cs
@@ -107,7 +107,7 @@ namespace System.Application.Services
{
get
{
- if (IApplication.IsAvaloniaApp)
+ if (OperatingSystem2.Application.UseAvalonia)
{
return "avares://System.Application.SteamTools.Client.Avalonia/Application/UI/Assets/AppResources/avater_default.png";
}
diff --git a/src/ST.Client/UI/IApplication.cs b/src/ST.Client/UI/IApplication.cs
index 3a3ab8489..60a94ab9e 100644
--- a/src/ST.Client/UI/IApplication.cs
+++ b/src/ST.Client/UI/IApplication.cs
@@ -45,17 +45,5 @@ namespace System.Application.UI
/// reference to the ViewController (if using Xamarin.iOS), Activity (if using Xamarin.Android) IWin32Window or IntPtr (if using .Net Framework).
///
object CurrentPlatformUIHost { get; }
-
- private static readonly Lazy mIsAvaloniaApp = new(() => Type.GetType(TypeNames.Avalonia) != null);
- static bool IsAvaloniaApp => mIsAvaloniaApp.Value;
-
- private static readonly Lazy mIsXamarinForms = new(() => Type.GetType(TypeNames.XamarinForms) != null);
- static bool IsXamarinForms => mIsXamarinForms.Value;
-
- static class TypeNames
- {
- public const string Avalonia = "Avalonia.Application, Avalonia.Controls";
- public const string XamarinForms = "Xamarin.Forms.Application, Xamarin.Forms.Core";
- }
}
}
\ No newline at end of file
diff --git a/src/ST.Client/UI/ViewModels/General/PageViewModel.cs b/src/ST.Client/UI/ViewModels/General/PageViewModel.cs
index 46309b14d..f153f6a2a 100644
--- a/src/ST.Client/UI/ViewModels/General/PageViewModel.cs
+++ b/src/ST.Client/UI/ViewModels/General/PageViewModel.cs
@@ -21,7 +21,7 @@ namespace System.Application.UI.ViewModels
protected static string GetTitleByDisplayName(string displayName)
{
- if (IApplication.IsAvaloniaApp)
+ if (OperatingSystem2.Application.UseAvalonia)
{
return Constants.HARDCODED_APP_NAME + " | " + displayName;
}
diff --git a/src/Startup2.cs b/src/Startup2.cs
index 45f8d0fc2..e7ee033f8 100644
--- a/src/Startup2.cs
+++ b/src/Startup2.cs
@@ -505,17 +505,14 @@ namespace System.Application
ActiveUserPost(ActiveUserType.OnStartup);
if (GeneralSettings.IsAutoCheckUpdate.Value)
{
- //if (!OperatingSystem2.IsAndroid)
+ try
{
- try
- {
- var appUpdateService = IApplicationUpdateService.Instance;
- await appUpdateService.CheckUpdateAsync(showIsExistUpdateFalse: false);
- }
- catch (Exception e)
- {
- Log.Error(nameof(Startup), e, "OnStartup");
- }
+ var appUpdateService = IApplicationUpdateService.Instance;
+ await appUpdateService.CheckUpdateAsync(showIsExistUpdateFalse: false);
+ }
+ catch (Exception e)
+ {
+ Log.Error(nameof(Startup), e, "OnStartup");
}
}
}