From 9ad55bd90a27443ef32507753c46fff499742371 Mon Sep 17 00:00:00 2001 From: iTob Date: Tue, 30 Jun 2026 17:58:52 +0200 Subject: [PATCH] "Refactor UI and logging: Update UI text and wrapping for better readability, switch logging to `Debug` for consistency, and clean up unused imports and code alignment across multiple services" --- src/CamBooth/CamBooth.App/App.xaml.cs | 216 +++++++++--------- .../Features/Camera/CameraService.cs | 10 +- .../Features/LiveView/LiveViewPage.xaml.cs | 7 +- .../Features/LiveView/TimerControl.xaml.cs | 31 --- .../TimerControlRectangleAnimation.xaml | 25 +- .../TimerControlRectangleAnimation.xaml.cs | 162 ++++++------- .../PhotoPrismUpload/PhotoPrismAuthService.cs | 2 +- .../PhotoPrismUploadQueueService.cs | 6 +- .../PhotoPrismUploadService.cs | 2 +- .../PhotoPrismUploadTracker.cs | 2 +- .../PictureGallery/PictureGalleryPage.xaml.cs | 7 +- .../PictureGallery/PictureGalleryService.cs | 4 +- src/CamBooth/CamBooth.App/MainWindow.xaml | 6 +- src/CamBooth/CamBooth.App/MainWindow.xaml.cs | 10 +- 14 files changed, 229 insertions(+), 261 deletions(-) diff --git a/src/CamBooth/CamBooth.App/App.xaml.cs b/src/CamBooth/CamBooth.App/App.xaml.cs index cc61ae6..760a55b 100644 --- a/src/CamBooth/CamBooth.App/App.xaml.cs +++ b/src/CamBooth/CamBooth.App/App.xaml.cs @@ -1,15 +1,11 @@ using System.Windows; - using CamBooth.App.Core.AppSettings; using CamBooth.App.Core.Logging; using CamBooth.App.Features.Camera; using CamBooth.App.Features.PhotoPrismUpload; using CamBooth.App.Features.PictureGallery; - using EDSDKLib.API.Base; - using EOSDigital.API; - using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -20,134 +16,134 @@ namespace CamBooth.App; /// public partial class App : Application { -private IServiceProvider? _serviceProvider; + private IServiceProvider? _serviceProvider; -protected override void OnStartup(StartupEventArgs e) -{ -base.OnStartup(e); + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); -var configuration = BuildConfiguration(); -var services = new ServiceCollection(); + var configuration = BuildConfiguration(); + var services = new ServiceCollection(); -RegisterServices(services, configuration); + RegisterServices(services, configuration); -_serviceProvider = services.BuildServiceProvider(); + _serviceProvider = services.BuildServiceProvider(); -StartBackgroundServices(); + StartBackgroundServices(); -_serviceProvider.GetRequiredService().Show(); -} + _serviceProvider.GetRequiredService().Show(); + } -protected override void OnSessionEnding(SessionEndingCancelEventArgs e) -{ -TryShutdownCamera("OnSessionEnding"); -base.OnSessionEnding(e); -} + protected override void OnSessionEnding(SessionEndingCancelEventArgs e) + { + TryShutdownCamera("OnSessionEnding"); + base.OnSessionEnding(e); + } -protected override void OnExit(ExitEventArgs e) -{ -try -{ -_serviceProvider?.GetService() -?.StopAsync().Wait(TimeSpan.FromSeconds(10)); -} -catch (Exception ex) -{ -System.Diagnostics.Debug.WriteLine($"Error stopping upload service: {ex.Message}"); -} + protected override void OnExit(ExitEventArgs e) + { + try + { + _serviceProvider?.GetService() + ?.StopAsync().Wait(TimeSpan.FromSeconds(10)); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($"Error stopping upload service: {ex.Message}"); + } -TryShutdownCamera("OnExit"); + TryShutdownCamera("OnExit"); -try -{ -(_serviceProvider as IDisposable)?.Dispose(); -} -catch (Exception ex) -{ -System.Diagnostics.Debug.WriteLine($"Error disposing service provider: {ex.Message}"); -} + try + { + (_serviceProvider as IDisposable)?.Dispose(); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($"Error disposing service provider: {ex.Message}"); + } -base.OnExit(e); -} + base.OnExit(e); + } -private static IConfiguration BuildConfiguration() -{ -var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"; + private static IConfiguration BuildConfiguration() + { + var environment = Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"; -var builder = new ConfigurationBuilder() -.SetBasePath(AppContext.BaseDirectory) -.AddJsonFile("Core/AppSettings/app.settings.json", optional: false, reloadOnChange: true); + var builder = new ConfigurationBuilder() + .SetBasePath(AppContext.BaseDirectory) + .AddJsonFile("Core/AppSettings/app.settings.json", optional: false, reloadOnChange: true); -if (environment == "Development") -builder.AddJsonFile("Core/AppSettings/app.settings.dev.json", optional: true, reloadOnChange: true); + if (environment == "Development") + builder.AddJsonFile("Core/AppSettings/app.settings.dev.json", optional: true, reloadOnChange: true); -return builder.Build(); -} + return builder.Build(); + } -private static void RegisterServices(ServiceCollection services, IConfiguration configuration) -{ -services.AddSingleton(configuration); -services.AddSingleton(); -services.AddSingleton(); -services.AddSingleton(); -services.AddSingleton(); -services.AddSingleton(); -services.AddSingleton(); -services.AddSingleton(); -services.AddSingleton(); -services.AddTransient(); + private static void RegisterServices(ServiceCollection services, IConfiguration configuration) + { + services.AddSingleton(configuration); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddTransient(); -RegisterCameraApi(services, configuration); -} + RegisterCameraApi(services, configuration); + } -private static void RegisterCameraApi(ServiceCollection services, IConfiguration configuration) -{ -var useMockCamera = bool.Parse(configuration["AppSettings:UseMockCamera"] ?? "false"); -try -{ -ICanonAPI canonApi = useMockCamera ? new CanonAPIMock() : new CanonAPI(); -services.AddSingleton(canonApi); -} -catch (DllNotFoundException ex) -{ -MessageBox.Show( -$"EDSDK konnte nicht geladen werden. Verwende Mock-Kamera.\n\nFehler: {ex.Message}", -"DLL nicht gefunden", MessageBoxButton.OK, MessageBoxImage.Warning); + private static void RegisterCameraApi(ServiceCollection services, IConfiguration configuration) + { + var useMockCamera = bool.Parse(configuration["AppSettings:UseMockCamera"] ?? "false"); + try + { + ICanonAPI canonApi = useMockCamera ? new CanonAPIMock() : new CanonAPI(); + services.AddSingleton(canonApi); + } + catch (DllNotFoundException ex) + { + MessageBox.Show( + $"EDSDK konnte nicht geladen werden. Verwende Mock-Kamera.\n\nFehler: {ex.Message}", + "DLL nicht gefunden", MessageBoxButton.OK, MessageBoxImage.Warning); -services.AddSingleton(new CanonAPIMock()); -} -} + services.AddSingleton(new CanonAPIMock()); + } + } -private void StartBackgroundServices() -{ -try -{ -var logger = _serviceProvider!.GetRequiredService(); -var uploadQueueService = _serviceProvider.GetRequiredService(); -uploadQueueService.Start(); -uploadQueueService.ScanAndQueueFailedUploads(); -logger.Info("PhotoPrism UploadQueueService gestartet"); -} -catch (Exception ex) -{ -System.Diagnostics.Debug.WriteLine($"Error starting background services: {ex.Message}"); -} -} + private void StartBackgroundServices() + { + try + { + var logger = _serviceProvider!.GetRequiredService(); + var uploadQueueService = _serviceProvider.GetRequiredService(); + uploadQueueService.Start(); + uploadQueueService.ScanAndQueueFailedUploads(); + logger.Info("PhotoPrism UploadQueueService gestartet"); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($"Error starting background services: {ex.Message}"); + } + } -private void TryShutdownCamera(string source) -{ -try -{ -var cameraService = _serviceProvider?.GetService(); -cameraService?.CloseSession(); -} -catch (Exception ex) -{ -System.Diagnostics.Debug.WriteLine($"Error closing camera session ({source}): {ex.Message}"); -} -} -} + private void TryShutdownCamera(string source) + { + try + { + var cameraService = _serviceProvider?.GetService(); + cameraService?.CloseSession(); + } + catch (Exception ex) + { + System.Diagnostics.Debug.WriteLine($"Error closing camera session ({source}): {ex.Message}"); + } + } +} \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/Features/Camera/CameraService.cs b/src/CamBooth/CamBooth.App/Features/Camera/CameraService.cs index bc16049..c1f9f12 100644 --- a/src/CamBooth/CamBooth.App/Features/Camera/CameraService.cs +++ b/src/CamBooth/CamBooth.App/Features/Camera/CameraService.cs @@ -71,7 +71,7 @@ public class CameraService : IDisposable if (attempt < maxRetries - 1) { - System.Threading.Thread.Sleep(retryDelayMs); + Thread.Sleep(retryDelayMs); RefreshCameraList(); } } @@ -143,9 +143,7 @@ public class CameraService : IDisposable try { await Task.Run(() => sdkCamera.SendCommand(CameraCommand.PressShutterButton, (int)ShutterButton.Halfway)); - var completed = await Task.WhenAny(focusCompleted.Task, Task.Delay(focusTimeoutMs)); - if (completed != focusCompleted.Task) - _logger.Info("Autofocus timeout reached, continuing."); + await Task.WhenAny(focusCompleted.Task, Task.Delay(focusTimeoutMs)); } catch (Exception ex) { @@ -286,13 +284,13 @@ public class CameraService : IDisposable private void MainCamera_DownloadReady(ICamera sender, IDownloadInfo info) { - _logger.Info("Download ready"); + _logger.Debug("Download ready"); try { info.FileName = $"img_{Guid.NewGuid()}.jpg"; sender.DownloadFile(info, _appSettings.PictureLocation); var savedPath = Path.Combine(_appSettings.PictureLocation!, info.FileName); - _logger.Info($"Download complete: {savedPath}"); + _logger.Debug($"Download complete: {savedPath}"); Application.Current.Dispatcher.Invoke(() => { diff --git a/src/CamBooth/CamBooth.App/Features/LiveView/LiveViewPage.xaml.cs b/src/CamBooth/CamBooth.App/Features/LiveView/LiveViewPage.xaml.cs index fa6582d..2814b36 100644 --- a/src/CamBooth/CamBooth.App/Features/LiveView/LiveViewPage.xaml.cs +++ b/src/CamBooth/CamBooth.App/Features/LiveView/LiveViewPage.xaml.cs @@ -1,20 +1,15 @@ -using System; using System.Diagnostics; using System.IO; -using System.Threading; -using System.Threading.Tasks; using System.Windows; -using System.Windows.Controls; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Threading; using CamBooth.App.Core.Logging; using CamBooth.App.Features.Camera; -using EOSDigital.API; namespace CamBooth.App.Features.LiveView; -public partial class LiveViewPage : Page, IDisposable +public partial class LiveViewPage : IDisposable { private readonly CameraService _cameraService; private readonly Logger _logger; diff --git a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControl.xaml.cs b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControl.xaml.cs index 78c958c..9d4bede 100644 --- a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControl.xaml.cs +++ b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControl.xaml.cs @@ -41,35 +41,4 @@ public partial class ModernTimerControl : UserControl StatusText.Text = "Zeit abgelaufen!"; } } - - - public void StartTimer(int durationInSeconds) - { - _remainingTime = durationInSeconds; - TimerText.Text = TimeSpan.FromSeconds(_remainingTime).ToString(@"mm\:ss"); - StatusText.Text = "Timer läuft..."; - _timer.Start(); - ShowTimer(); - } - - - public void StopTimer() - { - _timer.Stop(); - StatusText.Text = "Timer angehalten"; - } - - - public void ShowTimer() - { - var fadeInAnimation = new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(300)); - TimerContainer.BeginAnimation(OpacityProperty, fadeInAnimation); - } - - - public void HideTimer() - { - var fadeOutAnimation = new DoubleAnimation(1, 0, TimeSpan.FromMilliseconds(300)); - TimerContainer.BeginAnimation(OpacityProperty, fadeOutAnimation); - } } \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml index a56e05f..3518e2b 100644 --- a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml +++ b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml @@ -54,16 +54,21 @@ - + + + diff --git a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml.cs b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml.cs index 44af9a5..44263b4 100644 --- a/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml.cs +++ b/src/CamBooth/CamBooth.App/Features/LiveView/TimerControlRectangleAnimation.xaml.cs @@ -10,104 +10,104 @@ namespace CamBooth.App.Features.LiveView; public partial class TimerControlRectangleAnimation : UserControl { // Ellipse diameter=320, StrokeThickness=12 → circumference = π*320/12 ≈ 83.78 dash-units -private static readonly double RingFullDashUnits = Math.PI * 320.0 / 12.0; + private static readonly double RingFullDashUnits = Math.PI * 320.0 / 12.0; -public static event Action? OnTimerEllapsed; + public static event Action? OnTimerEllapsed; -private readonly DispatcherTimer _ticker = new() { Interval = TimeSpan.FromSeconds(1) }; -private readonly Random _random = new(); + private readonly DispatcherTimer _ticker = new() { Interval = TimeSpan.FromSeconds(1) }; + private readonly Random _random = new(); -private int _remainingTime; -private double _totalDuration; + private int _remainingTime; + private double _totalDuration; -private static readonly string[] Instructions = -[ -"Lächeln! 😊", "Hasenohren machen! 🐰", "Zunge rausstrecken! 👅", -"Grimasse ziehen! 😝", "Daumen hoch! 👍", "Peace-Zeichen! ✌️", -"Lustig gucken! 🤪", "Crazy Face! 🤯", "Küsschen! 😘", -"Winken! 👋", "Herz mit den Händen! ❤️", "Überrascht schauen! 😲", -"Cool bleiben! 😎", "Lachen! 😄", "Zähne zeigen! 😁", -"Schnute ziehen! 😗", "Arm hochstrecken! 🙌", "Gruppe umarmen! 🤗" -]; + private static readonly string[] Instructions = + [ + "Lächeln! 😊", "Hasenohren machen! 🐰", "Zunge rausstrecken! 👅", + "Grimasse ziehen! 😝", "Daumen hoch! 👍", "Peace-Zeichen! ✌️", + "Lustig gucken! 🤪", "Crazy Face! 🤯", "Küsschen! 😘", + "Winken! 👋", "Herz mit den Händen! ❤️", "Überrascht schauen! 😲", + "Cool bleiben! 😎", "Lachen! 😄", "Zähne zeigen! 😁", + "Schnute ziehen! 😗", "Arm hochstrecken! 🙌", "Gruppe umarmen! 🤗" + ]; -public TimerControlRectangleAnimation() -{ -InitializeComponent(); -_ticker.Tick += OnTick; -} + public TimerControlRectangleAnimation() + { + InitializeComponent(); + _ticker.Tick += OnTick; + } -public void StartTimer(int durationInSeconds) -{ -_totalDuration = durationInSeconds; -_remainingTime = durationInSeconds; + public void StartTimer(int durationInSeconds) + { + _totalDuration = durationInSeconds; + _remainingTime = durationInSeconds; -CountdownNumber.Text = _remainingTime.ToString(); -InstructionText.Text = Instructions[_random.Next(Instructions.Length)]; + CountdownNumber.Text = _remainingTime.ToString(); + InstructionText.Text = Instructions[_random.Next(Instructions.Length)]; // Reset ring offset so ring appears full -CountdownRing.StrokeDashOffset = 0; -CountdownRing.StrokeDashArray = new DoubleCollection { RingFullDashUnits, RingFullDashUnits }; + CountdownRing.StrokeDashOffset = 0; + CountdownRing.StrokeDashArray = new DoubleCollection { RingFullDashUnits, RingFullDashUnits }; -FadeIn(); -StartRingAnimation(); -_ticker.Start(); -} + FadeIn(); + StartRingAnimation(); + _ticker.Start(); + } -private void OnTick(object? sender, EventArgs e) -{ -_remainingTime--; + private void OnTick(object? sender, EventArgs e) + { + _remainingTime--; -if (_remainingTime > 0) -{ -CountdownNumber.Text = _remainingTime.ToString(); -AnimateNumberPop(); -} -else -{ -_ticker.Stop(); -CountdownNumber.Text = "0"; -AnimateNumberPop(); -StopRingAnimation(); -OnTimerEllapsed?.Invoke(); -} -} - - -private void FadeIn() -{ -TimerContainer.BeginAnimation(OpacityProperty, -new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(300))); -} - - -private void StartRingAnimation() -{ - // StrokeDashOffset IS a DependencyProperty — animate directly, no Storyboard needed. - // Pattern: dash=C, gap=C. Offset 0 → full ring; offset C → empty ring. - CountdownRing.BeginAnimation(Shape.StrokeDashOffsetProperty, - new DoubleAnimation(0, RingFullDashUnits, - new Duration(TimeSpan.FromSeconds(_totalDuration))) + if (_remainingTime > 0) { - FillBehavior = FillBehavior.HoldEnd - }); -} + CountdownNumber.Text = _remainingTime.ToString(); + AnimateNumberPop(); + } + else + { + _ticker.Stop(); + CountdownNumber.Text = "0"; + AnimateNumberPop(); + StopRingAnimation(); + OnTimerEllapsed?.Invoke(); + } + } -private void StopRingAnimation() => - CountdownRing.BeginAnimation(Shape.StrokeDashOffsetProperty, null); + private void FadeIn() + { + TimerContainer.BeginAnimation(OpacityProperty, + new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(300))); + } -private void AnimateNumberPop() -{ -var easing = new BackEase { Amplitude = 0.4, EasingMode = EasingMode.EaseOut }; -CountdownNumberScale.ScaleX = 1.4; -CountdownNumberScale.ScaleY = 1.4; -CountdownNumberScale.BeginAnimation(ScaleTransform.ScaleXProperty, -new DoubleAnimation(1.4, 1.0, TimeSpan.FromMilliseconds(450)) { EasingFunction = easing }); -CountdownNumberScale.BeginAnimation(ScaleTransform.ScaleYProperty, -new DoubleAnimation(1.4, 1.0, TimeSpan.FromMilliseconds(450)) { EasingFunction = easing }); -} -} + private void StartRingAnimation() + { + // StrokeDashOffset IS a DependencyProperty — animate directly, no Storyboard needed. + // Pattern: dash=C, gap=C. Offset 0 → full ring; offset C → empty ring. + CountdownRing.BeginAnimation(Shape.StrokeDashOffsetProperty, + new DoubleAnimation(0, RingFullDashUnits, + new Duration(TimeSpan.FromSeconds(_totalDuration))) + { + FillBehavior = FillBehavior.HoldEnd + }); + } + + + private void StopRingAnimation() => + CountdownRing.BeginAnimation(Shape.StrokeDashOffsetProperty, null); + + + private void AnimateNumberPop() + { + var easing = new BackEase { Amplitude = 0.4, EasingMode = EasingMode.EaseOut }; + CountdownNumberScale.ScaleX = 1.4; + CountdownNumberScale.ScaleY = 1.4; + CountdownNumberScale.BeginAnimation(ScaleTransform.ScaleXProperty, + new DoubleAnimation(1.4, 1.0, TimeSpan.FromMilliseconds(450)) { EasingFunction = easing }); + CountdownNumberScale.BeginAnimation(ScaleTransform.ScaleYProperty, + new DoubleAnimation(1.4, 1.0, TimeSpan.FromMilliseconds(450)) { EasingFunction = easing }); + } +} \ No newline at end of file diff --git a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismAuthService.cs b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismAuthService.cs index df8b60c..5bb8e83 100644 --- a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismAuthService.cs +++ b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismAuthService.cs @@ -37,7 +37,7 @@ public class PhotoPrismAuthService { try { - _logger.Info("Starte PhotoPrism-Authentifizierung..."); + _logger.Debug("Starte PhotoPrism-Authentifizierung..."); if (!ValidateConfiguration()) return false; diff --git a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadQueueService.cs b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadQueueService.cs index a2032bb..4ca25dc 100644 --- a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadQueueService.cs +++ b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadQueueService.cs @@ -134,7 +134,7 @@ public class PhotoPrismUploadQueueService : IDisposable { if (_uploadQueue.Contains(photoPath)) return; _uploadQueue.Enqueue(photoPath); - _logger.Info($"Neues Foto in PhotoPrism-Queue: {Path.GetFileName(photoPath)}"); + _logger.Debug($"Neues Foto in PhotoPrism-Queue: {Path.GetFileName(photoPath)}"); } } @@ -151,7 +151,7 @@ public class PhotoPrismUploadQueueService : IDisposable private async Task ProcessQueueAsync(CancellationToken cancellationToken) { - _logger.Info("PhotoPrism Upload-Queue-Verarbeitung gestartet"); + _logger.Debug("PhotoPrism Upload-Queue-Verarbeitung gestartet"); try { @@ -203,7 +203,7 @@ public class PhotoPrismUploadQueueService : IDisposable if (success) { _uploadTracker.MarkAsUploaded(filePath); - _logger.Info($"✅ PhotoPrism Upload erfolgreich: {fileName}"); + _logger.Debug($"✅ PhotoPrism Upload erfolgreich: {fileName}"); } else { diff --git a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadService.cs b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadService.cs index 95cfd1b..698efdf 100644 --- a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadService.cs +++ b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadService.cs @@ -140,7 +140,7 @@ public class PhotoPrismUploadService : IDisposable return false; } - _logger.Info($"Starte Upload: {Path.GetFileName(imagePath)}"); + _logger.Debug($"Starte Upload: {Path.GetFileName(imagePath)}"); _logger.Debug($" Authentifiziert: {_isAuthenticated}"); _logger.Debug($" Token vorhanden: {!string.IsNullOrEmpty(_authService.AccessToken)}"); diff --git a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadTracker.cs b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadTracker.cs index be3cf4d..7d3573b 100644 --- a/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadTracker.cs +++ b/src/CamBooth/CamBooth.App/Features/PhotoPrismUpload/PhotoPrismUploadTracker.cs @@ -53,7 +53,7 @@ public class PhotoPrismUploadTracker }; SaveToDisk(); - _logger.Info($"Bild als hochgeladen markiert: {key}"); + _logger.Debug($"Bild als hochgeladen markiert: {key}"); } /// diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs index b81875c..7229094 100644 --- a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs +++ b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryPage.xaml.cs @@ -76,12 +76,13 @@ public partial class PictureGalleryPage : Page var qrSubLabel = new TextBlock { - Text = "zum Fotoalbum", + Text = "📱 Handy-Kamera draufhalten", Foreground = new SolidColorBrush(Colors.White), - FontSize = 11, + FontSize = 12, FontWeight = FontWeights.Bold, TextAlignment = TextAlignment.Center, - Margin = new Thickness(4, 0, 4, 2) + TextWrapping = TextWrapping.Wrap, + Margin = new Thickness(4, 0, 4, 4) }; qrContainer.Children.Add(qrSubLabel); diff --git a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs index 90910f1..88d86cd 100644 --- a/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs +++ b/src/CamBooth/CamBooth.App/Features/PictureGallery/PictureGalleryService.cs @@ -103,7 +103,7 @@ public class PictureGalleryService try { this.thumbnails.Add(creationTime, PictureGalleryService.CreateThumbnail(picturePath, 244, 0)); - this._logger.Info($"Thumbnail '{picturePath}' successfully created"); + this._logger.Debug($"Thumbnail '{picturePath}' successfully created"); } catch (Exception e) { @@ -115,7 +115,7 @@ public class PictureGalleryService } while ((loop < cacheSize || cacheSize == 0) && loop < picturePaths.Count); }); - this._logger.Info("Loading thumbnails into cache completed"); + this._logger.Debug("Loading thumbnails into cache completed"); } diff --git a/src/CamBooth/CamBooth.App/MainWindow.xaml b/src/CamBooth/CamBooth.App/MainWindow.xaml index 0b79fbb..b464650 100644 --- a/src/CamBooth/CamBooth.App/MainWindow.xaml +++ b/src/CamBooth/CamBooth.App/MainWindow.xaml @@ -253,13 +253,13 @@ - - diff --git a/src/CamBooth/CamBooth.App/MainWindow.xaml.cs b/src/CamBooth/CamBooth.App/MainWindow.xaml.cs index 989213a..759fad8 100644 --- a/src/CamBooth/CamBooth.App/MainWindow.xaml.cs +++ b/src/CamBooth/CamBooth.App/MainWindow.xaml.cs @@ -233,10 +233,14 @@ public partial class MainWindow : Window }); content.Children.Add(new System.Windows.Controls.TextBlock { - Text = "Mit einem QR-Code-Scanner scannen", + Text = "Nimm dein Handy und halte die Kamera auf den Code.\n" + + "Tippe dann auf den Link, der erscheint - schon siehst du alle Fotos.", Foreground = Brushes.White, - FontSize = 16, - TextAlignment = TextAlignment.Center + FontSize = 18, + LineHeight = 26, + TextAlignment = TextAlignment.Center, + TextWrapping = TextWrapping.Wrap, + MaxWidth = 420 }); QRCodeOverlay.DialogContent = content;