diff --git a/build/nuke_build/Build.cs b/build/nuke_build/Build.cs index fdbd97e24..11fb780a9 100644 --- a/build/nuke_build/Build.cs +++ b/build/nuke_build/Build.cs @@ -34,14 +34,15 @@ class Build : NukeBuild //readonly GitVersion MasterBuildVersion; - string VersionName => "Developer Preview 9"; - string NuGetVersionName => "preview-9"; + //string VersionName => "Developer Preview 9"; + string VersionName => "Customer Preview 1"; + string NuGetVersionName => "preview-10"; // we set these here, especially the time, so it's the same for all platforms in the single build const string BuildVersionMajor = "1"; const string BuildVersionMinor = "0"; - const string BuildVersionRevision = "2"; + const string BuildVersionRevision = "3"; const string BuildMajorMinorRevision = $"{BuildVersionMajor}.{BuildVersionMinor}.{BuildVersionRevision}"; //string BuildDateNumber = DateTime.Now.ToString("yy") + DateTime.Now.DayOfYear.ToString("000"); // YYddd where ddd is the day number for the year @@ -776,20 +777,11 @@ void UpdateSetupBundleInfoIncludeFile(string platform) { string solutionDir = MidiSettingsSolutionFolder.ToString() + @"\"; - string rid = platform.ToLower() == "arm64" ? "win-arm64" : "win-x64"; - - - //var msbuildProperties = new Dictionary(); - //msbuildProperties.Add("Platform", platform); - //msbuildProperties.Add("SolutionDir", solutionDir); // to include trailing slash - //msbuildProperties.Add("RuntimeIdentifier", rid); - ////msbuildProperties.Add("NoWarn", "MSB3271"); // winmd and dll platform mismatch with Arm64EC - - //Console.Out.WriteLine($"----------------------------------------------------------------------"); - //Console.Out.WriteLine($"Solution: {solution}"); - //Console.Out.WriteLine($"SolutionDir: {solutionDir}"); - //Console.Out.WriteLine($"Platform: {platform}"); - //Console.Out.WriteLine($"RID: {rid}"); + // + // TEMP! The MIDI Settings app is x64 right now due to conflict with WinUI Ro Detours with Arm64 + // + //string rid = platform.ToLower() == "arm64" ? "win-arm64" : "win-x64"; + string rid = "win-x64"; DotNetTasks.DotNetBuild(_ => _ @@ -802,17 +794,6 @@ void UpdateSetupBundleInfoIncludeFile(string platform) .AddNoWarns(8618) // ignore CS8618 which I have no control over because it's in projection assemblies ); - // This just doesn't work. Even in Visual Studio, publishing the WinAppSdk app just fails for "unknown" reasons. - //DotNetTasks.DotNetPublish(_ => _ - // .SetProjectFile(MidiSettingsSolutionFolder / "Microsoft.Midi.Settings.csproj" / "Microsoft.Midi.Settings.csproj") - // .SetConfiguration(Configuration.Release) - // .SetPublishSingleFile(false) - // .SetPublishTrimmed(false) - // .SetSelfContained(false) - // .SetRuntime(rid) - //); - // folder is bin\rid\publish\ - var settingsOutputFolder = MidiSettingsSolutionFolder / "Microsoft.Midi.Settings" / "bin" / Configuration.Release / "net8.0-windows10.0.22621.0" / rid; var stagingFolder = MidiSettingsStagingFolder / platform; @@ -824,9 +805,7 @@ void UpdateSetupBundleInfoIncludeFile(string platform) var msftExtensionsFiles = Globbing.GlobFiles(settingsOutputFolder, "Microsoft.Extensions*.dll"); var midiSdkFiles = Globbing.GlobFiles( settingsOutputFolder, - "Microsoft.Windows.Devices.Midi2.Initialization.dll", - /* "Microsoft.Windows.Devices.Midi2.Initialization.winmd", */ - "Microsoft.Windows.Devices.Midi2.Initialization.pri" + "Microsoft.Windows.Devices.Midi2.NetProjection.dll" ); List paths = new List(toolkitFiles.Count + msftExtensionsFiles.Count + midiSdkFiles.Count + 40); @@ -839,7 +818,7 @@ void UpdateSetupBundleInfoIncludeFile(string platform) paths.Add(settingsOutputFolder / "MidiSettings.exe"); paths.Add(settingsOutputFolder / "MidiSettings.dll"); - //paths.Add(settingsOutputFolder / "MidiSettings.exe.manifest"); + paths.Add(settingsOutputFolder / "MidiSettings.exe.manifest"); paths.Add(settingsOutputFolder / "MidiSettings.deps.json"); paths.Add(settingsOutputFolder / "MidiSettings.runtimeconfig.json"); @@ -858,12 +837,14 @@ void UpdateSetupBundleInfoIncludeFile(string platform) paths.Add(settingsOutputFolder / "Newtonsoft.Json.dll"); - //paths.Add(settingsOutputFolder / "System.CodeDom.dll"); + paths.Add(settingsOutputFolder / "System.CodeDom.dll"); paths.Add(settingsOutputFolder / "System.Diagnostics.EventLog.dll"); paths.Add(settingsOutputFolder / "System.Diagnostics.EventLog.Messages.dll"); paths.Add(settingsOutputFolder / "System.Management.dll"); paths.Add(settingsOutputFolder / "System.ServiceProcess.ServiceController.dll"); + paths.Add(settingsOutputFolder / "System.Text.Json.dll"); + paths.Add(settingsOutputFolder / "Microsoft.Web.WebView2.Core.dll"); paths.Add(settingsOutputFolder / "Microsoft.Web.WebView2.Core.Projection.dll"); paths.Add(settingsOutputFolder / "WebView2Loader.dll"); diff --git a/build/staging/version/BundleInfo.wxi b/build/staging/version/BundleInfo.wxi index ad340fe80..3b3759798 100644 --- a/build/staging/version/BundleInfo.wxi +++ b/build/staging/version/BundleInfo.wxi @@ -1,4 +1,4 @@ - - + + diff --git a/build/staging/version/WindowsMidiServicesVersion.cs b/build/staging/version/WindowsMidiServicesVersion.cs index 7b0d23345..73e660e28 100644 --- a/build/staging/version/WindowsMidiServicesVersion.cs +++ b/build/staging/version/WindowsMidiServicesVersion.cs @@ -5,13 +5,13 @@ namespace Microsoft.Midi.Common public static class MidiBuildInformation { public const string Source = "GitHub Preview"; - public const string Name = "Developer Preview 9"; - public const string BuildFullVersion = "1.0.2-preview-9.250121-1820"; + public const string Name = "Customer Preview 1"; + public const string BuildFullVersion = "1.0.3-preview-10.250204-1909"; public const string VersionMajor = "1"; public const string VersionMinor = "0"; - public const string VersionRevision = "2"; - public const string VersionDateNumber = "250121"; - public const string VersionTimeNumber = "1820"; + public const string VersionRevision = "3"; + public const string VersionDateNumber = "250204"; + public const string VersionTimeNumber = "1909"; } } diff --git a/build/staging/version/WindowsMidiServicesVersion.h b/build/staging/version/WindowsMidiServicesVersion.h index 9c2627144..7d4acb962 100644 --- a/build/staging/version/WindowsMidiServicesVersion.h +++ b/build/staging/version/WindowsMidiServicesVersion.h @@ -4,13 +4,13 @@ #define WINDOWS_MIDI_SERVICES_VERSION_INCLUDE #define WINDOWS_MIDI_SERVICES_BUILD_SOURCE L"GitHub Preview" -#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_NAME L"Developer Preview 9" -#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.2-preview-9.250121-1820" +#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_NAME L"Customer Preview 1" +#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.3-preview-10.250204-1909" #define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MAJOR L"1" #define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MINOR L"0" -#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_REVISION L"2" -#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"250121" -#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"1820" +#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_REVISION L"3" +#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"250204" +#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"1909" #endif diff --git a/docs/console/endpoints.md b/docs/console/endpoints.md index 5d8381fb0..504b4369f 100644 --- a/docs/console/endpoints.md +++ b/docs/console/endpoints.md @@ -10,12 +10,16 @@ There are a number of commands, including those for monitoring and sending messa In most any command which takes an Endpoint Device Id as a parameter, that parameter is optional. If you leave it out, and the command operates on a single endpoint, you will be prompted with a menu of available endpoints to work with. +![midi endpoint prompt](midi-endpoint-prompt.png) + If you want to script the commands without requiring any user interaction, provide the endpoint device ID as the first parameter after the `endpoint` command. For example: ``` midi endpoint \\?\SWD#MIDISRV#MIDIU_DIAG_LOOPBACK_B#{e7cce071-3c03-423f-88d3-f1045d02552b} properties --verbose ``` +![midi endpoint help](midi-endpoint-help.png) + ## Get Detailed Endpoint Properties In the Device Manager in Windows, you can only see a subset of properties for a device. The same goes with the `pnputil` utility. It can be useful to see all of the key properties of a MIDI Endpoint. Therefore, we've baked property reporting right into the MIDI Services Console. @@ -52,6 +56,8 @@ Verbose mode: midi endpoint monitor --verbose ``` +![midi endpoint monitor verbose](midi-endpoint-monitor-verbose.png) + ### Saving messages to a file When monitoring, you also have the option to save the messages to a file. This can be used to capture test data which you will send using the `send-message-file` command, or for storing something like a System Exclusive dump. @@ -190,6 +196,20 @@ F3345678h 12345678h 86754321h 86753099h # bunch of empty lines above. And the file ends with a comment ``` +## Easily play MIDI 1.0 or MIDI 2.0 Notes + +To make it easy to send notes to an endpoint, the play-notes command accepts parameters including the note number and other information, and generates the appropriate channel voice messages at the appropriate times. The `--forever` switch has the messaging sending loop forever, making it useful for testing devices. + +``` +midi endpoint play-notes 50 55 52 60 72 90 --group 1 --channel 10 --velocity 100 --length 250 --rest 500 --forever +``` + +The parameters are all described when you type `midi endpoint play-notes --help` + +This is not meant to be a sequencer with the kind of timing accuracy you would have in a DAW, but is instead a simple way to play notes on an endpoint. + +![Play Notes](midi-endpoint-play-notes.png) + ## Sending Endpoint Metadata Requests The MIDI Services Console also makes it possible to send some common stream request messages without having to remember their exact format. diff --git a/docs/console/midi-console.md b/docs/console/midi-console.md index b67962ebe..e61f76301 100644 --- a/docs/console/midi-console.md +++ b/docs/console/midi-console.md @@ -10,7 +10,7 @@ If you have the midi console installed, you can invoke it from any command promp ## Where to Get it -While in developer preview, the Windows MIDI Services console is delivered as part of the developer preview installer. In the future, it will be delivered and serviced through the Microsoft Store on Windows +The Windows MIDI Services console is delivered as part of the SDK Runtime and Tools installer. While in preview, this is available on our [GitHub releases page](https://aka.ms/midireleases). ## General Information @@ -18,7 +18,7 @@ While in developer preview, the Windows MIDI Services console is delivered as pa MIDI Console commands are words with no symbol prefix. For example `endpoint` or `send-message-file`. Options are prefixed with two dashes if you use the full word, or a single dash if you use the single-letter abbreviation. For example `--help` or `-h`. There is no statement completion built in to the console, but there are some supported abbreviations for commands. These are not yet fully documented but are present in the Program.cs in the console source code. -### "Ports" vs "Streams" +### "Ports" vs "Endpoints" In MIDI 1.0, specifically USB MIDI 1.0, a connected device would have a single input and single output stream. Inside that stream are packets of data with virtual cable numbers. Those numbers (16 total at most) identify the "port" the data is going to. Operating systems would then translate those into input and output ports. Those cable numbers were hidden from users. @@ -34,7 +34,7 @@ If you want to see the MIDI clock we're using for timestamps and message schedul midi time midi clock ``` -![MIDI Clock Command](./midi-clock.png) +![MIDI Clock Command](midi-clock.png) ## Technical Information diff --git a/docs/console/midi-endpoint-help.png b/docs/console/midi-endpoint-help.png new file mode 100644 index 000000000..edb5499c6 Binary files /dev/null and b/docs/console/midi-endpoint-help.png differ diff --git a/docs/console/midi-endpoint-monitor-verbose.png b/docs/console/midi-endpoint-monitor-verbose.png new file mode 100644 index 000000000..84514bc21 Binary files /dev/null and b/docs/console/midi-endpoint-monitor-verbose.png differ diff --git a/docs/console/midi-endpoint-play-notes.png b/docs/console/midi-endpoint-play-notes.png new file mode 100644 index 000000000..13a351d75 Binary files /dev/null and b/docs/console/midi-endpoint-play-notes.png differ diff --git a/docs/console/midi-endpoint-prompt.png b/docs/console/midi-endpoint-prompt.png new file mode 100644 index 000000000..a5d768908 Binary files /dev/null and b/docs/console/midi-endpoint-prompt.png differ diff --git a/samples/cpp-winrt/basics/client-basics-cpp.vcxproj b/samples/cpp-winrt/basics/client-basics-cpp.vcxproj index 09708f0dd..feb1b771e 100644 --- a/samples/cpp-winrt/basics/client-basics-cpp.vcxproj +++ b/samples/cpp-winrt/basics/client-basics-cpp.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true false diff --git a/samples/cpp-winrt/basics/packages.config b/samples/cpp-winrt/basics/packages.config index 712dd7091..3e1e875ca 100644 --- a/samples/cpp-winrt/basics/packages.config +++ b/samples/cpp-winrt/basics/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj b/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj index f60216292..1ba714532 100644 --- a/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj +++ b/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/samples/cpp-winrt/loopback-endpoints/packages.config b/samples/cpp-winrt/loopback-endpoints/packages.config index 712dd7091..3e1e875ca 100644 --- a/samples/cpp-winrt/loopback-endpoints/packages.config +++ b/samples/cpp-winrt/loopback-endpoints/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/samples/cpp-winrt/send-speed/packages.config b/samples/cpp-winrt/send-speed/packages.config index 712dd7091..3e1e875ca 100644 --- a/samples/cpp-winrt/send-speed/packages.config +++ b/samples/cpp-winrt/send-speed/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj b/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj index 36e4a8ef1..a93d9b9f8 100644 --- a/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj +++ b/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/samples/cpp-winrt/simple-app-to-app-midi/packages.config b/samples/cpp-winrt/simple-app-to-app-midi/packages.config index 712dd7091..3e1e875ca 100644 --- a/samples/cpp-winrt/simple-app-to-app-midi/packages.config +++ b/samples/cpp-winrt/simple-app-to-app-midi/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj b/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj index df679f33e..0974380c9 100644 --- a/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj +++ b/samples/cpp-winrt/simple-app-to-app-midi/simple-app-to-app-cpp.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/samples/cpp-winrt/static-enum-endpoints/packages.config b/samples/cpp-winrt/static-enum-endpoints/packages.config index 712dd7091..3e1e875ca 100644 --- a/samples/cpp-winrt/static-enum-endpoints/packages.config +++ b/samples/cpp-winrt/static-enum-endpoints/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj b/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj index c7cd501f1..5108b5e83 100644 --- a/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj +++ b/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/samples/cpp-winrt/watch-endpoints/packages.config b/samples/cpp-winrt/watch-endpoints/packages.config index 712dd7091..3e1e875ca 100644 --- a/samples/cpp-winrt/watch-endpoints/packages.config +++ b/samples/cpp-winrt/watch-endpoints/packages.config @@ -1,5 +1,5 @@  - + \ No newline at end of file diff --git a/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj b/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj index 9802dc24d..d6c30c88d 100644 --- a/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj +++ b/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/src/api/Client/WinMM/wdmaud2.vcxproj b/src/api/Client/WinMM/wdmaud2.vcxproj index 5483de675..a94d1db75 100644 --- a/src/api/Client/WinMM/wdmaud2.vcxproj +++ b/src/api/Client/WinMM/wdmaud2.vcxproj @@ -193,7 +193,7 @@ Create pch.h stdcpp20 - %(AdditionalIncludeDirectories);$(SolutionDir)VSFiles\intermediate\idl\$(Platform)\$(Configuration);$(ProjectDir)\..\Inc;$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\MidiSrv\$(Platform)\$(Configuration);$(SolutionDir)VSFiles\intermediate\midi2.midisrvtransport\$(Platform)\$(Configuration) + %(AdditionalIncludeDirectories);$(SolutionDir)VSFiles\intermediate\idl\x64\$(Configuration);$(ProjectDir)\..\Inc;$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\MidiSrv\x64\$(Configuration);$(SolutionDir)VSFiles\intermediate\midi2.midisrvtransport\$(Platform)\$(Configuration) true @@ -263,7 +263,7 @@ Create pch.h stdcpp20 - %(AdditionalIncludeDirectories);$(SolutionDir)VSFiles\intermediate\idl\$(Platform)\$(Configuration);$(ProjectDir)\..\Inc;$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\MidiSrv\$(Platform)\$(Configuration);$(SolutionDir)VSFiles\intermediate\midi2.midisrvtransport\$(Platform)\$(Configuration) + %(AdditionalIncludeDirectories);$(SolutionDir)VSFiles\intermediate\idl\x64\$(Configuration);$(ProjectDir)\..\Inc;$(SolutionDir)inc;$(SolutionDir)VSFiles\intermediate\MidiSrv\x64\$(Configuration);$(SolutionDir)VSFiles\intermediate\midi2.midisrvtransport\$(Platform)\$(Configuration) true diff --git a/src/api/Midi2.sln b/src/api/Midi2.sln index 9c2889703..cc6bdf89b 100644 --- a/src/api/Midi2.sln +++ b/src/api/Midi2.sln @@ -12,6 +12,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Midi2.KSTransport", "Transp EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinMidi", "Drivers\MinMidi\Driver\Driver.vcxproj", "{0ACC44A8-A2AE-449C-AABA-64A75277C5BD}" + ProjectSection(ProjectDependencies) = postProject + {2480B077-46E5-42AE-9BDB-685AFF258529} = {2480B077-46E5-42AE-9BDB-685AFF258529} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Midi2.Driver.unittests", "Test\Midi2.Driver.unittests\Midi2.Driver.unittests.vcxproj", "{8EABA9B2-A718-4AA3-88F7-E264CF3CCC29}" ProjectSection(ProjectDependencies) = postProject @@ -137,10 +140,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Midi2.DiagnosticsTransport" EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinMidi2", "Drivers\MinMidi2\Driver\MinMidi2.vcxproj", "{2AD0622B-D47A-4CC1-9493-459730F442BE}" + ProjectSection(ProjectDependencies) = postProject + {2480B077-46E5-42AE-9BDB-685AFF258529} = {2480B077-46E5-42AE-9BDB-685AFF258529} + EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Message Transforms and Processing", "Message Transforms and Processing", "{23C1D0EF-10F0-464B-86C3-1FCD3F6BA20E}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBMidi2", "Drivers\USBMIDI2\Driver\USBMidi2.vcxproj", "{1B5A1991-AD62-494F-AE3A-1A681914898D}" + ProjectSection(ProjectDependencies) = postProject + {2480B077-46E5-42AE-9BDB-685AFF258529} = {2480B077-46E5-42AE-9BDB-685AFF258529} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Midi2.BS2UMPTransform", "Transform\ByteStreamToUMP\Midi2.BS2UMPTransform.vcxproj", "{206CEDBF-6343-4171-87A8-1DDDE6E2ED60}" ProjectSection(ProjectDependencies) = postProject @@ -183,12 +192,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Midi2.KSAggregateTransport" {00B066CB-3F9F-4B31-B30A-48631B07D157} = {00B066CB-3F9F-4B31-B30A-48631B07D157} {0E739771-0C0B-42EE-AADB-95E7E1E5A5ED} = {0E739771-0C0B-42EE-AADB-95E7E1E5A5ED} {0FB85768-237C-4A60-A824-E09884C3EB34} = {0FB85768-237C-4A60-A824-E09884C3EB34} + {2480B077-46E5-42AE-9BDB-685AFF258529} = {2480B077-46E5-42AE-9BDB-685AFF258529} {3BD492AD-A08C-4923-9486-138189CA4A0A} = {3BD492AD-A08C-4923-9486-138189CA4A0A} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wdmaud2", "Client\WinMM\wdmaud2.vcxproj", "{8D7E847B-AD56-4900-93A1-4F0E2EF7A4F9}" ProjectSection(ProjectDependencies) = postProject {02D828BE-2362-4733-B82E-DC3A511D6FEE} = {02D828BE-2362-4733-B82E-DC3A511D6FEE} + {2480B077-46E5-42AE-9BDB-685AFF258529} = {2480B077-46E5-42AE-9BDB-685AFF258529} {4F48735C-9364-462C-B207-2262D4E62589} = {4F48735C-9364-462C-B207-2262D4E62589} {9991FF5B-E0F0-4373-A7C2-20B1EFDE5F70} = {9991FF5B-E0F0-4373-A7C2-20B1EFDE5F70} {EFB7CF90-7DEF-44CF-868A-191CA30E0FCF} = {EFB7CF90-7DEF-44CF-868A-191CA30E0FCF} diff --git a/src/app-sdk/mididiag/mididiag.vcxproj b/src/app-sdk/mididiag/mididiag.vcxproj index a7d11a8ca..17683d003 100644 --- a/src/app-sdk/mididiag/mididiag.vcxproj +++ b/src/app-sdk/mididiag/mididiag.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/src/app-sdk/mididiag/packages.config b/src/app-sdk/mididiag/packages.config index 2c326a3a2..22fd91402 100644 --- a/src/app-sdk/mididiag/packages.config +++ b/src/app-sdk/mididiag/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj b/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj index 450d057a2..d068231b7 100644 --- a/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj +++ b/src/app-sdk/midimdnsinfo/midimdnsinfo.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/src/app-sdk/midimdnsinfo/packages.config b/src/app-sdk/midimdnsinfo/packages.config index 2c326a3a2..22fd91402 100644 --- a/src/app-sdk/midimdnsinfo/packages.config +++ b/src/app-sdk/midimdnsinfo/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj b/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj index 54d106e75..910c5fe92 100644 --- a/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj +++ b/src/app-sdk/midiusbinfo/midiusbinfo.vcxproj @@ -2,7 +2,7 @@ - Microsoft.Windows.Devices.Midi2.1.0.2-preview-9.250121-1820 + Microsoft.Windows.Devices.Midi2.1.0.3-preview-10.250204-1909 true true true diff --git a/src/app-sdk/midiusbinfo/packages.config b/src/app-sdk/midiusbinfo/packages.config index 2c326a3a2..22fd91402 100644 --- a/src/app-sdk/midiusbinfo/packages.config +++ b/src/app-sdk/midiusbinfo/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/src/app-sdk/sdk-runtime-installer/main-bundle/Bundle.wxs b/src/app-sdk/sdk-runtime-installer/main-bundle/Bundle.wxs index 3843de48a..a033b957d 100644 --- a/src/app-sdk/sdk-runtime-installer/main-bundle/Bundle.wxs +++ b/src/app-sdk/sdk-runtime-installer/main-bundle/Bundle.wxs @@ -75,9 +75,9 @@ Vital="true" Permanent="true" DisplayName="Microsoft .NET 8 Desktop Runtime" - SourceFile="$(DependenciesSourceRootFolder)\$(var.Platform)\windowsdesktop-runtime-8.0.11-win-$(var.Platform).exe" + SourceFile="$(DependenciesSourceRootFolder)\$(var.Platform)\windowsdesktop-runtime-8.0.12-win-$(var.Platform).exe" Compressed="yes" - DetectCondition="DotNetDesktopRuntimeVersion >= v8.0.11" + DetectCondition="DotNetDesktopRuntimeVersion >= v8.0.12" InstallArguments="/install /passive /norestart /log midi_dotnet8_install_log.txt" UninstallArguments="/uninstall /passive /norestart /quiet" /> diff --git a/src/app-sdk/sdk-runtime-installer/settings-package/_SetupFiles.wxs b/src/app-sdk/sdk-runtime-installer/settings-package/_SetupFiles.wxs index 2b3f34ab8..5f46c258b 100644 --- a/src/app-sdk/sdk-runtime-installer/settings-package/_SetupFiles.wxs +++ b/src/app-sdk/sdk-runtime-installer/settings-package/_SetupFiles.wxs @@ -43,8 +43,10 @@ + + @@ -53,10 +55,12 @@ + + diff --git a/src/user-tools/midi-console/Midi/Midi.csproj b/src/user-tools/midi-console/Midi/Midi.csproj index c2fcb58d3..4b807cb67 100644 --- a/src/user-tools/midi-console/Midi/Midi.csproj +++ b/src/user-tools/midi-console/Midi/Midi.csproj @@ -8,7 +8,7 @@ midi Microsoft.Midi.ConsoleApp - x64, arm64 + x64, ARM64 False false diff --git a/src/user-tools/midi-console/midi-console.sln b/src/user-tools/midi-console/midi-console.sln index 69f005c15..939dffed7 100644 --- a/src/user-tools/midi-console/midi-console.sln +++ b/src/user-tools/midi-console/midi-console.sln @@ -9,58 +9,28 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Devices.Midi2.Too EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Debug|ARM = Debug|ARM Debug|ARM64 = Debug|ARM64 Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU - Release|ARM = Release|ARM Release|ARM64 = Release|ARM64 Release|x64 = Release|x64 - Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|Any CPU.ActiveCfg = Debug|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|Any CPU.Build.0 = Debug|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|ARM.ActiveCfg = Debug|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|ARM.Build.0 = Debug|x64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|ARM64.ActiveCfg = Debug|ARM64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|ARM64.Build.0 = Debug|ARM64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|x64.ActiveCfg = Debug|x64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|x64.Build.0 = Debug|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|x86.ActiveCfg = Debug|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Debug|x86.Build.0 = Debug|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|Any CPU.ActiveCfg = Release|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|Any CPU.Build.0 = Release|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|ARM.ActiveCfg = Release|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|ARM.Build.0 = Release|x64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|ARM64.ActiveCfg = Release|ARM64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|ARM64.Build.0 = Release|ARM64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|x64.ActiveCfg = Release|x64 {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|x64.Build.0 = Release|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|x86.ActiveCfg = Release|x64 - {2EC5F5EE-BA4F-4D9C-90A8-4E18A08A6CD7}.Release|x86.Build.0 = Release|x64 - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|ARM.ActiveCfg = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|ARM.Build.0 = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|ARM64.Build.0 = Debug|Any CPU + {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|ARM64.Build.0 = Debug|ARM64 {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|x64.ActiveCfg = Debug|x64 {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|x64.Build.0 = Debug|x64 - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|x86.ActiveCfg = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Debug|x86.Build.0 = Debug|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|Any CPU.Build.0 = Release|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|ARM.ActiveCfg = Release|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|ARM.Build.0 = Release|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|ARM64.ActiveCfg = Release|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|ARM64.Build.0 = Release|Any CPU + {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|ARM64.ActiveCfg = Release|ARM64 + {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|ARM64.Build.0 = Release|ARM64 {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|x64.ActiveCfg = Release|x64 {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|x64.Build.0 = Release|x64 - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|x86.ActiveCfg = Release|Any CPU - {1830A525-42BF-4568-9F4B-A192671CB16F}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings.Core/Microsoft.Midi.Settings.Core.csproj b/src/user-tools/midi-settings/Microsoft.Midi.Settings.Core/Microsoft.Midi.Settings.Core.csproj index 33ccbb225..c97918a04 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings.Core/Microsoft.Midi.Settings.Core.csproj +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings.Core/Microsoft.Midi.Settings.Core.csproj @@ -4,8 +4,7 @@ 10.0.22621.0 10.0.20348.0 Microsoft.Midi.Settings.Core - AnyCPU;x64;x86 - x86;x64;arm64;AnyCPU + x64;ARM64 enable diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml index 3b864afd7..22ae3ca62 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml @@ -11,6 +11,7 @@ + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs index 76a2ddd53..a161d543a 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/App.xaml.cs @@ -10,6 +10,7 @@ using Microsoft.Midi.Settings.ViewModels; using Microsoft.Midi.Settings.Views; using Microsoft.UI.Xaml; +using Windows.UI.Popups; namespace Microsoft.Midi.Settings; @@ -86,8 +87,28 @@ public App() services.AddTransient(); services.AddTransient(); - services.AddTransient(); - services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + + services.AddTransient(); + services.AddTransient(); + services.AddTransient(); services.AddTransient(); @@ -141,13 +162,19 @@ private void App_UnhandledException(object sender, Microsoft.UI.Xaml.UnhandledEx App.GetService().LogError(e.Message); } + private MidiDesktopAppSdkInitializer? _midiInitializer = null; + + public MidiDesktopAppSdkInitializer? MidiInitializer => _midiInitializer; + protected async override void OnLaunched(LaunchActivatedEventArgs args) { base.OnLaunched(args); - await App.GetService().ActivateAsync(args); + // initialize the SDK + if (AppState.Current.Initialize()) + { + await App.GetService().ActivateAsync(args); - // force construction - var current = AppState.Current; + } } } diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointAndGroupPickerControl.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointAndGroupPickerControl.xaml new file mode 100644 index 000000000..a4797386c --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointAndGroupPickerControl.xaml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointAndGroupPickerControl.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointAndGroupPickerControl.xaml.cs new file mode 100644 index 000000000..ab08cd42e --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointAndGroupPickerControl.xaml.cs @@ -0,0 +1,186 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using System.Collections.ObjectModel; +using CommunityToolkit.Mvvm.ComponentModel; +using System.Xml.Linq; +using Microsoft.UI.Xaml.Documents; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Microsoft.Midi.Settings.Controls +{ + // this contains everything including function block names etc. + public class MidiGroupForDisplay + { + public uint GroupNumberForDisplay = 0; + public List BlockNames = []; + + public override string ToString() + { + if (GroupNumberForDisplay == 0) + { + return "Invalid Group"; + } + + if (BlockNames.Count == 1) + { + return MidiGroup.LongLabel + " " + GroupNumberForDisplay + " (" + BlockNames[0] + ")"; + } + else if (BlockNames.Count > 1) + { + string name = string.Empty; + + foreach (string blockName in BlockNames) + { + if (name != string.Empty) + { + name += ", "; + } + + name += blockName; + } + + name = MidiGroup.LongLabelPlural + " " + GroupNumberForDisplay + " (" + name + ")"; + + return name; + } + else + { + return MidiGroup.LongLabel + " " + GroupNumberForDisplay; + } + } + } + + [ObservableObject] + public sealed partial class MidiEndpointAndGroupPickerControl : UserControl + { + [ObservableProperty] + public ObservableCollection? endpoints; + + private MidiEndpointDeviceInformation? _selectedEndpoint = null; + public MidiEndpointDeviceInformation? SelectedEndpoint + { + get { return _selectedEndpoint; } + set + { + SetProperty(ref _selectedEndpoint, value); + + RebuildGroupList(); + } + } + + [ObservableProperty] + public MidiGroupForDisplay? selectedGroup; + + [ObservableProperty] + public bool showMessageDestinationGroups; + + [ObservableProperty] + public bool showMessageSourceGroups; + + public ObservableCollection Groups { get; } = []; + + public MidiEndpointAndGroupPickerControl() + { + showMessageDestinationGroups = true; + showMessageSourceGroups = true; + + this.InitializeComponent(); + } + + private void RebuildGroupList() + { + if (_selectedEndpoint == null) + { + Groups.Clear(); + return; + } + + Dictionary groupsForDisplay = []; + + var functionBlocks = _selectedEndpoint.GetDeclaredFunctionBlocks(); + + // do we have function blocks? If so, use them + if (functionBlocks != null && functionBlocks.Count > 0) + { + // todo: filter by direction + } + else + { + var groupBlocks = _selectedEndpoint.GetGroupTerminalBlocks(); + + // no function blocks. Do we have group terminal blocks? + if (groupBlocks != null && groupBlocks.Count > 0) + { + // todo: filter by direction, and also need to handle bidi + + foreach (var block in groupBlocks) + { + if ((block.Direction == MidiGroupTerminalBlockDirection.Bidirectional) || + (block.Direction == MidiGroupTerminalBlockDirection.BlockInput && ShowMessageDestinationGroups) || + (block.Direction == MidiGroupTerminalBlockDirection.BlockOutput && ShowMessageSourceGroups)) + { + for (var groupNumber = block.FirstGroup.DisplayValue; groupNumber < block.FirstGroup.DisplayValue + block.GroupCount; groupNumber++) + { + if (!groupsForDisplay.ContainsKey(groupNumber)) + { + groupsForDisplay[groupNumber] = new MidiGroupForDisplay(); + groupsForDisplay[groupNumber].GroupNumberForDisplay = groupNumber; + groupsForDisplay[groupNumber].BlockNames.Add(block.Name); + } + + } + } + } + } + else + { + // if no function blocks or group terminal blocks, show all 16 in and 16 out + + for (uint groupNumber = 1; groupNumber <= 16; groupNumber++) + { + groupsForDisplay[groupNumber] = new MidiGroupForDisplay(); + + if (ShowMessageDestinationGroups) + { + groupsForDisplay[groupNumber].BlockNames.Add("Output"); + } + + if (ShowMessageSourceGroups) + { + groupsForDisplay[groupNumber].BlockNames.Add("Input"); + } + } + } + } + + + Groups.Clear(); + foreach (var display in groupsForDisplay.Values) + { + Groups.Add(display); + } + + if (Groups.Count > 0) + { + SelectedGroup = Groups[0]; + } + + } + + + } +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml new file mode 100644 index 000000000..32f576f9c --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml.cs new file mode 100644 index 000000000..3d35f894a --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Controls/MidiEndpointDeviceListItemControl.xaml.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.Midi.Settings.ViewModels; +using CommunityToolkit.WinUI.Controls; +using System.Windows.Input; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Microsoft.Midi.Settings.Controls +{ + public sealed partial class MidiEndpointDeviceListItemControl : UserControl + { + bool _initialized = false; + + public MidiEndpointDeviceListItemControl() + { + //DataContext = this; + + //if (_endpointItem != null) + //{ + this.InitializeComponent(); + // _initialized = true; + //} + } + + private ICommand? _viewDeviceDetailsCommand = null; + public ICommand? ViewDeviceDetailsCommand + { + get { return _viewDeviceDetailsCommand; } + set + { + _viewDeviceDetailsCommand = value; + + RootSettingsCard.Command = ViewDeviceDetailsCommand; + } + } + + + private MidiEndpointDeviceListItem? _endpointItem = null; + public MidiEndpointDeviceListItem? EndpointItem + { + get { return _endpointItem; } + set + { + if (value != null) + { + _endpointItem = value; + } + } + } + + + // work around WinUI binding bug + private void EndpointSettingsCard_Loaded(object sender, RoutedEventArgs e) + { + ((SettingsCard)sender).Command = ViewDeviceDetailsCommand; + } + + } +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiFunctionBlockDirectionConverter.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiFunctionBlockDirectionConverter.cs index 291b53feb..ae44916f1 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiFunctionBlockDirectionConverter.cs +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiFunctionBlockDirectionConverter.cs @@ -30,6 +30,9 @@ public object Convert(object value, Type targetType, object parameter, string la case MidiFunctionBlockDirection.BlockOutput: return "Message Source"; + case MidiFunctionBlockDirection.Bidirectional: + return "Message Source and Destination"; + default: return "Unknown"; } diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiGroupTerminalBlockDirectionConverter.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiGroupTerminalBlockDirectionConverter.cs new file mode 100644 index 000000000..ded7cd1b3 --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiGroupTerminalBlockDirectionConverter.cs @@ -0,0 +1,53 @@ +using Microsoft.UI.Xaml.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.Midi.Settings.Helpers +{ + public partial class MidiGroupTerminalBlockDirectionConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, string language) + { + if (value is null) + { + return string.Empty; + } + + if (value is MidiGroupTerminalBlockDirection) + { + var val = (MidiGroupTerminalBlockDirection)value; + + // TODO: Localize + + switch (val) + { + case MidiGroupTerminalBlockDirection.BlockInput: + return "Message Destination"; + + case MidiGroupTerminalBlockDirection.BlockOutput: + return "Message Source"; + + case MidiGroupTerminalBlockDirection.Bidirectional: + return "Message Source and Destination"; + + default: + return "Unknown"; + } + } + else + { + return string.Empty; + } + + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); + } + } + +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiGroupTerminalBlockDirectionToFontIconConverter.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiGroupTerminalBlockDirectionToFontIconConverter.cs new file mode 100644 index 000000000..cba0faba7 --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Helpers/MidiGroupTerminalBlockDirectionToFontIconConverter.cs @@ -0,0 +1,56 @@ +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microsoft.Midi.Settings.Helpers +{ + public partial class MidiGroupTerminalBlockDirectionToFontIconConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, string language) + { + if (value is null) + { + return string.Empty; + } + + if (value is MidiGroupTerminalBlockDirection) + { + var val = (MidiGroupTerminalBlockDirection)value; + + // TODO: Localize + + + + switch (val) + { + case MidiGroupTerminalBlockDirection.BlockInput: + return "\ue898"; + + case MidiGroupTerminalBlockDirection.BlockOutput: + return "\ue896"; + + case MidiGroupTerminalBlockDirection.Bidirectional: + return "\ue8ab"; + + default: + return "\ue711"; + } + } + else + { + return string.Empty; + } + + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + throw new NotImplementedException(); + } + } + +} 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 d893a4d42..c4bcae7d2 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 @@ -11,7 +11,7 @@ Assets/AppIcon.ico MidiSettings.exe.manifest - x64;arm64 + x64;ARM64 win10-x64;win10-arm64 enable false @@ -67,10 +67,18 @@ + + + + + + + + @@ -135,6 +143,12 @@ + + MSBuild:Compile + + + MSBuild:Compile + PreserveNewest @@ -153,6 +167,27 @@ Never + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + + + MSBuild:Compile + $(DefaultXamlRuntime) diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/MidiSettings.exe.manifest b/src/user-tools/midi-settings/Microsoft.Midi.Settings/MidiSettings.exe.manifest index 2da4ccb7a..f4a5bff09 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/MidiSettings.exe.manifest +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/MidiSettings.exe.manifest @@ -17,146 +17,5 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs index ecd4523a6..22c820224 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Models/AppState.cs @@ -6,6 +6,7 @@ using System.Resources; using System.Text; using System.Threading.Tasks; +using Windows.UI.Popups; namespace Microsoft.Midi.Settings.Models; @@ -18,32 +19,45 @@ public class AppState private static AppState? _current; + private MidiDesktopAppSdkInitializer? _initializer; + private AppState() { - var initializer = Microsoft.Windows.Devices.Midi2.Initialization.MidiDesktopAppSdkInitializer.Create(); - if (initializer == null) + } + + public bool Initialize() + { + _initializer = Microsoft.Windows.Devices.Midi2.Initialization.MidiDesktopAppSdkInitializer.Create(); + + if (_initializer == null) { // TODO: Failed - return; + return false; } - // initialize SDK runtime - if (!initializer.InitializeSdkRuntime()) + if (!_initializer!.InitializeSdkRuntime()) { - // TODO: Failed - return; + // TODO: Localize these messages + var dialog = new MessageDialog("Unable to initialize the Windows MIDI Services SDK runtime. Is it installed? Exiting."); + dialog.ShowAsync().Wait(); + + return false; } - // start the service - if (!initializer.EnsureServiceAvailable()) + if (!_initializer!.EnsureServiceAvailable()) { - // TODO: Failed - return; + // TODO: Localize these messages + var dialog = new MessageDialog("The Windows MIDI Services SDK is installed, but we failed to start the service. Exiting."); + dialog.ShowAsync().Wait(); + + return false; } StartDeviceWatcher(true); + + return true; } public static AppState Current @@ -67,6 +81,23 @@ public string GetCurrentSetupFileName() return val; } + public string GetInstalledSdkVersionString() + { + string val = "Unable to query SDK version"; + + if (_initializer != null) + { + val = _initializer.GetInstalledSdkDescription(true, true, true); + } + + return val; + } + + public Uri GetMidiSdkInstallerUri() + { + return new Uri(MidiDesktopAppSdkInitializer.LatestMidiAppSdkDownloadUrl); + } + public MidiEndpointDeviceWatcher MidiEndpointDeviceWatcher { @@ -77,6 +108,9 @@ public MidiEndpointDeviceWatcher MidiEndpointDeviceWatcher } + + + private void StartDeviceWatcher(bool includeAll) { if (_watcher != null) diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppPage.xaml new file mode 100644 index 000000000..01e827163 --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppPage.xaml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppPage.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppPage.xaml.cs new file mode 100644 index 000000000..712f827bc --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppPage.xaml.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.Midi.Settings.Contracts.Services; +using Microsoft.Midi.Settings.Controls; +using Microsoft.Midi.Settings.ViewModels; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Microsoft.Midi.Settings.Views +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class EndpointsAppPage : Page + { + private ILoggingService _loggingService; + + + public EndpointsAppViewModel ViewModel + { + get; + } + + + public EndpointsAppPage() + { + ViewModel = App.GetService(); + _loggingService = App.GetService(); + + Loaded += DevicesPage_Loaded; + + InitializeComponent(); + } + + private void DevicesPage_Loaded(object sender, RoutedEventArgs e) + { + ViewModel.DispatcherQueue = this.DispatcherQueue; + + ViewModel.RefreshDeviceCollection(); + } + + + // work around WinUI binding bug + private void MidiEndpointDeviceListItemControl_Loaded(object sender, RoutedEventArgs e) + { + ((MidiEndpointDeviceListItemControl)sender).ViewDeviceDetailsCommand = ViewModel.ViewDeviceDetailsCommand; + } + } +} + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppViewModel.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppViewModel.cs new file mode 100644 index 000000000..06d221271 --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/APP/EndpointsAppViewModel.cs @@ -0,0 +1,25 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Microsoft.Midi.Settings.Contracts.Services; +using Microsoft.Midi.Settings.Contracts.ViewModels; +using Microsoft.Midi.Settings.Models; +using Microsoft.Midi.Settings.Services; +using Microsoft.UI.Dispatching; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace Microsoft.Midi.Settings.ViewModels +{ + public partial class EndpointsAppViewModel : SingleTransportEndpointViewModelBase, INavigationAware + { + public EndpointsAppViewModel(INavigationService navigationService) : base("APP", navigationService) + { + } + + } +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllPage.xaml new file mode 100644 index 000000000..2e8c9082c --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllPage.xaml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllPage.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllPage.xaml.cs new file mode 100644 index 000000000..3cf156e1f --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllPage.xaml.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using CommunityToolkit.WinUI.Controls; +using Microsoft.Midi.Settings.Contracts.Services; +using Microsoft.Midi.Settings.ViewModels; +using Microsoft.Midi.Settings.Controls; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Microsoft.Midi.Settings.Views +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class EndpointsAllPage : Page + { + private ILoggingService _loggingService; + + + public EndpointsAllViewModel ViewModel + { + get; + } + + + public EndpointsAllPage() + { + ViewModel = App.GetService(); + _loggingService = App.GetService(); + + Loaded += DevicesPage_Loaded; + + InitializeComponent(); + } + + private void DevicesPage_Loaded(object sender, RoutedEventArgs e) + { + ViewModel.DispatcherQueue = this.DispatcherQueue; + + ViewModel.RefreshDeviceCollection(); + } + + + // work around WinUI binding bug + private void MidiEndpointDeviceListItemControl_Loaded(object sender, RoutedEventArgs e) + { + ((MidiEndpointDeviceListItemControl)sender).ViewDeviceDetailsCommand = ViewModel.ViewDeviceDetailsCommand; + } + } +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllViewModel.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllViewModel.cs new file mode 100644 index 000000000..9f580308e --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/All/EndpointsAllViewModel.cs @@ -0,0 +1,132 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Microsoft.Midi.Settings.Contracts.Services; +using Microsoft.Midi.Settings.Contracts.ViewModels; +using Microsoft.Midi.Settings.Models; +using Microsoft.UI.Dispatching; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace Microsoft.Midi.Settings.ViewModels +{ + public class EndpointsAllViewModel : ObservableRecipient, INavigationAware + { + private readonly INavigationService _navigationService; + + public ICommand ViewDeviceDetailsCommand + { + get; private set; + } + + public DispatcherQueue? DispatcherQueue { get; set; } + + public EndpointsAllViewModel(INavigationService navigationService) + { + _navigationService = navigationService; + + ViewDeviceDetailsCommand = new RelayCommand( + (param) => + { + System.Diagnostics.Debug.WriteLine("View Device Details Command exec"); + + _navigationService.NavigateTo(typeof(DeviceDetailViewModel).FullName!, param); + + }); + } + + public ObservableCollection MidiEndpointDevicesByTransport { get; } = []; + + + public void RefreshDeviceCollection(bool showDiagnosticsEndpoints = false) + { + if (DispatcherQueue == null) return; + + DispatcherQueue.TryEnqueue(DispatcherQueuePriority.Normal, () => + { + System.Diagnostics.Debug.WriteLine("Begin RefreshDeviceCollection"); + + ObservableCollection tempCollection = []; + + // go through devices in AppState and group by parent + + // pre-populate with transports + + foreach (var transport in MidiReporting.GetInstalledTransportPlugins()) + { + var t = new MidiEndpointDevicesByTransport(transport); + + tempCollection.Add(t); + } + + // now get all the endpoint devices and put them in groups by transport + + var enumeratedDevices = AppState.Current.MidiEndpointDeviceWatcher.EnumeratedEndpointDevices; + + foreach (var endpointDevice in enumeratedDevices.Values) + { + if (endpointDevice != null) + { + // Get the transport + + var transportInfo = endpointDevice.GetTransportSuppliedInfo(); + var transportId = transportInfo.TransportId; + + var parentTransport = tempCollection.Where(x => x.Transport.Id == transportId).FirstOrDefault(); + + // add this device to the transport's collection + if (parentTransport != null) + { + parentTransport.EndpointDevices.Add(new MidiEndpointDeviceListItem(endpointDevice)); + } + } + } + + + // Only show relevant transports. Either they have children, or support + // creating a runtime through the settings application + + MidiEndpointDevicesByTransport.Clear(); + + foreach (var item in tempCollection.OrderBy(x => x.Transport.Name)) + { + // TODO: this is a hack. Probably shouldn't be using the transport code directly + // Instead, need a transport property for purpose like we have with endpoints + if (item.Transport.TransportCode == "DIAG") + { + if (showDiagnosticsEndpoints) + { + MidiEndpointDevicesByTransport.Add(item); + } + } + else if (item.EndpointDevices.Count > 0 || item.Transport.IsRuntimeCreatableBySettings) + { + MidiEndpointDevicesByTransport.Add(item); + } + } + + + System.Diagnostics.Debug.WriteLine("Completed RefreshDeviceCollection"); + + + + }); + + } + + + + public void OnNavigatedFrom() + { + } + + + public void OnNavigatedTo(object parameter) + { + } + } +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10Page.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10Page.xaml new file mode 100644 index 000000000..e9a7eebe0 --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10Page.xaml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10Page.xaml.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10Page.xaml.cs new file mode 100644 index 000000000..b4da8e9e7 --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10Page.xaml.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.Midi.Settings.Contracts.Services; +using Microsoft.Midi.Settings.Controls; +using Microsoft.Midi.Settings.ViewModels; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace Microsoft.Midi.Settings.Views +{ + /// + /// An empty page that can be used on its own or navigated to within a Frame. + /// + public sealed partial class EndpointsBle10Page : Page + { + private ILoggingService _loggingService; + + + public EndpointsBle10ViewModel ViewModel + { + get; + } + + + public EndpointsBle10Page() + { + ViewModel = App.GetService(); + _loggingService = App.GetService(); + + Loaded += DevicesPage_Loaded; + + InitializeComponent(); + } + + private void DevicesPage_Loaded(object sender, RoutedEventArgs e) + { + ViewModel.DispatcherQueue = this.DispatcherQueue; + + ViewModel.RefreshDeviceCollection(); + } + + + // work around WinUI binding bug + private void MidiEndpointDeviceListItemControl_Loaded(object sender, RoutedEventArgs e) + { + ((MidiEndpointDeviceListItemControl)sender).ViewDeviceDetailsCommand = ViewModel.ViewDeviceDetailsCommand; + } + } +} + diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10ViewModel.cs b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10ViewModel.cs new file mode 100644 index 000000000..df1fef36d --- /dev/null +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/BLE10/EndpointsBle10ViewModel.cs @@ -0,0 +1,24 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; +using Microsoft.Midi.Settings.Contracts.Services; +using Microsoft.Midi.Settings.Contracts.ViewModels; +using Microsoft.Midi.Settings.Models; +using Microsoft.UI.Dispatching; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Input; + +namespace Microsoft.Midi.Settings.ViewModels +{ + public partial class EndpointsBle10ViewModel : SingleTransportEndpointViewModelBase, INavigationAware + { + public EndpointsBle10ViewModel(INavigationService navigationService) : base("BLE10MS", navigationService) + { + } + + } +} diff --git a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/DeviceDetailPage.xaml b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml similarity index 70% rename from src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/DeviceDetailPage.xaml rename to src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml index f5c0ac49c..ba8daad60 100644 --- a/src/user-tools/midi-settings/Microsoft.Midi.Settings/Views/DeviceDetailPage.xaml +++ b/src/user-tools/midi-settings/Microsoft.Midi.Settings/Sections/Endpoints/DeviceDetailPage.xaml @@ -21,6 +21,10 @@ + + + + @@ -45,7 +49,11 @@ Style="{StaticResource PageHeaderStyleDeviceName}" /> - +