Stor ombearbetning som skall ge splash möjligheter

This commit is contained in:
2025-10-01 08:38:42 +02:00
parent f2403d5cf3
commit f1077febc4
38 changed files with 548 additions and 98 deletions

View File

@ -1,4 +1,5 @@
using Common.Library;
using GreadyPoang.Core;
using GreadyPoang.DataLayer;
using GreadyPoang.EntityLayer;
using GreadyPoang.Services;
@ -12,7 +13,6 @@ public class RoundStartingViewModel : ViewModelBase
#region Constructors
public RoundStartingViewModel() : base()
{
}
public RoundStartingViewModel(
@ -20,13 +20,17 @@ public class RoundStartingViewModel : ViewModelBase
IRepository<GamePoint> pointsRepo,
IMethodSharingService<Participant> sharingService,
ICombinedRepository combined,
IObjectMessageService objectMessage) : base()
IObjectMessageService objectMessage,
INavigationService nav,
IPageFactory factory) : base()
{
_roundsRepo = roundsRepo;
_pointsRepo = pointsRepo;
_sharingService = sharingService;
_combined = combined;
_objectMessage = objectMessage;
_nav = nav;
_factory = factory;
_roundElements = new ObservableCollection<RoundBuilderElement>();
}
@ -40,6 +44,8 @@ public class RoundStartingViewModel : ViewModelBase
private readonly IMethodSharingService<Participant> _sharingService;
private readonly ICombinedRepository _combined;
private readonly IObjectMessageService _objectMessage;
private readonly INavigationService _nav;
private readonly IPageFactory _factory;
private Participant _selectedItem;
private ObservableCollection<RoundBuilderElement> _roundElements;
@ -239,10 +245,13 @@ public class RoundStartingViewModel : ViewModelBase
if (rbGroup != null)
{
_objectMessage.CurrentGroup = rbGroup;
Shell.Current.GoToAsync("//RoundRunningView");
//Shell.Current.GoToAsync("//RoundRunningPage");
var page = _factory.CreateRoundPage();
_nav.NavigateToPageAsync(page);
}
}
public void SelectNewlyAddedParticipant(RoundBuilderElement roundBuilder)
{
Debug.WriteLine($"Du valde raden med Runda {roundBuilder.GameRoundId} och spelare: {roundBuilder.ParticipantName}");