diff --git a/.gitignore b/.gitignore index e5593a24..9e870ea9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,6 @@ .vs/ -src/Snap.Hutao/SettingsUI/bin -src/Snap.Hutao/SettingsUI/obj - src/Snap.Hutao/Snap.Hutao/bin/ src/Snap.Hutao/Snap.Hutao/obj/ src/Snap.Hutao/Snap.Hutao/Snap.Hutao_TemporaryKey.pfx diff --git a/README.md b/README.md index 2bad66cc..bf7b4077 100644 --- a/README.md +++ b/README.md @@ -28,4 +28,5 @@ * [microsoft/vs-threading](https://github.com/microsoft/vs-threading) * [microsoft/vs-validation](https://github.com/microsoft/vs-validation) * [microsoft/WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK) -* [microsoft/microsoft-ui-xaml](https://github.com/microsoft/microsoft-ui-xaml) \ No newline at end of file +* [microsoft/microsoft-ui-xaml](https://github.com/microsoft/microsoft-ui-xaml) +* [WinUICommunity/SettingsUI](https://github.com/WinUICommunity/SettingsUI) \ No newline at end of file diff --git a/src/Snap.Hutao/SettingsUI/Controls/CheckBoxWithDescriptionControl.cs b/src/Snap.Hutao/SettingsUI/Controls/CheckBoxWithDescriptionControl.cs deleted file mode 100644 index ffb07ab2..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/CheckBoxWithDescriptionControl.cs +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Automation; -using Microsoft.UI.Xaml.Controls; -using System.ComponentModel; - -namespace SettingsUI.Controls; - -public class CheckBoxWithDescriptionControl : CheckBox -{ - private readonly CheckBoxWithDescriptionControl _checkBoxSubTextControl; - - public CheckBoxWithDescriptionControl() - { - _checkBoxSubTextControl = this; - Loaded += CheckBoxSubTextControl_Loaded; - } - - protected override void OnApplyTemplate() - { - Update(); - base.OnApplyTemplate(); - } - - private void Update() - { - if (!string.IsNullOrEmpty(Header)) - { - AutomationProperties.SetName(this, Header); - } - } - - private void CheckBoxSubTextControl_Loaded(object sender, RoutedEventArgs e) - { - StackPanel panel = new() { Orientation = Orientation.Vertical }; - - // Add text box only if the description is not empty. Required for additional plugin options. - if (!string.IsNullOrWhiteSpace(Description)) - { - panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 10, 0, 0), Text = Header }); - //Style = (Style)Application.Current.Resources["SecondaryIsEnabledTextBlockStyle"] - panel.Children.Add(new IsEnabledTextBlock() { Text = Description }); - } - else - { - panel.Children.Add(new TextBlock() { Margin = new Thickness(0, 0, 0, 0), Text = Header }); - } - - _checkBoxSubTextControl.Content = panel; - } - - public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register( - "Header", - typeof(string), - typeof(CheckBoxWithDescriptionControl), - new PropertyMetadata(default(string))); - - public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register( - "Description", - typeof(object), - typeof(CheckBoxWithDescriptionControl), - new PropertyMetadata(default(string))); - - [Localizable(true)] - public string Header - { - get => (string)GetValue(HeaderProperty); - set => SetValue(HeaderProperty, value); - } - - [Localizable(true)] - public string Description - { - get => (string)GetValue(DescriptionProperty); - set => SetValue(DescriptionProperty, value); - } -} diff --git a/src/Snap.Hutao/SettingsUI/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs b/src/Snap.Hutao/SettingsUI/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs deleted file mode 100644 index 22353c88..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/IsEnabledTextBlock/IsEnabledTextBlock.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using System.ComponentModel; - -namespace SettingsUI.Controls; - -[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")] -[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")] -public class IsEnabledTextBlock : Control -{ - public IsEnabledTextBlock() - { - DefaultStyleKey = typeof(IsEnabledTextBlock); - } - - protected override void OnApplyTemplate() - { - IsEnabledChanged -= IsEnabledTextBlock_IsEnabledChanged; - SetEnabledState(); - IsEnabledChanged += IsEnabledTextBlock_IsEnabledChanged; - base.OnApplyTemplate(); - } - - public static readonly DependencyProperty TextProperty = DependencyProperty.Register( - "Text", - typeof(string), - typeof(IsEnabledTextBlock), - null); - - [Localizable(true)] - public string Text - { - get => (string)GetValue(TextProperty); - set => SetValue(TextProperty, value); - } - - private void IsEnabledTextBlock_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) - { - SetEnabledState(); - } - - private void SetEnabledState() - { - VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true); - } -} diff --git a/src/Snap.Hutao/SettingsUI/Controls/IsEnabledTextBlock/IsEnabledTextBlock.xaml b/src/Snap.Hutao/SettingsUI/Controls/IsEnabledTextBlock/IsEnabledTextBlock.xaml deleted file mode 100644 index afe84941..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/IsEnabledTextBlock/IsEnabledTextBlock.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/src/Snap.Hutao/SettingsUI/Controls/Setting/Setting.cs b/src/Snap.Hutao/SettingsUI/Controls/Setting/Setting.cs deleted file mode 100644 index b7dc9b2a..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/Setting/Setting.cs +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Automation; -using Microsoft.UI.Xaml.Controls; -using System.ComponentModel; - -namespace SettingsUI.Controls; - -[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")] -[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")] -[TemplatePart(Name = PartIconPresenter, Type = typeof(ContentPresenter))] -[TemplatePart(Name = PartDescriptionPresenter, Type = typeof(ContentPresenter))] -public class Setting : ContentControl -{ - private const string PartIconPresenter = "IconPresenter"; - private const string PartDescriptionPresenter = "DescriptionPresenter"; - private ContentPresenter? _iconPresenter; - private ContentPresenter? _descriptionPresenter; - private Setting? _setting; - - public Setting() - { - DefaultStyleKey = typeof(Setting); - } - - public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register( - "Header", - typeof(string), - typeof(Setting), - new PropertyMetadata(default(string), OnHeaderChanged)); - - public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register( - "Description", - typeof(object), - typeof(Setting), - new PropertyMetadata(null, OnDescriptionChanged)); - - public static readonly DependencyProperty IconProperty = DependencyProperty.Register( - "Icon", - typeof(object), - typeof(Setting), - new PropertyMetadata(default(string), OnIconChanged)); - - public static readonly DependencyProperty ActionContentProperty = DependencyProperty.Register( - "ActionContent", - typeof(object), - typeof(Setting), - null); - - [Localizable(true)] - public string Header - { - get => (string)GetValue(HeaderProperty); - set => SetValue(HeaderProperty, value); - } - - [Localizable(true)] - public object Description - { - get => GetValue(DescriptionProperty); - set => SetValue(DescriptionProperty, value); - } - - public object Icon - { - get => GetValue(IconProperty); - set => SetValue(IconProperty, value); - } - - public object ActionContent - { - get => GetValue(ActionContentProperty); - set => SetValue(ActionContentProperty, value); - } - - protected override void OnApplyTemplate() - { - IsEnabledChanged -= Setting_IsEnabledChanged; - _setting = this; - _iconPresenter = (ContentPresenter)_setting.GetTemplateChild(PartIconPresenter); - _descriptionPresenter = (ContentPresenter)_setting.GetTemplateChild(PartDescriptionPresenter); - Update(); - SetEnabledState(); - IsEnabledChanged += Setting_IsEnabledChanged; - base.OnApplyTemplate(); - } - - private static void OnHeaderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ((Setting)d).Update(); - } - - private static void OnIconChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ((Setting)d).Update(); - } - - private static void OnDescriptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ((Setting)d).Update(); - } - - private void Setting_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) - { - SetEnabledState(); - } - - private void SetEnabledState() - { - VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true); - } - - private void Update() - { - if (_setting == null) - { - return; - } - - if (_setting.ActionContent != null) - { - if (_setting.ActionContent.GetType() != typeof(Button)) - { - // We do not want to override the default AutomationProperties.Name of a button. Its Content property already describes what it does. - if (!string.IsNullOrEmpty(_setting.Header)) - { - AutomationProperties.SetName((UIElement)_setting.ActionContent, _setting.Header); - } - } - } - - if (_setting._iconPresenter != null) - { - if (_setting.Icon == null) - { - _setting._iconPresenter.Visibility = Visibility.Collapsed; - } - else - { - _setting._iconPresenter.Visibility = Visibility.Visible; - } - } - - if (_setting.Description == null) - { - _setting._descriptionPresenter!.Visibility = Visibility.Collapsed; - } - else - { - _setting._descriptionPresenter!.Visibility = Visibility.Visible; - } - } -} diff --git a/src/Snap.Hutao/SettingsUI/Controls/Setting/Setting.xaml b/src/Snap.Hutao/SettingsUI/Controls/Setting/Setting.xaml deleted file mode 100644 index d147bc5f..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/Setting/Setting.xaml +++ /dev/null @@ -1,107 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Snap.Hutao/SettingsUI/Controls/SettingExpander/SettingExpander.cs b/src/Snap.Hutao/SettingsUI/Controls/SettingExpander/SettingExpander.cs deleted file mode 100644 index 1be39ff1..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/SettingExpander/SettingExpander.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Automation; -using Microsoft.UI.Xaml.Controls; - -namespace SettingsUI.Controls; - -public partial class SettingExpander : Expander -{ - public SettingExpander() - { - DefaultStyleKey = typeof(Expander); - Style = (Style)Application.Current.Resources["SettingExpanderStyle"]; - RegisterPropertyChangedCallback(Expander.HeaderProperty, OnHeaderChanged); - } - - private static void OnHeaderChanged(DependencyObject d, DependencyProperty dp) - { - SettingExpander self = (SettingExpander)d; - if (self.Header != null) - { - if (self.Header.GetType() == typeof(Setting)) - { - Setting selfSetting = (Setting)self.Header; - selfSetting.Style = (Style)Application.Current.Resources["ExpanderHeaderSettingStyle"]; - - if (!string.IsNullOrEmpty(selfSetting.Header)) - { - AutomationProperties.SetName(self, selfSetting.Header); - } - } - } - } -} diff --git a/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroup.cs b/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroup.cs deleted file mode 100644 index 378bd905..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroup.cs +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Automation.Peers; -using Microsoft.UI.Xaml.Controls; -using System.ComponentModel; - -namespace SettingsUI.Controls; - -/// -/// Represents a control that can contain multiple settings (or other) controls -/// -[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")] -[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")] -[TemplatePart(Name = PartDescriptionPresenter, Type = typeof(ContentPresenter))] -public partial class SettingsGroup : ItemsControl -{ - private const string PartDescriptionPresenter = "DescriptionPresenter"; - private ContentPresenter? _descriptionPresenter; - private SettingsGroup? _settingsGroup; - - public SettingsGroup() - { - DefaultStyleKey = typeof(SettingsGroup); - } - - [Localizable(true)] - public string Header - { - get => (string)GetValue(HeaderProperty); - set => SetValue(HeaderProperty, value); - } - - public static readonly DependencyProperty HeaderProperty = DependencyProperty.Register( - "Header", - typeof(string), - typeof(SettingsGroup), - new PropertyMetadata(default(string))); - - [Localizable(true)] - public object Description - { - get => GetValue(DescriptionProperty); - set => SetValue(DescriptionProperty, value); - } - - public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register( - "Description", - typeof(object), - typeof(SettingsGroup), - new PropertyMetadata(null, OnDescriptionChanged)); - - protected override void OnApplyTemplate() - { - IsEnabledChanged -= SettingsGroup_IsEnabledChanged; - _settingsGroup = this; - _descriptionPresenter = (ContentPresenter)_settingsGroup.GetTemplateChild(PartDescriptionPresenter); - SetEnabledState(); - IsEnabledChanged += SettingsGroup_IsEnabledChanged; - base.OnApplyTemplate(); - } - - private static void OnDescriptionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) - { - ((SettingsGroup)d).Update(); - } - - private void SettingsGroup_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) - { - SetEnabledState(); - } - - private void SetEnabledState() - { - VisualStateManager.GoToState(this, IsEnabled ? "Normal" : "Disabled", true); - } - - private void Update() - { - if (_settingsGroup == null) - { - return; - } - - if (_settingsGroup.Description == null) - { - _settingsGroup._descriptionPresenter!.Visibility = Visibility.Collapsed; - } - else - { - _settingsGroup._descriptionPresenter!.Visibility = Visibility.Visible; - } - } - - protected override AutomationPeer OnCreateAutomationPeer() - { - return new SettingsGroupAutomationPeer(this); - } -} diff --git a/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroup.xaml b/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroup.xaml deleted file mode 100644 index 4c9fbe6b..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroup.xaml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroupAutomationPeer.cs b/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroupAutomationPeer.cs deleted file mode 100644 index 53c74065..00000000 --- a/src/Snap.Hutao/SettingsUI/Controls/SettingsGroup/SettingsGroupAutomationPeer.cs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation -// The Microsoft Corporation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -using Microsoft.UI.Xaml.Automation.Peers; - -namespace SettingsUI.Controls; - -public class SettingsGroupAutomationPeer : FrameworkElementAutomationPeer -{ - public SettingsGroupAutomationPeer(SettingsGroup owner) - : base(owner) - { - } - - protected override string GetNameCore() - { - SettingsGroup? selectedSettingsGroup = (SettingsGroup)Owner; - return selectedSettingsGroup.Header; - } -} diff --git a/src/Snap.Hutao/SettingsUI/SettingsUI.csproj b/src/Snap.Hutao/SettingsUI/SettingsUI.csproj deleted file mode 100644 index be16117b..00000000 --- a/src/Snap.Hutao/SettingsUI/SettingsUI.csproj +++ /dev/null @@ -1,50 +0,0 @@ - - - net7.0-windows10.0.18362.0 - 10.0.18362.0 - SettingsUI - x64 - win10-x64 - true - latest - enable - true - - - - - - - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - MSBuild:Compile - - - diff --git a/src/Snap.Hutao/SettingsUI/Styles/Button.xaml b/src/Snap.Hutao/SettingsUI/Styles/Button.xaml deleted file mode 100644 index bd4b6554..00000000 --- a/src/Snap.Hutao/SettingsUI/Styles/Button.xaml +++ /dev/null @@ -1,700 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Snap.Hutao/SettingsUI/Styles/Common.xaml b/src/Snap.Hutao/SettingsUI/Styles/Common.xaml deleted file mode 100644 index 213563f3..00000000 --- a/src/Snap.Hutao/SettingsUI/Styles/Common.xaml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - 12 - - diff --git a/src/Snap.Hutao/SettingsUI/Themes/Colors.xaml b/src/Snap.Hutao/SettingsUI/Themes/Colors.xaml deleted file mode 100644 index 808a85a0..00000000 --- a/src/Snap.Hutao/SettingsUI/Themes/Colors.xaml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - #FF5fb2f2 - 1 - - - - - - - - #FF0063b1 - 1 - - - - - - - - #FF5fb2f2 - 2 - - - diff --git a/src/Snap.Hutao/SettingsUI/Themes/Generic.xaml b/src/Snap.Hutao/SettingsUI/Themes/Generic.xaml deleted file mode 100644 index 9e744ea9..00000000 --- a/src/Snap.Hutao/SettingsUI/Themes/Generic.xaml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/src/Snap.Hutao/SettingsUI/Themes/SettingsExpanderStyles.xaml b/src/Snap.Hutao/SettingsUI/Themes/SettingsExpanderStyles.xaml deleted file mode 100644 index 37a88e72..00000000 --- a/src/Snap.Hutao/SettingsUI/Themes/SettingsExpanderStyles.xaml +++ /dev/null @@ -1,48 +0,0 @@ - - - - 0 - 56, 8, 40, 8 - - Transparent - - - - - - 0,0,8,0 - - - - - - - - - diff --git a/src/Snap.Hutao/SettingsUI/Themes/SettingsUI.xaml b/src/Snap.Hutao/SettingsUI/Themes/SettingsUI.xaml deleted file mode 100644 index 7a6282bb..00000000 --- a/src/Snap.Hutao/SettingsUI/Themes/SettingsUI.xaml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - 240 - diff --git a/src/Snap.Hutao/Snap.Hutao.sln b/src/Snap.Hutao/Snap.Hutao.sln index 1353fa07..b6918dc5 100644 --- a/src/Snap.Hutao/Snap.Hutao.sln +++ b/src/Snap.Hutao/Snap.Hutao.sln @@ -10,8 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution .editorconfig = .editorconfig EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SettingsUI", "SettingsUI\SettingsUI.csproj", "{DCA5678C-896E-49FB-97A7-5A504A5CFF17}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snap.Hutao.SourceGeneration", "Snap.Hutao.SourceGeneration\Snap.Hutao.SourceGeneration.csproj", "{8B96721E-5604-47D2-9B72-06FEBAD0CE00}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Snap.Hutao.Installer", "Snap.Hutao.Installer\Snap.Hutao.Installer.csproj", "{CEC01691-F65E-4874-9AE2-F571369A7631}" @@ -52,22 +50,6 @@ Global {AAAB7CF0-F299-49B8-BDB4-4C320B3EC2C7}.Release|x86.ActiveCfg = Release|x86 {AAAB7CF0-F299-49B8-BDB4-4C320B3EC2C7}.Release|x86.Build.0 = Release|x86 {AAAB7CF0-F299-49B8-BDB4-4C320B3EC2C7}.Release|x86.Deploy.0 = Release|x86 - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|Any CPU.Build.0 = Debug|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|arm64.ActiveCfg = Debug|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|arm64.Build.0 = Debug|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|x64.ActiveCfg = Debug|x64 - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|x64.Build.0 = Debug|x64 - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|x86.ActiveCfg = Debug|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Debug|x86.Build.0 = Debug|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|Any CPU.ActiveCfg = Release|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|Any CPU.Build.0 = Release|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|arm64.ActiveCfg = Release|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|arm64.Build.0 = Release|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|x64.ActiveCfg = Release|x64 - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|x64.Build.0 = Release|x64 - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|x86.ActiveCfg = Release|Any CPU - {DCA5678C-896E-49FB-97A7-5A504A5CFF17}.Release|x86.Build.0 = Release|Any CPU {8B96721E-5604-47D2-9B72-06FEBAD0CE00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8B96721E-5604-47D2-9B72-06FEBAD0CE00}.Debug|Any CPU.Build.0 = Debug|Any CPU {8B96721E-5604-47D2-9B72-06FEBAD0CE00}.Debug|arm64.ActiveCfg = Debug|Any CPU diff --git a/src/Snap.Hutao/Snap.Hutao/App.xaml b/src/Snap.Hutao/Snap.Hutao/App.xaml index 2eca2557..75145202 100644 --- a/src/Snap.Hutao/Snap.Hutao/App.xaml +++ b/src/Snap.Hutao/Snap.Hutao/App.xaml @@ -10,7 +10,7 @@ - + @@ -71,6 +71,17 @@ + + - - - + + + @@ -22,9 +22,9 @@ - - - + + + @@ -32,14 +32,14 @@ - - + - - + + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Dialog/DailyNoteNotificationDialog.xaml b/src/Snap.Hutao/Snap.Hutao/View/Dialog/DailyNoteNotificationDialog.xaml index 513bbf32..c87ce660 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Dialog/DailyNoteNotificationDialog.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Dialog/DailyNoteNotificationDialog.xaml @@ -4,8 +4,8 @@ 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" - xmlns:sc="using:SettingsUI.Controls" xmlns:shme="using:Snap.Hutao.Model.Entity" + xmlns:wsc="using:WinUICommunity.SettingsUI.Controls" Title="设置实时便笺通知" d:DataContext="{d:DesignInstance shme:DailyNoteEntry}" DefaultButton="Primary" @@ -13,34 +13,34 @@ Style="{StaticResource DefaultContentDialogStyle}" mc:Ignorable="d"> - - + + - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/src/Snap.Hutao/Snap.Hutao/View/Dialog/GachaLogRefreshProgressDialog.xaml b/src/Snap.Hutao/Snap.Hutao/View/Dialog/GachaLogRefreshProgressDialog.xaml index 82d8b8cc..8016b197 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Dialog/GachaLogRefreshProgressDialog.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Dialog/GachaLogRefreshProgressDialog.xaml @@ -3,7 +3,6 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cwucont="using:CommunityToolkit.WinUI.UI.Controls" - xmlns:cwuconv="using:CommunityToolkit.WinUI.UI.Converters" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:shvc="using:Snap.Hutao.View.Control" @@ -12,7 +11,6 @@ mc:Ignorable="d"> - - - + - - + - - + + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml index f404cced..8d373f56 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/AvatarPropertyPage.xaml @@ -8,7 +8,6 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mxi="using:Microsoft.Xaml.Interactivity" - xmlns:sc="using:SettingsUI.Controls" xmlns:shc="using:Snap.Hutao.Control" xmlns:shcb="using:Snap.Hutao.Control.Behavior" xmlns:shci="using:Snap.Hutao.Control.Image" @@ -17,6 +16,7 @@ xmlns:shct="using:Snap.Hutao.Control.Text" xmlns:shv="using:Snap.Hutao.ViewModel" xmlns:shvcont="using:Snap.Hutao.View.Control" + xmlns:wsc="using:WinUICommunity.SettingsUI.Controls" d:DataContext="{d:DesignInstance shv:AvatarPropertyViewModel}" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" mc:Ignorable="d"> @@ -240,18 +240,18 @@ - - - + - + - - + - - + + @@ -429,7 +429,7 @@ - - + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml index aea974b4..0ee77a01 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml @@ -8,12 +8,12 @@ xmlns:mxi="using:Microsoft.Xaml.Interactivity" xmlns:mxic="using:Microsoft.Xaml.Interactions.Core" xmlns:mxim="using:Microsoft.Xaml.Interactions.Media" - xmlns:sc="using:SettingsUI.Controls" xmlns:shc="using:Snap.Hutao.Control" xmlns:shcb="using:Snap.Hutao.Control.Behavior" xmlns:shci="using:Snap.Hutao.Control.Image" xmlns:shcm="using:Snap.Hutao.Control.Markup" xmlns:shv="using:Snap.Hutao.ViewModel" + xmlns:wsc="using:WinUICommunity.SettingsUI.Controls" d:DataContext="{d:DesignInstance shv:DailyNoteViewModel}" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" mc:Ignorable="d"> @@ -105,8 +105,8 @@ - - + @@ -114,8 +114,8 @@ Margin="24,0,0,0" IsOn="{Binding IsReminderNotification, Mode=TwoWay}" Style="{StaticResource ToggleSwitchSettingStyle}"/> - - + + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml index eb1f51d6..204ffe55 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml @@ -6,13 +6,13 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mxi="using:Microsoft.Xaml.Interactivity" - xmlns:sc="using:SettingsUI.Controls" xmlns:shc="using:Snap.Hutao.Control" xmlns:shcb="using:Snap.Hutao.Control.Behavior" xmlns:shcm="using:Snap.Hutao.Control.Markup" xmlns:shmbh="using:Snap.Hutao.Model.Binding.Hutao" xmlns:shv="using:Snap.Hutao.ViewModel" xmlns:shvc="using:Snap.Hutao.View.Control" + xmlns:wsc="using:WinUICommunity.SettingsUI.Controls" d:DataContext="{d:DesignInstance shv:HutaoDatabaseViewModel}" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" mc:Ignorable="d"> @@ -70,13 +70,13 @@ - - - - - - - + + + + + + + - - + + - - - - + + + + diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml index a33e2da5..1c8a7e70 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/LaunchGamePage.xaml @@ -7,10 +7,10 @@ xmlns:mxi="using:Microsoft.Xaml.Interactivity" xmlns:mxic="using:Microsoft.Xaml.Interactions.Core" xmlns:mxim="using:Microsoft.Xaml.Interactions.Media" - xmlns:sc="using:SettingsUI.Controls" xmlns:shc="using:Snap.Hutao.Control" xmlns:shcb="using:Snap.Hutao.Control.Behavior" xmlns:shv="using:Snap.Hutao.ViewModel" + xmlns:wsc="using:WinUICommunity.SettingsUI.Controls" d:DataContext="{d:DesignInstance shv:LaunchGameViewModel}" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" mc:Ignorable="d"> @@ -47,25 +47,25 @@ - - + - + - - - - - + + + + - +