Nu fungerar hanteringen kring navigation
This commit is contained in:
@ -24,7 +24,8 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
IMethodSharingService<Participant> sharingService,
|
||||
ICombinedRepository combined,
|
||||
IObjectMessageService objectMessage,
|
||||
ISplashService splashService
|
||||
ISplashService splashService,
|
||||
AppShellViewModel appShell
|
||||
) : base()
|
||||
{
|
||||
_roundsRepo = roundsRepo;
|
||||
@ -33,6 +34,7 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
_combined = combined;
|
||||
_objectMessage = objectMessage;
|
||||
_splashService = splashService;
|
||||
_appShell = appShell;
|
||||
_roundElements = new ObservableCollection<RoundBuilderElement>();
|
||||
_builderObject = new();
|
||||
_SplashShowing = false;
|
||||
@ -47,6 +49,7 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
private readonly ICombinedRepository _combined;
|
||||
private readonly IObjectMessageService _objectMessage;
|
||||
private readonly ISplashService _splashService;
|
||||
private readonly AppShellViewModel _appShell;
|
||||
private ObservableCollection<RoundBuilderGroup> _GameRoundList = new();
|
||||
private ObservableCollection<Participant> _ParticipantList = new();
|
||||
private ObservableCollection<RoundBuilderElement> _roundElements;
|
||||
@ -89,6 +92,18 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
}
|
||||
}
|
||||
|
||||
private bool _gobackVisible = true;
|
||||
|
||||
public bool GobackVisible
|
||||
{
|
||||
get { return _gobackVisible; }
|
||||
set
|
||||
{
|
||||
_gobackVisible = value;
|
||||
RaisePropertyChanged(nameof(GobackVisible));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ObservableCollection<RoundBuilderElement> Get()
|
||||
{
|
||||
@ -97,6 +112,8 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
|
||||
if (_objectMessage.CurrentGroup != null)
|
||||
{
|
||||
GobackVisible = _objectMessage.Delivered;
|
||||
_objectMessage.Delivered = false;
|
||||
//CurrentGroup är satt från RoundStarting ViewModel
|
||||
Debug.WriteLine($"Chosen round: {_objectMessage.CurrentGroup.GameRoundId}");
|
||||
if (RoundElements.Count > 0)
|
||||
@ -271,6 +288,11 @@ public class RoundRunningViewModel : ViewModelBase
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void GobackAsync()
|
||||
{
|
||||
_appShell.RoundRunningVisible = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user