diff --git a/Description/README_EN-US.md b/Description/README_EN-US.md index 3937525..0fddcbc 100644 --- a/Description/README_EN-US.md +++ b/Description/README_EN-US.md @@ -86,9 +86,7 @@ A toolbox that integrates multiple gadgets. ### Download and installation considerations -> * The program is built using Mile.Xaml (Xaml Islands), it is recommended that your system version is Windows 11 (codenamed 21H2 / internal version number 22000) or later, The minimum version is Windows 10 (codenamed 2004 / internal version number 19041) or later. -> * If your system is below Windows 11 (codenamed 22H2 / internal version number 22621), there are some limitations to the functionality of the application: - The system backdrop cannot be set +> * The program is built using Mile.Xaml (Xaml Islands), it is recommended that your system version is Windows 11 (codenamed 22H2 / internal version number 22621) or later, The minimum version is Windows 11 (codenamed 22H2 / internal version number 22621) or later. > * [Release](https://github.com/Gaoyifei1011/WindowsToolbox/releases) The binary installation file for the page has been packaged into a compressed package. Unzip the package and run the install.ps1 file in Powershell admin mode (if necessary) for a quick installation. > * Download and compile the project source code yourself. (Please read the project compilation steps below carefully) diff --git a/Description/README_ZH-CN.md b/Description/README_ZH-CN.md index 7ef8113..eb72326 100644 --- a/Description/README_ZH-CN.md +++ b/Description/README_ZH-CN.md @@ -86,9 +86,7 @@ ### 下载与安装注意事项 -> * 该程序使用的是Mile.Xaml(Xaml Islands)构建的,建议您的系统版本为Windows 11(代号 21H2 / 内部版本号 22000)或更高版本,最低版本为Windows 10(代号2004 / 内部版本号19041)或更高版本。 -> * 如果您的系统低于Windows 11(代号 22H2 / 内部版本号 22621),应用功能存在一些限制: - 不支持设置背景色 +> * 该程序使用的是Mile.Xaml(Xaml Islands)构建的,建议您的系统版本为Windows 11(代号 22H2 / 内部版本号 22621)或更高版本,最低版本为Windows 11(代号 22H2 / 内部版本号22621)或更高版本。 > * [Release](https://github.com/Gaoyifei1011/WindowsToolbox/releases)页面的二进制安装文件已经打包成压缩包。请解压压缩包并使用Powershell管理员模式(必要情况下)运行install.ps1文件方可实现快速安装。 > * 自行下载项目源代码并编译。(请仔细阅读下面的项目编译步骤) diff --git a/README.md b/README.md index 1d775fe..271d68a 100644 --- a/README.md +++ b/README.md @@ -93,9 +93,7 @@ ### 下载与安装注意事项 -> * 该程序使用的是Mile.Xaml(Xaml Islands)构建的,建议您的系统版本为Windows 11(代号 21H2 / 内部版本号 22000)或更高版本,最低版本为Windows 10(代号2004 / 内部版本号19041)或更高版本。 -> * 如果您的系统低于Windows 11(代号 22H2 / 内部版本号 22621),应用功能存在一些限制: - 不支持设置背景色 +> * 该程序使用的是Mile.Xaml(Xaml Islands)构建的,建议您的系统版本为Windows 11(代号 22H2 / 内部版本号 22621)或更高版本,最低版本为Windows 11(代号 22H2 / 内部版本号22621)或更高版本。 > * [Release](https://github.com/Gaoyifei1011/WindowsToolbox/releases)页面的二进制安装文件已经打包成压缩包。请解压压缩包并使用Powershell管理员模式(必要情况下)运行install.ps1文件方可实现快速安装。 > * 自行下载项目源代码并编译。(请仔细阅读下面的项目编译步骤) diff --git a/WindowsTools/Properties/AssemblyInfo.cs b/WindowsTools/Properties/AssemblyInfo.cs index 7cd2d39..1bee617 100644 --- a/WindowsTools/Properties/AssemblyInfo.cs +++ b/WindowsTools/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ [assembly: AssemblyCompany("高怡飞")] [assembly: AssemblyCopyright("Copyright ©2024 高怡飞, All Rights Reserved.")] [assembly: AssemblyDescription("Windows 工具箱")] -[assembly: AssemblyFileVersion("2.4.502.0")] -[assembly: AssemblyInformationalVersion("2.4.502.0")] +[assembly: AssemblyFileVersion("2.4.503.0")] +[assembly: AssemblyInformationalVersion("2.4.503.0")] [assembly: AssemblyProduct("Windows 工具箱")] [assembly: AssemblyTitle("Windows 工具箱")] -[assembly: AssemblyVersion("2.4.502.0")] +[assembly: AssemblyVersion("2.4.503.0")] // 设置程序集对 COM 组件的访问权限 [assembly: ComVisible(false)] diff --git a/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml b/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml index 595b6f3..1c1f639 100644 --- a/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml +++ b/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml @@ -6,6 +6,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:string="using:WindowsTools.Strings" + ActualThemeChanged="{x:Bind OnActualThemeChanged}" mc:Ignorable="d"> @@ -28,7 +29,7 @@ diff --git a/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml.cs b/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml.cs index 1541f93..db7b276 100644 --- a/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml.cs +++ b/WindowsTools/Views/Pages/AddDownloadTaskPage.xaml.cs @@ -5,8 +5,10 @@ using System.Threading.Tasks; using System.Web; using System.Windows.Forms; +using Windows.UI; using Windows.UI.Xaml; using Windows.UI.Xaml.Controls; +using Windows.UI.Xaml.Media; using WindowsTools.Helpers.Controls; using WindowsTools.Services.Controls.Pages; using WindowsTools.Services.Controls.Settings; @@ -86,6 +88,22 @@ public string DownloadFolderText } } + private SolidColorBrush _dialogBackground; + + public SolidColorBrush DialogBackground + { + get { return _dialogBackground; } + + set + { + if (!Equals(_dialogBackground, value)) + { + _dialogBackground = value; + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(DialogBackground))); + } + } + } + public event PropertyChangedEventHandler PropertyChanged; public AddDownloadTaskPage() @@ -94,6 +112,15 @@ public AddDownloadTaskPage() DownloadFolderText = DownloadService.DownloadFolder; RequestedTheme = (ElementTheme)Enum.Parse(typeof(ElementTheme), ThemeService.AppTheme.Value.ToString()); IsPrimaryButtonEnabled = !string.IsNullOrEmpty(DownloadLinkText) && !string.IsNullOrEmpty(DownloadFolderText); + SetBackground(ActualTheme); + } + + /// + /// 应用主题发生变化时修改对话框的背景色 + /// + private void OnActualThemeChanged(FrameworkElement sender, object args) + { + SetBackground(ActualTheme); } /// @@ -201,5 +228,17 @@ private void OnCloseClicked(object sender, RoutedEventArgs args) { AddDownloadTaskWindow.Current?.Close(); } + + private void SetBackground(ElementTheme elementTheme) + { + if (elementTheme is ElementTheme.Light) + { + DialogBackground = new SolidColorBrush(Color.FromArgb(255, 255, 255, 255)); + } + else if (elementTheme is ElementTheme.Dark) + { + DialogBackground = new SolidColorBrush(Color.FromArgb(255, 43, 43, 43)); + } + } } } diff --git a/WindowsTools/WindowsTools.csproj b/WindowsTools/WindowsTools.csproj index 8c7bd06..84f6b15 100644 --- a/WindowsTools/WindowsTools.csproj +++ b/WindowsTools/WindowsTools.csproj @@ -19,7 +19,7 @@ win7-x86;win10-x86;win10-x64;win10-arm64 WindowsTools.Program net481 - 10.0.19041.0 + 10.0.22621.0 10.0.22621.0 true true diff --git a/WindowsTools/app.manifest b/WindowsTools/app.manifest index 09b396a..902a06e 100644 --- a/WindowsTools/app.manifest +++ b/WindowsTools/app.manifest @@ -22,10 +22,8 @@ - - - +