From 11f059423330fc747c5a2099c3f25b8a4c26cf01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommy=20=C3=96man?= Date: Sat, 4 Oct 2025 07:57:22 +0200 Subject: [PATCH] =?UTF-8?q?OverLayService=20avl=C3=A4gsnad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Interfaces/IOverlayService.cs | 7 ------- .../ViewModelClasses/RoundRunningViewModel.cs | 3 --- .../RoundRunningViewModelCommands.cs | 2 -- .../LocalServices/Implements/OverlayService.cs | 17 ----------------- GreadyPoang/MauiProgram.cs | 6 +++--- 5 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 GreadyPoang.ViewModelLayer/Interfaces/IOverlayService.cs delete mode 100644 GreadyPoang/LocalServices/Implements/OverlayService.cs diff --git a/GreadyPoang.ViewModelLayer/Interfaces/IOverlayService.cs b/GreadyPoang.ViewModelLayer/Interfaces/IOverlayService.cs deleted file mode 100644 index 66034e1..0000000 --- a/GreadyPoang.ViewModelLayer/Interfaces/IOverlayService.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace GreadyPoang.Core; - -public interface IOverlayService -{ - void ShowSplash(string text, int duration); - void HideSplash(); -} diff --git a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs index 80175a1..a6f3c6a 100644 --- a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs +++ b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundRunningViewModel.cs @@ -24,7 +24,6 @@ public class RoundRunningViewModel : ViewModelBase IMethodSharingService sharingService, ICombinedRepository combined, IObjectMessageService objectMessage, - IOverlayService overlay, ISplashService splashService ) : base() { @@ -33,7 +32,6 @@ public class RoundRunningViewModel : ViewModelBase _sharingService = sharingService; _combined = combined; _objectMessage = objectMessage; - _overlay = overlay; _splashService = splashService; _roundElements = new ObservableCollection(); _builderObject = new(); @@ -48,7 +46,6 @@ public class RoundRunningViewModel : ViewModelBase private readonly IMethodSharingService _sharingService; private readonly ICombinedRepository _combined; private readonly IObjectMessageService _objectMessage; - private readonly IOverlayService _overlay; private readonly ISplashService _splashService; private ObservableCollection _GameRoundList = new(); private ObservableCollection _ParticipantList = new(); diff --git a/GreadyPoang/CommandClasses/RoundRunningViewModelCommands.cs b/GreadyPoang/CommandClasses/RoundRunningViewModelCommands.cs index 5da65d9..bbcd1d8 100644 --- a/GreadyPoang/CommandClasses/RoundRunningViewModelCommands.cs +++ b/GreadyPoang/CommandClasses/RoundRunningViewModelCommands.cs @@ -20,14 +20,12 @@ public class RoundRunningViewModelCommands : RoundRunningViewModel IMethodSharingService sharingService, ICombinedRepository combined, IObjectMessageService objectMessage, - IOverlayService overlay, ISplashService splashService) : base(roundsRepo, pointsRepo, sharingService, combined, objectMessage, - overlay, splashService) { } diff --git a/GreadyPoang/LocalServices/Implements/OverlayService.cs b/GreadyPoang/LocalServices/Implements/OverlayService.cs deleted file mode 100644 index 78866f3..0000000 --- a/GreadyPoang/LocalServices/Implements/OverlayService.cs +++ /dev/null @@ -1,17 +0,0 @@ -using GreadyPoang.Core; - -namespace GreadyPoang.LocalServices; - -public class OverlayService : IOverlayService -{ - private readonly ISplashService _splashService; - - public OverlayService(ISplashService splashService) - { - _splashService = splashService; - } - - public void ShowSplash(string text, int duration = 3000) => _splashService.ShowSplash(text, duration).GetAwaiter().GetResult(); - public void HideSplash() => _splashService.HideAsync().GetAwaiter().GetResult(); - -} diff --git a/GreadyPoang/MauiProgram.cs b/GreadyPoang/MauiProgram.cs index b89e3c0..21c40e1 100644 --- a/GreadyPoang/MauiProgram.cs +++ b/GreadyPoang/MauiProgram.cs @@ -33,7 +33,7 @@ public static class MauiProgram builder.Services.AddDbContext(options => { var MauiDataPath = FileSystem.Current.AppDataDirectory; - if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MauiDataPath_GreadyPoang.txt"))); + if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MauiDataPath_GreadyPoang.txt"))) ; { File.WriteAllText(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MauiDataPath_GreadyPoang.txt"), MauiDataPath); } @@ -43,7 +43,7 @@ public static class MauiProgram builder.Services.AddScoped(); builder.Services.AddSingleton(); - builder.Services.AddSingleton(); + builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddScoped, ParticipantRepository>(); @@ -64,7 +64,7 @@ public static class MauiProgram builder.Services.AddSingleton(); - builder.Services.AddSingleton(); + //builder.Services.AddSingleton(); builder.Services.AddSingleton(); builder.Services.AddSingleton();