From 75a9bcee12166127d98d28e4077841f822465184 Mon Sep 17 00:00:00 2001 From: Codex Agent Date: Mon, 12 Jan 2026 17:20:35 +0100 Subject: [PATCH] Migrate photobooth uploader to Avalonia --- .gitignore | 2 + .../PhotoboothUploader.sln | 18 --------- .../PhotoboothUploader/App.axaml | 10 +++++ .../PhotoboothUploader/App.axaml.cs | 23 +++++++++++ .../PhotoboothUploader/App.xaml | 7 ---- .../PhotoboothUploader/App.xaml.cs | 17 -------- .../PhotoboothUploader/MainWindow.axaml | 23 +++++++++++ ...MainWindow.xaml.cs => MainWindow.axaml.cs} | 39 ++++++++++--------- .../PhotoboothUploader/MainWindow.xaml | 28 ------------- .../PhotoboothUploader.csproj | 24 ++++++------ .../PhotoboothUploader/Program.cs | 21 ++++++++++ .../Services/PhotoboothConnectClient.cs | 4 ++ .../Services/SettingsStore.cs | 2 + .../Services/UploadService.cs | 5 +++ .../PhotoboothUploader/app.manifest | 18 +++++++++ 15 files changed, 141 insertions(+), 100 deletions(-) delete mode 100644 clients/photobooth-uploader/PhotoboothUploader.sln create mode 100644 clients/photobooth-uploader/PhotoboothUploader/App.axaml create mode 100644 clients/photobooth-uploader/PhotoboothUploader/App.axaml.cs delete mode 100644 clients/photobooth-uploader/PhotoboothUploader/App.xaml delete mode 100644 clients/photobooth-uploader/PhotoboothUploader/App.xaml.cs create mode 100644 clients/photobooth-uploader/PhotoboothUploader/MainWindow.axaml rename clients/photobooth-uploader/PhotoboothUploader/{MainWindow.xaml.cs => MainWindow.axaml.cs} (83%) delete mode 100644 clients/photobooth-uploader/PhotoboothUploader/MainWindow.xaml create mode 100644 clients/photobooth-uploader/PhotoboothUploader/Program.cs create mode 100644 clients/photobooth-uploader/PhotoboothUploader/app.manifest diff --git a/.gitignore b/.gitignore index 8903637..c101bb0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ fotospiel-tenant-app /storage/*.key /storage/pail /vendor +/clients/photobooth-uploader/**/bin +/clients/photobooth-uploader/**/obj .env .env.backup .env.production diff --git a/clients/photobooth-uploader/PhotoboothUploader.sln b/clients/photobooth-uploader/PhotoboothUploader.sln deleted file mode 100644 index fa1a0eb..0000000 --- a/clients/photobooth-uploader/PhotoboothUploader.sln +++ /dev/null @@ -1,18 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.10.35013.3 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PhotoboothUploader", "PhotoboothUploader\PhotoboothUploader.csproj", "{CDF88A75-8B20-4F54-96FC-A640B0D19A10}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {CDF88A75-8B20-4F54-96FC-A640B0D19A10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CDF88A75-8B20-4F54-96FC-A640B0D19A10}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CDF88A75-8B20-4F54-96FC-A640B0D19A10}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CDF88A75-8B20-4F54-96FC-A640B0D19A10}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal diff --git a/clients/photobooth-uploader/PhotoboothUploader/App.axaml b/clients/photobooth-uploader/PhotoboothUploader/App.axaml new file mode 100644 index 0000000..0947b43 --- /dev/null +++ b/clients/photobooth-uploader/PhotoboothUploader/App.axaml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/clients/photobooth-uploader/PhotoboothUploader/App.axaml.cs b/clients/photobooth-uploader/PhotoboothUploader/App.axaml.cs new file mode 100644 index 0000000..d546bf9 --- /dev/null +++ b/clients/photobooth-uploader/PhotoboothUploader/App.axaml.cs @@ -0,0 +1,23 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; + +namespace PhotoboothUploader; + +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(); + } +} \ No newline at end of file diff --git a/clients/photobooth-uploader/PhotoboothUploader/App.xaml b/clients/photobooth-uploader/PhotoboothUploader/App.xaml deleted file mode 100644 index 8c2cbd7..0000000 --- a/clients/photobooth-uploader/PhotoboothUploader/App.xaml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/clients/photobooth-uploader/PhotoboothUploader/App.xaml.cs b/clients/photobooth-uploader/PhotoboothUploader/App.xaml.cs deleted file mode 100644 index aa92a62..0000000 --- a/clients/photobooth-uploader/PhotoboothUploader/App.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.UI.Xaml; - -namespace PhotoboothUploader; - -public partial class App : Application -{ - public App() - { - InitializeComponent(); - } - - protected override void OnLaunched(LaunchActivatedEventArgs args) - { - var window = new MainWindow(); - window.Activate(); - } -} diff --git a/clients/photobooth-uploader/PhotoboothUploader/MainWindow.axaml b/clients/photobooth-uploader/PhotoboothUploader/MainWindow.axaml new file mode 100644 index 0000000..3464ddd --- /dev/null +++ b/clients/photobooth-uploader/PhotoboothUploader/MainWindow.axaml @@ -0,0 +1,23 @@ + + + + + +