From 3e858170e95b99e8042e777a0b90a44b3d58e016 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 6 Aug 2026 14:28:16 +0000 Subject: [PATCH 1/2] Migrate GUI project to Avalonia Co-authored-by: sassdawe <10754765+sassdawe@users.noreply.github.com> --- src/AtsScanner.Gui/App.axaml | 8 + src/AtsScanner.Gui/App.axaml.cs | 21 + src/AtsScanner.Gui/App.xaml | 14 - src/AtsScanner.Gui/App.xaml.cs | 14 - src/AtsScanner.Gui/AppShell.xaml | 14 - src/AtsScanner.Gui/AppShell.xaml.cs | 9 - src/AtsScanner.Gui/AtsScanner.Gui.csproj | 96 +--- src/AtsScanner.Gui/MainPage.xaml | 112 ----- src/AtsScanner.Gui/MainPage.xaml.cs | 43 -- src/AtsScanner.Gui/MainWindow.axaml | 105 +++++ src/AtsScanner.Gui/MainWindow.axaml.cs | 63 +++ src/AtsScanner.Gui/MauiProgram.cs | 24 - .../Platforms/MacCatalyst/AppDelegate.cs | 9 - .../Platforms/MacCatalyst/Entitlements.plist | 11 - .../Platforms/MacCatalyst/Info.plist | 37 -- .../Platforms/MacCatalyst/Program.cs | 15 - src/AtsScanner.Gui/Platforms/Windows/App.xaml | 8 - .../Platforms/Windows/App.xaml.cs | 24 - .../Platforms/Windows/Package.appxmanifest | 46 -- .../Platforms/Windows/app.manifest | 17 - src/AtsScanner.Gui/Program.cs | 16 + .../Resources/AppIcon/appicon.svg | 4 - .../Resources/AppIcon/appiconfg.svg | 8 - .../Resources/Fonts/OpenSans-Regular.ttf | Bin 107280 -> 0 bytes .../Resources/Fonts/OpenSans-Semibold.ttf | Bin 111204 -> 0 bytes .../Resources/Raw/AboutAssets.txt | 15 - .../Resources/Splash/splash.svg | 8 - .../Resources/Styles/Colors.xaml | 44 -- .../Resources/Styles/Styles.xaml | 434 ------------------ .../ViewModels/AsyncRelayCommand.cs | 33 ++ src/AtsScanner.Gui/ViewModels/IssueDisplay.cs | 10 +- .../ViewModels/MainViewModel.cs | 52 +-- src/AtsScanner.Gui/ViewModels/RelayCommand.cs | 14 + .../ViewModels/ScanResultViewModel.cs | 14 +- 34 files changed, 318 insertions(+), 1024 deletions(-) create mode 100644 src/AtsScanner.Gui/App.axaml create mode 100644 src/AtsScanner.Gui/App.axaml.cs delete mode 100644 src/AtsScanner.Gui/App.xaml delete mode 100644 src/AtsScanner.Gui/App.xaml.cs delete mode 100644 src/AtsScanner.Gui/AppShell.xaml delete mode 100644 src/AtsScanner.Gui/AppShell.xaml.cs delete mode 100644 src/AtsScanner.Gui/MainPage.xaml delete mode 100644 src/AtsScanner.Gui/MainPage.xaml.cs create mode 100644 src/AtsScanner.Gui/MainWindow.axaml create mode 100644 src/AtsScanner.Gui/MainWindow.axaml.cs delete mode 100644 src/AtsScanner.Gui/MauiProgram.cs delete mode 100644 src/AtsScanner.Gui/Platforms/MacCatalyst/AppDelegate.cs delete mode 100644 src/AtsScanner.Gui/Platforms/MacCatalyst/Entitlements.plist delete mode 100644 src/AtsScanner.Gui/Platforms/MacCatalyst/Info.plist delete mode 100644 src/AtsScanner.Gui/Platforms/MacCatalyst/Program.cs delete mode 100644 src/AtsScanner.Gui/Platforms/Windows/App.xaml delete mode 100644 src/AtsScanner.Gui/Platforms/Windows/App.xaml.cs delete mode 100644 src/AtsScanner.Gui/Platforms/Windows/Package.appxmanifest delete mode 100644 src/AtsScanner.Gui/Platforms/Windows/app.manifest create mode 100644 src/AtsScanner.Gui/Program.cs delete mode 100644 src/AtsScanner.Gui/Resources/AppIcon/appicon.svg delete mode 100644 src/AtsScanner.Gui/Resources/AppIcon/appiconfg.svg delete mode 100644 src/AtsScanner.Gui/Resources/Fonts/OpenSans-Regular.ttf delete mode 100644 src/AtsScanner.Gui/Resources/Fonts/OpenSans-Semibold.ttf delete mode 100644 src/AtsScanner.Gui/Resources/Raw/AboutAssets.txt delete mode 100644 src/AtsScanner.Gui/Resources/Splash/splash.svg delete mode 100644 src/AtsScanner.Gui/Resources/Styles/Colors.xaml delete mode 100644 src/AtsScanner.Gui/Resources/Styles/Styles.xaml create mode 100644 src/AtsScanner.Gui/ViewModels/AsyncRelayCommand.cs create mode 100644 src/AtsScanner.Gui/ViewModels/RelayCommand.cs diff --git a/src/AtsScanner.Gui/App.axaml b/src/AtsScanner.Gui/App.axaml new file mode 100644 index 0000000..079c65c --- /dev/null +++ b/src/AtsScanner.Gui/App.axaml @@ -0,0 +1,8 @@ + + + + + diff --git a/src/AtsScanner.Gui/App.axaml.cs b/src/AtsScanner.Gui/App.axaml.cs new file mode 100644 index 0000000..05a9af8 --- /dev/null +++ b/src/AtsScanner.Gui/App.axaml.cs @@ -0,0 +1,21 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; + +namespace AtsScanner.Gui; + +public partial class App : Application +{ + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + desktop.MainWindow = new MainWindow(); + + base.OnFrameworkInitializationCompleted(); + } +} diff --git a/src/AtsScanner.Gui/App.xaml b/src/AtsScanner.Gui/App.xaml deleted file mode 100644 index c54d413..0000000 --- a/src/AtsScanner.Gui/App.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - diff --git a/src/AtsScanner.Gui/App.xaml.cs b/src/AtsScanner.Gui/App.xaml.cs deleted file mode 100644 index 39500ac..0000000 --- a/src/AtsScanner.Gui/App.xaml.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace AtsScanner.Gui; - -public partial class App : Application -{ - public App() - { - InitializeComponent(); - } - - protected override Window CreateWindow(IActivationState? activationState) - { - return new Window(new AppShell()); - } -} \ No newline at end of file diff --git a/src/AtsScanner.Gui/AppShell.xaml b/src/AtsScanner.Gui/AppShell.xaml deleted file mode 100644 index 09a6759..0000000 --- a/src/AtsScanner.Gui/AppShell.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/src/AtsScanner.Gui/AppShell.xaml.cs b/src/AtsScanner.Gui/AppShell.xaml.cs deleted file mode 100644 index d782363..0000000 --- a/src/AtsScanner.Gui/AppShell.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace AtsScanner.Gui; - -public partial class AppShell : Shell -{ - public AppShell() - { - InitializeComponent(); - } -} diff --git a/src/AtsScanner.Gui/AtsScanner.Gui.csproj b/src/AtsScanner.Gui/AtsScanner.Gui.csproj index cd5ff5d..2409dcf 100644 --- a/src/AtsScanner.Gui/AtsScanner.Gui.csproj +++ b/src/AtsScanner.Gui/AtsScanner.Gui.csproj @@ -1,76 +1,28 @@ - - - net10.0-windows10.0.19041.0 - net10.0-maccatalyst - - - - - Exe - AtsScanner.Gui - true - true - enable - enable - - - SourceGen - - - ATS Scanner - - - com.atsscanner.gui - - - 1.0 - 1 - - - None - - 15.0 - 15.0 - 21.0 - 10.0.17763.0 - 10.0.17763.0 - - - - - - - - - - - - - - - - - - - - - - - - - - + + WinExe + net10.0 + AtsScanner.Gui + enable + enable + true + ATS Scanner + com.atsscanner.gui + 1.0 + 1 + false + + + + + + + + + + + + diff --git a/src/AtsScanner.Gui/MainPage.xaml b/src/AtsScanner.Gui/MainPage.xaml deleted file mode 100644 index 04739b7..0000000 --- a/src/AtsScanner.Gui/MainPage.xaml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - -