Skip to content

Commit c00f9ec

Browse files
Restructuring
1 parent 8868cb6 commit c00f9ec

17 files changed

+89
-183
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,6 @@ MigrationBackup/
360360
.ionide/
361361

362362
# Fody - auto-generated XML schema
363-
FodyWeavers.xsd
363+
FodyWeavers.xsd
364+
365+
XamlIslands/FullTrustUWP/Core/*
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1.42 KB
Binary file not shown.
Binary file not shown.

VBAudioRouter.Package/Package.appxmanifest

-49
This file was deleted.

VBAudioRouter.Package/VBAudioRouter.Package.wapproj

-89
This file was deleted.

VBAudioRouter.UWP/App.xaml.vb

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
Imports System.Runtime.InteropServices
2-
Imports Microsoft.Toolkit.Win32.UI.XamlHost
1+
Imports Microsoft.Toolkit.Win32.UI.XamlHost
32
Imports VBAudioRouter.Dialogs
43
Imports VBAudioRouter.Utils
54
Imports Windows.UI

VBAudioRouter.sln

+28-32
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ VisualStudioVersion = 16.0.31424.327
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "VBAudioRouter.UWP", "VBAudioRouter.UWP\VBAudioRouter.UWP.vbproj", "{65472FE0-CAA5-4078-9155-3373AF4B692F}"
77
EndProject
8-
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "VBAudioRouter.Package", "VBAudioRouter.Package\VBAudioRouter.Package.wapproj", "{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VBAudioRouter.Host", "XamlIslands\VBAudioRouter.Host\VBAudioRouter.Host.csproj", "{AF8198C2-56B9-4F92-9931-0C4837936F95}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VBAudioRouter.Host", "VBAudioRouter.Host\VBAudioRouter.Host.csproj", "{AF8198C2-56B9-4F92-9931-0C4837936F95}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FullTrustUWP", "XamlIslands\FullTrustUWP\FullTrustUWP.csproj", "{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}"
11+
EndProject
12+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "XamlIslands", "XamlIslands", "{5D0108B8-5E39-4F7C-91DA-E72D7E16F826}"
1113
EndProject
1214
Global
1315
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -53,36 +55,6 @@ Global
5355
{65472FE0-CAA5-4078-9155-3373AF4B692F}.Release|x86.ActiveCfg = Release|x86
5456
{65472FE0-CAA5-4078-9155-3373AF4B692F}.Release|x86.Build.0 = Release|x86
5557
{65472FE0-CAA5-4078-9155-3373AF4B692F}.Release|x86.Deploy.0 = Release|x86
56-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
57-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
58-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
59-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|ARM.ActiveCfg = Debug|ARM
60-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|ARM.Build.0 = Debug|ARM
61-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|ARM.Deploy.0 = Debug|ARM
62-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|ARM64.ActiveCfg = Debug|ARM64
63-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|ARM64.Build.0 = Debug|ARM64
64-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|ARM64.Deploy.0 = Debug|ARM64
65-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|x64.ActiveCfg = Debug|x64
66-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|x64.Build.0 = Debug|x64
67-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|x64.Deploy.0 = Debug|x64
68-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|x86.ActiveCfg = Debug|x86
69-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|x86.Build.0 = Debug|x86
70-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Debug|x86.Deploy.0 = Debug|x86
71-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
72-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|Any CPU.Build.0 = Release|Any CPU
73-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|Any CPU.Deploy.0 = Release|Any CPU
74-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|ARM.ActiveCfg = Release|ARM
75-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|ARM.Build.0 = Release|ARM
76-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|ARM.Deploy.0 = Release|ARM
77-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|ARM64.ActiveCfg = Release|ARM64
78-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|ARM64.Build.0 = Release|ARM64
79-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|ARM64.Deploy.0 = Release|ARM64
80-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|x64.ActiveCfg = Release|x64
81-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|x64.Build.0 = Release|x64
82-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|x64.Deploy.0 = Release|x64
83-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|x86.ActiveCfg = Release|x86
84-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|x86.Build.0 = Release|x86
85-
{B5C5D13E-675B-4C34-BFBB-1125484CC5FD}.Release|x86.Deploy.0 = Release|x86
8658
{AF8198C2-56B9-4F92-9931-0C4837936F95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8759
{AF8198C2-56B9-4F92-9931-0C4837936F95}.Debug|Any CPU.Build.0 = Debug|Any CPU
8860
{AF8198C2-56B9-4F92-9931-0C4837936F95}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -103,10 +75,34 @@ Global
10375
{AF8198C2-56B9-4F92-9931-0C4837936F95}.Release|x64.Build.0 = Release|Any CPU
10476
{AF8198C2-56B9-4F92-9931-0C4837936F95}.Release|x86.ActiveCfg = Release|Any CPU
10577
{AF8198C2-56B9-4F92-9931-0C4837936F95}.Release|x86.Build.0 = Release|Any CPU
78+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
79+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|Any CPU.Build.0 = Debug|Any CPU
80+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|ARM.ActiveCfg = Debug|Any CPU
81+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|ARM.Build.0 = Debug|Any CPU
82+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|ARM64.ActiveCfg = Debug|Any CPU
83+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|ARM64.Build.0 = Debug|Any CPU
84+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|x64.ActiveCfg = Debug|Any CPU
85+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|x64.Build.0 = Debug|Any CPU
86+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|x86.ActiveCfg = Debug|Any CPU
87+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Debug|x86.Build.0 = Debug|Any CPU
88+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|Any CPU.ActiveCfg = Release|Any CPU
89+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|Any CPU.Build.0 = Release|Any CPU
90+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|ARM.ActiveCfg = Release|Any CPU
91+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|ARM.Build.0 = Release|Any CPU
92+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|ARM64.ActiveCfg = Release|Any CPU
93+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|ARM64.Build.0 = Release|Any CPU
94+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|x64.ActiveCfg = Release|Any CPU
95+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|x64.Build.0 = Release|Any CPU
96+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|x86.ActiveCfg = Release|Any CPU
97+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973}.Release|x86.Build.0 = Release|Any CPU
10698
EndGlobalSection
10799
GlobalSection(SolutionProperties) = preSolution
108100
HideSolutionNode = FALSE
109101
EndGlobalSection
102+
GlobalSection(NestedProjects) = preSolution
103+
{AF8198C2-56B9-4F92-9931-0C4837936F95} = {5D0108B8-5E39-4F7C-91DA-E72D7E16F826}
104+
{B5454F0B-98B7-4639-BDE4-0A0D1E0F5973} = {5D0108B8-5E39-4F7C-91DA-E72D7E16F826}
105+
EndGlobalSection
110106
GlobalSection(ExtensibilityGlobals) = postSolution
111107
SolutionGuid = {94079978-D490-48BD-8069-F095B27A6654}
112108
EndGlobalSection
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<UseWindowsForms>true</UseWindowsForms>
6+
<AssetTargetFallback>uap10.0.19041</AssetTargetFallback>
7+
<LangVersion>9</LangVersion>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<PackageReference Include="Microsoft.Toolkit.Forms.UI.XamlHost" Version="6.1.2" />
12+
</ItemGroup>
13+
14+
</Project>

VBAudioRouter.Host/Program.cs renamed to XamlIslands/FullTrustUWP/XamlHostApplication.cs

+19-9
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
1-
using Microsoft.Toolkit.Forms.UI.XamlHost;
1+
using Microsoft.Toolkit.Forms.UI.XamlHost;
2+
using Microsoft.Toolkit.Win32.UI.XamlHost;
23
using System;
34
using System.Drawing;
45
using System.Windows.Forms;
56
using Windows.UI.Xaml;
67
using Application = System.Windows.Forms.Application;
78

8-
namespace VBAudioRouter.Host
9+
namespace FullTrustUWP
910
{
10-
static class Program
11+
// https://github.com/CommunityToolkit/Microsoft.Toolkit.Win32/blob/master/Microsoft.Toolkit.Win32.UI.XamlApplication/XamlApplication.cpp
12+
13+
public class XamlHostApplication<TApp> where TApp : XamlApplication
1114
{
12-
[STAThread]
13-
static void Main()
15+
static XamlHostApplication()
1416
{
17+
try
18+
{
19+
Application.SetCompatibleTextRenderingDefault(false);
20+
}
21+
catch { }
1522
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
1623
Application.EnableVisualStyles();
17-
Application.SetCompatibleTextRenderingDefault(false);
24+
}
25+
26+
public static void Run<T>() where T : UIElement => Run<T>(new());
1827

19-
XamlWindow<WelcomePage> window = new();
28+
public static void Run<T>(XamlWindow<T> window) where T : UIElement
29+
{
2030
window.Show();
21-
using (new App())
31+
using (TApp app = Activator.CreateInstance<TApp>())
2232
{
2333
window.InitializeXamlContent();
2434
Application.Run(window);
2535
}
2636
}
2737
}
2838

29-
class XamlWindow<T> : Form where T : UIElement
39+
public class XamlWindow<T> : Form where T : UIElement
3040
{
3141
public WindowsXamlHost XamlHost { get; private set; }
3242
public void InitializeXamlContent()
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using FullTrustUWP;
2+
using System;
3+
4+
namespace VBAudioRouter.Host
5+
{
6+
static class Program
7+
{
8+
[STAThread]
9+
static void Main()
10+
{
11+
XamlHostApplication<App>.Run<WelcomePage>();
12+
}
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"profiles": {
3+
"XamlIslands (VBAudioRouter.Host)": {
4+
"commandName": "Project",
5+
"nativeDebugging": true
6+
}
7+
}
8+
}

VBAudioRouter.Host/VBAudioRouter.Host.csproj renamed to XamlIslands/VBAudioRouter.Host/VBAudioRouter.Host.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<ProjectReference Include="..\VBAudioRouter.UWP\VBAudioRouter.UWP.vbproj" />
17+
<ProjectReference Include="..\FullTrustUWP\FullTrustUWP.csproj" />
18+
<ProjectReference Include="..\..\VBAudioRouter.UWP\VBAudioRouter.UWP.vbproj" />
1819
</ItemGroup>
1920

2021
</Project>

0 commit comments

Comments
 (0)