OverLayService avlägsnad

This commit is contained in:
2025-10-04 07:57:22 +02:00
parent cbf018a890
commit 11f0594233
5 changed files with 3 additions and 32 deletions

View File

@ -1,7 +0,0 @@
namespace GreadyPoang.Core;
public interface IOverlayService
{
void ShowSplash(string text, int duration);
void HideSplash();
}

View File

@ -24,7 +24,6 @@ public class RoundRunningViewModel : ViewModelBase
IMethodSharingService<Participant> 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<RoundBuilderElement>();
_builderObject = new();
@ -48,7 +46,6 @@ public class RoundRunningViewModel : ViewModelBase
private readonly IMethodSharingService<Participant> _sharingService;
private readonly ICombinedRepository _combined;
private readonly IObjectMessageService _objectMessage;
private readonly IOverlayService _overlay;
private readonly ISplashService _splashService;
private ObservableCollection<RoundBuilderGroup> _GameRoundList = new();
private ObservableCollection<Participant> _ParticipantList = new();

View File

@ -20,14 +20,12 @@ public class RoundRunningViewModelCommands : RoundRunningViewModel
IMethodSharingService<Participant> sharingService,
ICombinedRepository combined,
IObjectMessageService objectMessage,
IOverlayService overlay,
ISplashService splashService)
: base(roundsRepo,
pointsRepo,
sharingService,
combined,
objectMessage,
overlay,
splashService)
{
}

View File

@ -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();
}

View File

@ -64,7 +64,7 @@ public static class MauiProgram
builder.Services.AddSingleton<IObjectMessageService, ObjectMessageService>();
builder.Services.AddSingleton<IOverlayService, OverlayService>();
//builder.Services.AddSingleton<IOverlayService, OverlayService>();
builder.Services.AddSingleton<SplashViewModelCommands>();
builder.Services.AddSingleton<ISplashService, SplashService>();