Nu fungerar splash, men måste se vidare på övrig sidhantering
This commit is contained in:
@ -1,10 +1,10 @@
|
||||
using Common.Library;
|
||||
using GreadyPoang.Core;
|
||||
using GreadyPoang.DataLayer;
|
||||
using GreadyPoang.EntityLayer;
|
||||
using GreadyPoang.Services;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using GreadyPoang.Core;
|
||||
|
||||
namespace GreadyPoang.ViewModelLayer;
|
||||
|
||||
@ -24,7 +24,8 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
IMethodSharingService<Participant> sharingService,
|
||||
ICombinedRepository combined,
|
||||
IObjectMessageService objectMessage,
|
||||
IOverlayService overlay
|
||||
IOverlayService overlay,
|
||||
ISplashService splashService
|
||||
) : base()
|
||||
{
|
||||
_roundsRepo = roundsRepo;
|
||||
@ -33,16 +34,22 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
_combined = combined;
|
||||
_objectMessage = objectMessage;
|
||||
_overlay = overlay;
|
||||
_splashService = splashService;
|
||||
_roundElements = new ObservableCollection<RoundBuilderElement>();
|
||||
_builderObject = new();
|
||||
_SplashShowing = false;
|
||||
|
||||
}
|
||||
|
||||
private bool _SplashShowing;
|
||||
|
||||
private readonly IRepository<GameRound>? _roundsRepo;
|
||||
private readonly IRepository<GamePoint> _pointsRepo;
|
||||
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();
|
||||
private ObservableCollection<RoundBuilderElement> _roundElements;
|
||||
@ -89,7 +96,7 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
public ObservableCollection<RoundBuilderElement> Get()
|
||||
{
|
||||
|
||||
_overlay.ShowSplash("Laddar...", 3000);
|
||||
//_overlay.ShowSplash("Laddar...", 30);
|
||||
|
||||
if (_objectMessage.CurrentGroup != null)
|
||||
{
|
||||
@ -251,6 +258,22 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
public async void ToggleSplash()
|
||||
{
|
||||
|
||||
if (!_SplashShowing)
|
||||
{
|
||||
//_overlay.ShowSplash("Clcicked!", 5000);
|
||||
await _splashService.ShowSplash("Clicked", 0);
|
||||
_SplashShowing = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
await _splashService.HideAsync();
|
||||
_SplashShowing = false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user