diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml b/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml
index 500e8e67e..34488a280 100644
--- a/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml
@@ -6,10 +6,9 @@
-
-
-
-
+
+
+
diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs b/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs
index 702a6e507..b4fa8dd93 100644
--- a/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia.App/App.axaml.cs
@@ -15,6 +15,7 @@ using ShutdownMode = Avalonia.Controls.ShutdownMode;
using Window = Avalonia.Controls.Window;
using WindowState = Avalonia.Controls.WindowState;
using Avalonia.Themes.Fluent;
+using Avalonia.Markup.Xaml.Styling;
#if WINDOWS
using System.Windows.Shell;
@@ -95,16 +96,17 @@ namespace System.Application.UI
{
Header = "Light",
Command = ReactiveCommand.Create(()=>{
- if(fluentTheme is not null)
- fluentTheme.Mode= FluentThemeMode.Light;
- })
+ Styles[0] = new FluentTheme(new Uri("avares://Avalonia.Themes.Fluent/FluentLight.xaml"))
+ { Mode= FluentThemeMode.Light };
+ //Styles[1] = new StyleInclude(new Uri("avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeLight.xaml"));
+ })
},
new MenuItem()
{
Header = "Dark",
Command = ReactiveCommand.Create(()=>{
- if(fluentTheme is not null)
- fluentTheme.Mode= FluentThemeMode.Dark;
+ Styles[0] = new FluentTheme(new Uri("avares://Avalonia.Themes.Fluent/FluentDark.xaml")){ Mode= FluentThemeMode.Dark };
+ //Styles[1] = new StyleInclude(new Uri("avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeDark.xaml"));
})
},
new MenuItem()
@@ -130,14 +132,6 @@ namespace System.Application.UI
#endregion
- foreach (var style in App.Current.Styles)
- {
- if (style is FluentTheme fluent)
- {
- fluentTheme = fluent;
- }
- }
-
#if WINDOWS
AddJumpTask();
#endif
diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/MainView.axaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/MainView.axaml
index a275ce8d1..cb1accdc7 100644
--- a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/MainView.axaml
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/MainView.axaml
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="600"
+ mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800"
xmlns:pages="clr-namespace:System.Application.UI.Views.Pages"
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
@@ -13,8 +13,8 @@
-
-
+
+
@@ -28,14 +28,15 @@
-
+
-
+
+ Classes="sidebar">
@@ -65,7 +66,6 @@
diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Theme.Dark.xaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Theme.Dark.xaml
deleted file mode 100644
index 70b61e5b2..000000000
--- a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Theme.Dark.xaml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
- 40 0 40 0
-
-
-
-
-
diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeDark.xaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeDark.xaml
new file mode 100644
index 000000000..5f18bac44
--- /dev/null
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeDark.xaml
@@ -0,0 +1,79 @@
+
diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Theme.Light.xaml b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeLight.xaml
similarity index 99%
rename from System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Theme.Light.xaml
rename to System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeLight.xaml
index 8db5b2e55..df5ed4622 100644
--- a/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Theme.Light.xaml
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeLight.xaml
@@ -1,4 +1,4 @@
-
\ No newline at end of file
+
diff --git a/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj b/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj
index f70d3f0b6..af2b9b329 100644
--- a/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj
+++ b/System.Application.SteamTools.Client.Desktop.Avalonia/System.Application.SteamTools.Client.Desktop.Avalonia.csproj
@@ -20,8 +20,8 @@
-
-
+
+
@@ -52,10 +52,10 @@
MSBuild:Compile
-
+
MSBuild:Compile
-
+
MSBuild:Compile
@@ -73,6 +73,9 @@
DebugPage.axaml
+
+ Settings_UIaxaml
+
StartPage.axaml
diff --git a/System.Application.SteamTools.Client.Desktop/System.Application.SteamTools.Client.Desktop.csproj b/System.Application.SteamTools.Client.Desktop/System.Application.SteamTools.Client.Desktop.csproj
index d15be75d7..0a5c822d0 100644
--- a/System.Application.SteamTools.Client.Desktop/System.Application.SteamTools.Client.Desktop.csproj
+++ b/System.Application.SteamTools.Client.Desktop/System.Application.SteamTools.Client.Desktop.csproj
@@ -68,7 +68,6 @@
-
\ No newline at end of file
diff --git a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs
index 54c2a07bf..f4884e279 100644
--- a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs
+++ b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.Designer.cs
@@ -69,6 +69,60 @@ namespace System.Application.UI.Resx {
}
}
+ ///
+ /// 查找类似 常见问题疑难解答 的本地化字符串。
+ ///
+ public static string About_FAQ {
+ get {
+ return ResourceManager.GetString("About_FAQ", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 加入我们 的本地化字符串。
+ ///
+ public static string About_Joinus {
+ get {
+ return ResourceManager.GetString("About_Joinus", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 开放源代码许可 的本地化字符串。
+ ///
+ public static string About_OpenSource {
+ get {
+ return ResourceManager.GetString("About_OpenSource", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 此软件 的本地化字符串。
+ ///
+ public static string About_ThisSoft {
+ get {
+ return ResourceManager.GetString("About_ThisSoft", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 更新记录 的本地化字符串。
+ ///
+ public static string About_UpdateHistory {
+ get {
+ return ResourceManager.GetString("About_UpdateHistory", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 ASF Plus 的本地化字符串。
+ ///
+ public static string ArchiSteamFarmPlus {
+ get {
+ return ResourceManager.GetString("ArchiSteamFarmPlus", resourceCulture);
+ }
+ }
+
///
/// 查找类似 社区加速 的本地化字符串。
///
@@ -159,6 +213,15 @@ namespace System.Application.UI.Resx {
}
}
+ ///
+ /// 查找类似 其它平台 的本地化字符串。
+ ///
+ public static string OtherGamePlaform {
+ get {
+ return ResourceManager.GetString("OtherGamePlaform", resourceCulture);
+ }
+ }
+
///
/// 查找类似 设置 的本地化字符串。
///
@@ -186,6 +249,24 @@ namespace System.Application.UI.Resx {
}
}
+ ///
+ /// 查找类似 主题 的本地化字符串。
+ ///
+ public static string Settings_Theme {
+ get {
+ return ResourceManager.GetString("Settings_Theme", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 界面设置 的本地化字符串。
+ ///
+ public static string Settings_UI {
+ get {
+ return ResourceManager.GetString("Settings_UI", resourceCulture);
+ }
+ }
+
///
/// 查找类似 本地令牌 的本地化字符串。
///
diff --git a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx
index 469af838e..3dca9a0e8 100644
--- a/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx
+++ b/System.Application.SteamTools.Client.Desktop/UI/Resx/AppResources.resx
@@ -120,6 +120,24 @@
关于
+
+ 常见问题疑难解答
+
+
+ 加入我们
+
+
+ 开放源代码许可
+
+
+ 此软件
+
+
+ 更新记录
+
+
+ ASF Plus
+
社区加速
@@ -150,6 +168,9 @@
语言
+
+ 其它平台
+
设置
@@ -159,6 +180,12 @@
基本设置
+
+ 主题
+
+
+ 界面设置
+
本地令牌
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs
index c46195daf..9d0c01821 100644
--- a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/MainWindowViewModel.cs
@@ -28,23 +28,36 @@ namespace System.Application.UI.ViewModels
#endregion
public StartPageViewModel StartPage { get; }
- public GameListPageViewModel GameListPage { get; }
+ public CommunityProxyPageViewModel CommunityProxyPage { get; }
public SteamAccountPageViewModel SteamAccountPage { get; }
-
+ public GameListPageViewModel GameListPage { get; }
+ public LocalAuthPageViewModel LocalAuthPage { get; }
+ public SteamIdlePageViewModel SteamIdlePage { get; }
+ public ArchiSteamFarmPlusPageViewModel ASFPage { get; }
+ public GameRelatedPageViewModel GameRelatedPage { get; }
+ public OtherPlatformPageViewModel OtherPlatformPage { get; }
public IList TabItems { get; set; }
+#pragma warning disable CS8618 // SelectedItem不会为null
public MainWindowViewModel() : base()
+#pragma warning restore CS8618 //
{
Title = ThisAssembly.AssemblyTrademark;
this.TabItems = new List
{
(this.StartPage = new StartPageViewModel().AddTo(this)),
+ (this.CommunityProxyPage = new CommunityProxyPageViewModel().AddTo(this)),
(this.SteamAccountPage = new SteamAccountPageViewModel().AddTo(this)),
(this.GameListPage = new GameListPageViewModel().AddTo(this)),
+ (this.LocalAuthPage = new LocalAuthPageViewModel().AddTo(this)),
+ (this.SteamIdlePage = new SteamIdlePageViewModel().AddTo(this)),
+ (this.ASFPage = new ArchiSteamFarmPlusPageViewModel().AddTo(this)),
+ (this.GameRelatedPage = new GameRelatedPageViewModel().AddTo(this)),
+ (this.OtherPlatformPage = new OtherPlatformPageViewModel().AddTo(this)),
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/ArchiSteamFarmPlusPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/ArchiSteamFarmPlusPageViewModel.cs
new file mode 100644
index 000000000..ae4379aea
--- /dev/null
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/ArchiSteamFarmPlusPageViewModel.cs
@@ -0,0 +1,14 @@
+using System.Application.UI.Resx;
+
+namespace System.Application.UI.ViewModels
+{
+ public class ArchiSteamFarmPlusPageViewModel : TabItemViewModel
+ {
+ public override string Name
+ {
+ get => AppResources.ArchiSteamFarmPlus;
+ protected set { throw new NotImplementedException(); }
+ }
+
+ }
+}
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/CommunityProxyPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/CommunityProxyPageViewModel.cs
new file mode 100644
index 000000000..fa4f0322e
--- /dev/null
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/CommunityProxyPageViewModel.cs
@@ -0,0 +1,14 @@
+using System.Application.UI.Resx;
+
+namespace System.Application.UI.ViewModels
+{
+ public class CommunityProxyPageViewModel : TabItemViewModel
+ {
+ public override string Name
+ {
+ get => AppResources.CommunityFix;
+ protected set { throw new NotImplementedException(); }
+ }
+
+ }
+}
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/GameRelatedPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/GameRelatedPageViewModel.cs
new file mode 100644
index 000000000..f9f09eeeb
--- /dev/null
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/GameRelatedPageViewModel.cs
@@ -0,0 +1,14 @@
+using System.Application.UI.Resx;
+
+namespace System.Application.UI.ViewModels
+{
+ public class GameRelatedPageViewModel : TabItemViewModel
+ {
+ public override string Name
+ {
+ get => AppResources.GameRelated;
+ protected set { throw new NotImplementedException(); }
+ }
+
+ }
+}
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs
new file mode 100644
index 000000000..6c7c8a12d
--- /dev/null
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/LocalAuthPageViewModel.cs
@@ -0,0 +1,14 @@
+using System.Application.UI.Resx;
+
+namespace System.Application.UI.ViewModels
+{
+ public class LocalAuthPageViewModel : TabItemViewModel
+ {
+ public override string Name
+ {
+ get => AppResources.SteamAuth;
+ protected set { throw new NotImplementedException(); }
+ }
+
+ }
+}
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/OtherPlatformPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/OtherPlatformPageViewModel.cs
new file mode 100644
index 000000000..ef17b3ab7
--- /dev/null
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/OtherPlatformPageViewModel.cs
@@ -0,0 +1,14 @@
+using System.Application.UI.Resx;
+
+namespace System.Application.UI.ViewModels
+{
+ public class OtherPlatformPageViewModel : TabItemViewModel
+ {
+ public override string Name
+ {
+ get => AppResources.OtherGamePlaform;
+ protected set { throw new NotImplementedException(); }
+ }
+
+ }
+}
diff --git a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs
index de24f7ebb..a47793258 100644
--- a/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs
+++ b/System.Application.SteamTools.Client.Desktop/UI/ViewModels/Pages/Settings/SettingsPageViewModel.cs
@@ -17,45 +17,20 @@ namespace System.Application.UI.ViewModels
public SettingsPageViewModel()
{
- //Languages = R.Languages.Select(Convert).ToList();
+
}
- //int mCurrentLanguageIndex;
+ KeyValuePair _CurrentLanguage = R.Languages.First();
+ public KeyValuePair CurrentLanguage
+ {
+ get => _CurrentLanguage;
+ set
+ {
+ this.RaiseAndSetIfChanged(ref _CurrentLanguage, value);
+ R.ChangeLanguage(_CurrentLanguage.Key);
+ }
+ }
- //public int CurrentLanguageIndex
- //{
- // get => mCurrentLanguageIndex;
- // set
- // {
- // this.RaiseAndSetIfChanged(ref mCurrentLanguageIndex, value);
- // var cultureName = Languages[value].Tag?.ToString();
- // if (string.IsNullOrWhiteSpace(cultureName))
- // {
- // cultureName = R.DefaultCurrentUICulture?.Name;
- // }
- // if (!string.IsNullOrWhiteSpace(cultureName))
- // {
- // R.ChangeLanguage(cultureName);
- // }
- // //if (!IsInDesignMode)
- // //{
- // // var localizationService = DI.Get();
- // // var cultureName = Languages[value].Tag?.ToString();
- // // if (string.IsNullOrWhiteSpace(cultureName))
- // // {
- // // cultureName = localizationService.DefaultCurrentUICulture?.Name;
- // // }
- // // if (!string.IsNullOrWhiteSpace(cultureName))
- // // {
- // // localizationService.ChangeLanguage(cultureName);
- // // }
- // //}
- // }
- //}
- //public List