launcher: rewrite as native WPF, drop PhotinoNET/WebView2

Initial v0.1 (commit df9dac0) used PhotinoNET wrapping WebView2 + HTML/JS,
but rendered as a blank window on first run — WebView2 + file:// URI
quirks. Switching to native WPF: built into the .NET 9 Windows SDK
(no NuGet), single-file self-contained publish, instant window open.

All Backend/*.cs orchestration logic carried over unchanged (they're
UI-framework-agnostic). Replaced:
- Program.cs (PhotinoNET bootstrap) -> App.xaml(.cs) + MainWindow.xaml(.cs)
- ui/index.html + style.css + app.js -> MainWindow.xaml (XAML views) +
  App.xaml resource styles
- Backend/MessageBridge.cs (JS<->C# router) -> direct method calls in
  MainWindow.xaml.cs code-behind

RecRoomPicker now uses Microsoft.Win32.OpenFolderDialog (added in .NET 8)
instead of WinForms FolderBrowserDialog — keeps the project WPF-only.
Backend files needed explicit 'using System.IO;' since the WPF SDK
doesn't include it in implicit usings.
This commit is contained in:
Alexa
2026-05-27 00:44:28 +03:00
parent df9dac053d
commit 446a23da2b
20 changed files with 830 additions and 936 deletions
+4 -16
View File
@@ -5,7 +5,7 @@
<TargetFramework>net9.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<RootNamespace>DorkNet.Launcher</RootNamespace>
<AssemblyName>dorknet</AssemblyName>
<ApplicationManifest>app.manifest</ApplicationManifest>
@@ -16,20 +16,8 @@
<EnableCompressionInSingleFile>true</EnableCompressionInSingleFile>
</PropertyGroup>
<ItemGroup>
<!-- PhotinoNET wraps WebView2 with a tiny .NET host. The WebView2 runtime
ships in Windows 11 + modern Windows 10 (Edge auto-installs it). -->
<PackageReference Include="Photino.NET" Version="4.0.16" />
</ItemGroup>
<ItemGroup>
<!-- UI assets get copied next to the binary at publish time so the
PhotinoNET window can load them from disk. Keeps the binary
smaller than embedding base64; the user can also patch the UI
in-place without rebuilding the .exe. -->
<None Update="ui\**\*">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<!-- WPF is built into the .NET 9 Windows SDK; no NuGet package needed.
The Backend/* classes (release downloader, server process, etc.) are
UI-framework-agnostic and stay unchanged from the PhotinoNET draft. -->
</Project>