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,
|
IMethodSharingService<Participant> sharingService,
|
||||||
ICombinedRepository combined,
|
ICombinedRepository combined,
|
||||||
IObjectMessageService objectMessage,
|
IObjectMessageService objectMessage,
|
||||||
IOverlayService overlay,
|
|
||||||
ISplashService splashService
|
ISplashService splashService
|
||||||
) : base()
|
) : base()
|
||||||
{
|
{
|
||||||
@ -33,7 +32,6 @@ public class RoundRunningViewModel : ViewModelBase
|
|||||||
_sharingService = sharingService;
|
_sharingService = sharingService;
|
||||||
_combined = combined;
|
_combined = combined;
|
||||||
_objectMessage = objectMessage;
|
_objectMessage = objectMessage;
|
||||||
_overlay = overlay;
|
|
||||||
_splashService = splashService;
|
_splashService = splashService;
|
||||||
_roundElements = new ObservableCollection<RoundBuilderElement>();
|
_roundElements = new ObservableCollection<RoundBuilderElement>();
|
||||||
_builderObject = new();
|
_builderObject = new();
|
||||||
@ -48,7 +46,6 @@ public class RoundRunningViewModel : ViewModelBase
|
|||||||
private readonly IMethodSharingService<Participant> _sharingService;
|
private readonly IMethodSharingService<Participant> _sharingService;
|
||||||
private readonly ICombinedRepository _combined;
|
private readonly ICombinedRepository _combined;
|
||||||
private readonly IObjectMessageService _objectMessage;
|
private readonly IObjectMessageService _objectMessage;
|
||||||
private readonly IOverlayService _overlay;
|
|
||||||
private readonly ISplashService _splashService;
|
private readonly ISplashService _splashService;
|
||||||
private ObservableCollection<RoundBuilderGroup> _GameRoundList = new();
|
private ObservableCollection<RoundBuilderGroup> _GameRoundList = new();
|
||||||
private ObservableCollection<Participant> _ParticipantList = new();
|
private ObservableCollection<Participant> _ParticipantList = new();
|
||||||
|
|||||||
@ -20,14 +20,12 @@ public class RoundRunningViewModelCommands : RoundRunningViewModel
|
|||||||
IMethodSharingService<Participant> sharingService,
|
IMethodSharingService<Participant> sharingService,
|
||||||
ICombinedRepository combined,
|
ICombinedRepository combined,
|
||||||
IObjectMessageService objectMessage,
|
IObjectMessageService objectMessage,
|
||||||
IOverlayService overlay,
|
|
||||||
ISplashService splashService)
|
ISplashService splashService)
|
||||||
: base(roundsRepo,
|
: base(roundsRepo,
|
||||||
pointsRepo,
|
pointsRepo,
|
||||||
sharingService,
|
sharingService,
|
||||||
combined,
|
combined,
|
||||||
objectMessage,
|
objectMessage,
|
||||||
overlay,
|
|
||||||
splashService)
|
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 =>
|
builder.Services.AddDbContext<DataContext>(options =>
|
||||||
{
|
{
|
||||||
var MauiDataPath = FileSystem.Current.AppDataDirectory;
|
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);
|
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.AddScoped<IPageFactory, PageFactory>();
|
||||||
builder.Services.AddSingleton<INavigationService, NavigationService>();
|
builder.Services.AddSingleton<INavigationService, NavigationService>();
|
||||||
builder.Services.AddSingleton<IServiceLocator,ServiceLocator>();
|
builder.Services.AddSingleton<IServiceLocator, ServiceLocator>();
|
||||||
builder.Services.AddSingleton<AppShell>();
|
builder.Services.AddSingleton<AppShell>();
|
||||||
|
|
||||||
builder.Services.AddScoped<IRepository<Participant>, ParticipantRepository>();
|
builder.Services.AddScoped<IRepository<Participant>, ParticipantRepository>();
|
||||||
@ -64,7 +64,7 @@ public static class MauiProgram
|
|||||||
builder.Services.AddSingleton<IObjectMessageService, ObjectMessageService>();
|
builder.Services.AddSingleton<IObjectMessageService, ObjectMessageService>();
|
||||||
|
|
||||||
|
|
||||||
builder.Services.AddSingleton<IOverlayService, OverlayService>();
|
//builder.Services.AddSingleton<IOverlayService, OverlayService>();
|
||||||
|
|
||||||
builder.Services.AddSingleton<SplashViewModelCommands>();
|
builder.Services.AddSingleton<SplashViewModelCommands>();
|
||||||
builder.Services.AddSingleton<ISplashService, SplashService>();
|
builder.Services.AddSingleton<ISplashService, SplashService>();
|
||||||
|
|||||||
Reference in New Issue
Block a user