diff --git a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundStartingViewModel.cs b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundStartingViewModel.cs index a657911..d9b5e93 100644 --- a/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundStartingViewModel.cs +++ b/GreadyPoang.ViewModelLayer/ViewModelClasses/RoundStartingViewModel.cs @@ -22,7 +22,8 @@ public class RoundStartingViewModel : ViewModelBase ICombinedRepository combined, IObjectMessageService objectMessage, INavigationService nav, - IPageFactory factory) : base() + IPageFactory factory, + ISplashService splashService) : base() { _roundsRepo = roundsRepo; _pointsRepo = pointsRepo; @@ -31,6 +32,7 @@ public class RoundStartingViewModel : ViewModelBase _objectMessage = objectMessage; _nav = nav; _factory = factory; + _splashService = splashService; _roundElements = new ObservableCollection(); } @@ -46,6 +48,7 @@ public class RoundStartingViewModel : ViewModelBase private readonly IObjectMessageService _objectMessage; private readonly INavigationService _nav; private readonly IPageFactory _factory; + private readonly ISplashService _splashService; private Participant _selectedItem; private ObservableCollection _roundElements; @@ -238,16 +241,18 @@ public class RoundStartingViewModel : ViewModelBase RoundElements.Clear(); } - public void RoundSelected(RoundBuilderElement element) + public async void RoundSelected(RoundBuilderElement element) { var rbGroup = GameRoundList.FirstOrDefault(g => g.GameRoundId == element.GameRoundId); Debug.WriteLine($"Du valde raden med Runda {element.GameRoundId} och spelare: {element.ParticipantName}"); if (rbGroup != null) { _objectMessage.CurrentGroup = rbGroup; - //Shell.Current.GoToAsync("//RoundRunningPage"); - var page = _factory.CreateRoundPage(); - _nav.NavigateToPageAsync(page); + await _splashService.ShowSplash("Runda vald, gå till\r 'Påbörja eller fortsätt Runda'", 3000); + // await Shell.Current.GoToAsync("RoundRunning"); + + //var page = _factory.CreateRoundPage(); + //await _nav.NavigateToPageAsync(page); } } diff --git a/GreadyPoang/AppShell.xaml b/GreadyPoang/AppShell.xaml index 9e3d921..8102721 100644 --- a/GreadyPoang/AppShell.xaml +++ b/GreadyPoang/AppShell.xaml @@ -16,11 +16,14 @@ Title="Home" ContentTemplate="{DataTemplate local:MainPage}" Route="MainPage" /> + Title="Deltagare" ContentTemplate="{DataTemplate pages:ParticipantListPage}" + Route="Deltagare"/> + Title="Ny Runda" ContentTemplate="{DataTemplate pages:RoundStartingPage}" + Route="RoundStart"/> + Title="Påbörja eller fortsätt Runda" ContentTemplate="{DataTemplate pages:RoundRunningPage}" + Route="RoundRunning"/>