OverLayService avlägsnad
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
namespace GreadyPoang.Core;
|
||||
|
||||
public interface IOverlayService
|
||||
{
|
||||
void ShowSplash(string text, int duration);
|
||||
void HideSplash();
|
||||
}
|
||||
@ -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();
|
||||
|
||||
@ -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)
|
||||
{
|
||||
}
|
||||
|
||||
@ -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();
|
||||
|
||||
}
|
||||
@ -33,7 +33,7 @@ public static class MauiProgram
|
||||
builder.Services.AddDbContext<DataContext>(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<IPageFactory, PageFactory>();
|
||||
builder.Services.AddSingleton<INavigationService, NavigationService>();
|
||||
builder.Services.AddSingleton<IServiceLocator,ServiceLocator>();
|
||||
builder.Services.AddSingleton<IServiceLocator, ServiceLocator>();
|
||||
builder.Services.AddSingleton<AppShell>();
|
||||
|
||||
builder.Services.AddScoped<IRepository<Participant>, ParticipantRepository>();
|
||||
@ -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>();
|
||||
|
||||
Reference in New Issue
Block a user