From 177dbba76727df58ea7baea052e7a114d7da9b80 Mon Sep 17 00:00:00 2001 From: Crostia Moore Date: Tue, 3 Mar 2026 21:46:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?###=20Fixed=20Issues=20/=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### 1. Missing `CommunityToolkit.WinUI.Controls.TitleBar` Package / 缺少 `CommunityToolkit.WinUI.Controls.TitleBar` 包 - **Issue / 问题**: The `TitleBar` control from CommunityToolkit was referenced but the package does not exist on NuGet / 引用了 CommunityToolkit 的 `TitleBar` 控件,但该包在 NuGet 上不存在 - **Solution / 解决方案**: Replaced the `controls:TitleBar` with a standard Grid layout in `ShellPage.xaml` / 在 `ShellPage.xaml` 中将 `controls:TitleBar` 替换为标准 Grid 布局 - **Files Modified / 修改的文件**: - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml` - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml.cs` #### 2. NU1510 Warnings - Redundant Package References / NU1510 警告 - 冗余的包引用 - **Issue / 问题**: `System.Text.Json` and `System.Text.RegularExpressions` are built-in to .NET 10 and should not be explicitly referenced / `System.Text.Json` 和 `System.Text.RegularExpressions` 是 .NET 10 的内置组件,不应显式引用 - **Solution / 解决方案**: Removed the explicit package references / 移除显式的包引用 - **Files Modified / 修改的文件**: - `Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj` #### 3. WMC1506 Warnings - OneWay Binding Notifications / WMC1506 警告 - OneWay 绑定通知 - **Issue / 问题**: OneWay bindings require properties to support change notifications, but the MIDI library types do not implement `INotifyPropertyChanged` / OneWay 绑定需要属性支持变更通知,但 MIDI 库类型未实现 `INotifyPropertyChanged` - **Solution / 解决方案**: Changed binding mode from `OneWay` to `OneTime` for read-only port information / 将只读端口信息的绑定模式从 `OneWay` 改为 `OneTime` - **Files Modified / 修改的文件**: - `Microsoft.Midi.Settings/Views/Endpoint Management Pages/EndpointsAllPage.xaml` --- src/user-tools/README.md | 47 ++- .../Microsoft.Midi.Settings.csproj | 19 +- .../Views/Core Pages/ShellPage.xaml | 292 ++++++++++-------- .../Views/Core Pages/ShellPage.xaml.cs | 2 +- .../EndpointsAllPage.xaml | 10 +- ...icrosoft.Devices.Midi2.Tools.Shared.csproj | 8 +- 6 files changed, 215 insertions(+), 163 deletions(-) diff --git a/src/user-tools/README.md b/src/user-tools/README.md index cdfeb2242..06a6f3539 100644 --- a/src/user-tools/README.md +++ b/src/user-tools/README.md @@ -1,8 +1,45 @@ -# Tools +# Tools / 工具 These are generally written in .NET (7 or 8) and provide end-user functionality outside of the DAW or other third-party tools. -| Component | Description | -| --------- | ----------- | -| midi-settings | The main MIDI Settings app for Windows | -| midi-settings-extensibility | Extensibility model (client plugin model) for the MIDI Settings app | +这些通常使用 .NET(7 或 8)编写,提供 DAW 或其他第三方工具之外的最终用户功能。 + +| Component | Description / 描述 | +| --------- | ------------------- | +| midi-settings | The main MIDI Settings app for Windows / Windows 的主要 MIDI 设置应用程序 | +| midi-settings-extensibility | Extensibility model (client plugin model) for the MIDI Settings app / MIDI 设置应用程序的扩展性模型(客户端插件模型) | + +--- + +## Build Notes / 构建说明 + +### Requirements / 要求 +- .NET 10 SDK +- Windows App SDK 1.8+ +- Windows SDK 10.0.26100.0 + +### Fixed Issues / 修复的问题 + +#### 1. Missing `CommunityToolkit.WinUI.Controls.TitleBar` Package / 缺少 `CommunityToolkit.WinUI.Controls.TitleBar` 包 +- **Issue / 问题**: The `TitleBar` control from CommunityToolkit was referenced but the package does not exist on NuGet / 引用了 CommunityToolkit 的 `TitleBar` 控件,但该包在 NuGet 上不存在 +- **Solution / 解决方案**: Replaced the `controls:TitleBar` with a standard Grid layout in `ShellPage.xaml` / 在 `ShellPage.xaml` 中将 `controls:TitleBar` 替换为标准 Grid 布局 +- **Files Modified / 修改的文件**: + - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml` + - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml.cs` + +#### 2. NU1510 Warnings - Redundant Package References / NU1510 警告 - 冗余的包引用 +- **Issue / 问题**: `System.Text.Json` and `System.Text.RegularExpressions` are built-in to .NET 10 and should not be explicitly referenced / `System.Text.Json` 和 `System.Text.RegularExpressions` 是 .NET 10 的内置组件,不应显式引用 +- **Solution / 解决方案**: Removed the explicit package references / 移除显式的包引用 +- **Files Modified / 修改的文件**: + - `Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj` + +#### 3. WMC1506 Warnings - OneWay Binding Notifications / WMC1506 警告 - OneWay 绑定通知 +- **Issue / 问题**: OneWay bindings require properties to support change notifications, but the MIDI library types do not implement `INotifyPropertyChanged` / OneWay 绑定需要属性支持变更通知,但 MIDI 库类型未实现 `INotifyPropertyChanged` +- **Solution / 解决方案**: Changed binding mode from `OneWay` to `OneTime` for read-only port information / 将只读端口信息的绑定模式从 `OneWay` 改为 `OneTime` +- **Files Modified / 修改的文件**: + - `Microsoft.Midi.Settings/Views/Endpoint Management Pages/EndpointsAllPage.xaml` + +### Build Output / 构建输出 +- **Executable / 可执行文件**: `MidiSettings.exe` +- **Output Directory / 输出目录**: `Microsoft.Midi.Settings/bin/x64/Release/net10.0-windows10.0.26100.0/` +- **Status / 状态**: Build successful with 0 warnings / 构建成功,0 个警告 diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj index 6bbf5047c..0e05d2cf5 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Microsoft.Midi.Settings.csproj @@ -1,4 +1,4 @@ - + WinExe net10.0-windows10.0.26100.0 @@ -107,7 +107,6 @@ - @@ -115,27 +114,25 @@ - - - + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - + + - + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml index e35583dd9..dac421ad8 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml @@ -74,149 +74,167 @@ + VerticalAlignment="Top" + Height="48" + Background="{StaticResource LayerFillColorDefaultBrush}"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + - - + + + - + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml.cs index a44b7f3fa..37da98e02 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml.cs +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml.cs @@ -33,7 +33,7 @@ public ShellPage(ShellViewModel viewModel) ViewModel = viewModel; InitializeComponent(); - AppTitleBarControl.Title = App.MainWindow.Title; + // TitleBar control removed - title is now set directly in XAML ViewModel.NavigationService.Frame = NavigationFrame; ViewModel.NavigationViewService.Initialize(NavigationViewControl); diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Endpoint Management Pages/EndpointsAllPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Endpoint Management Pages/EndpointsAllPage.xaml index b7a4fe91c..32c024fc4 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Endpoint Management Pages/EndpointsAllPage.xaml +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Endpoint Management Pages/EndpointsAllPage.xaml @@ -65,15 +65,15 @@ - - diff --git a/src/user-tools/shared/Microsoft.Devices.Midi2.Tools.Shared/Microsoft.Devices.Midi2.Tools.Shared.csproj b/src/user-tools/shared/Microsoft.Devices.Midi2.Tools.Shared/Microsoft.Devices.Midi2.Tools.Shared.csproj index becad5148..c4f51ae68 100644 --- a/src/user-tools/shared/Microsoft.Devices.Midi2.Tools.Shared/Microsoft.Devices.Midi2.Tools.Shared.csproj +++ b/src/user-tools/shared/Microsoft.Devices.Midi2.Tools.Shared/Microsoft.Devices.Midi2.Tools.Shared.csproj @@ -1,4 +1,4 @@ - + net10.0-windows10.0.26100.0 @@ -17,9 +17,9 @@ - - - + + + From 0624765b59d06cb817ab1902f346b2e31425a17e Mon Sep 17 00:00:00 2001 From: Crostia Moore Date: Tue, 3 Mar 2026 23:31:04 +0800 Subject: [PATCH 2/2] =?UTF-8?q?###=20UI=20Changes=20/=20UI=20=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### Settings Button in NavigationView / 导航视图中的设置按钮 - **Description / 描述**: Moved the Settings button from `PaneFooter` to `FooterMenuItems` for better navigation support and added bottom margin / 将设置按钮从 `PaneFooter` 移到 `FooterMenuItems` 以获得更好的导航支持,并添加底部边距 - **Files Modified / 修改的文件**: - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml` - `Microsoft.Midi.Settings/Strings/en-us/Resources.resw` #### Back Button Visibility / 返回按钮可见性 - **Description / 描述**: Set `NavigationView.IsBackButtonVisible="Collapsed"` and set the custom BackButton `Visibility="Collapsed"` to completely hide the back button / 设置 `NavigationView.IsBackButtonVisible="Collapsed"` 并将自定义 BackButton 的 `Visibility="Collapsed"` 以彻底隐藏返回按钮 - **Files Modified / 修改的文件**: - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml` --- src/user-tools/README.md | 17 ++++++++++++++++ .../Strings/en-us/Resources.Designer.cs | 2 +- .../Strings/en-us/Resources.resw | 3 +++ .../Views/Core Pages/ShellPage.xaml | 20 ++++++++++++++----- .../Views/Core Pages/ShellPage.xaml.cs | 3 ++- 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/user-tools/README.md b/src/user-tools/README.md index 06a6f3539..a8c7840a2 100644 --- a/src/user-tools/README.md +++ b/src/user-tools/README.md @@ -43,3 +43,20 @@ These are generally written in .NET (7 or 8) and provide end-user functionality - **Executable / 可执行文件**: `MidiSettings.exe` - **Output Directory / 输出目录**: `Microsoft.Midi.Settings/bin/x64/Release/net10.0-windows10.0.26100.0/` - **Status / 状态**: Build successful with 0 warnings / 构建成功,0 个警告 + +--- + +## Changes / 更改 + +### UI Changes / UI 更改 + +#### Settings Button in NavigationView / 导航视图中的设置按钮 +- **Description / 描述**: Moved the Settings button from `PaneFooter` to `FooterMenuItems` for better navigation support and added bottom margin / 将设置按钮从 `PaneFooter` 移到 `FooterMenuItems` 以获得更好的导航支持,并添加底部边距 +- **Files Modified / 修改的文件**: + - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml` + - `Microsoft.Midi.Settings/Strings/en-us/Resources.resw` + +#### Back Button Visibility / 返回按钮可见性 +- **Description / 描述**: Set `NavigationView.IsBackButtonVisible="Collapsed"` and set the custom BackButton `Visibility="Collapsed"` to completely hide the back button / 设置 `NavigationView.IsBackButtonVisible="Collapsed"` 并将自定义 BackButton 的 `Visibility="Collapsed"` 以彻底隐藏返回按钮 +- **Files Modified / 修改的文件**: + - `Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml` diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.Designer.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.Designer.cs index 8f2e23e26..7fb7b3fc5 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.Designer.cs +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw index 35bda9da8..f605d03eb 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Strings/en-us/Resources.resw @@ -288,6 +288,9 @@ Home + + Settings + Routing diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml index dac421ad8..c5a85db7e 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/Core Pages/ShellPage.xaml @@ -92,7 +92,7 @@ Height="48" VerticalAlignment="Center" HorizontalAlignment="Center" - Visibility="{x:Bind ViewModel.IsBackEnabled, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" + Visibility="Collapsed" Click="TitleBar_BackButtonClick"> @@ -107,7 +107,7 @@ - - + @@ -270,6 +270,16 @@ + + + + + + + +