Observable properties och RelayCommands införda
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
using Common.Library;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using GreadyPoang.DataLayer;
|
||||
using GreadyPoang.EntityLayer;
|
||||
using GreadyPoang.Services;
|
||||
@ -98,8 +99,8 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
return RoundElements;
|
||||
}
|
||||
|
||||
|
||||
public void StoreAndHandlePoints()
|
||||
[RelayCommand]
|
||||
private void StoreAndHandlePointsAsync()
|
||||
{
|
||||
var game = _roundsRepo.Get(BuilderObject.GameRoundId).GetAwaiter().GetResult();
|
||||
var regNr = RoundElements.Count > 0 ? RoundElements.Max(e => e.GameRoundRegNr) + 1 : 1;
|
||||
@ -147,6 +148,8 @@ public partial class RoundRunningViewModel : ObservableObject
|
||||
RoundElements.FirstOrDefault(e => e.ParticipantId == col.PlayerId).GameRegPoints = col.PlayerPoints;
|
||||
}
|
||||
TriggerRebuild();
|
||||
Shell.Current.GoToAsync("..").GetAwaiter().GetResult();
|
||||
|
||||
}
|
||||
|
||||
private int nextPlayerElement()
|
||||
|
||||
Reference in New Issue
Block a user