1using CommunityToolkit.Mvvm.ComponentModel;
2using System.Windows.Data;
31 if (SetProperty(ref _resultType, value))
33 updatePersonsAndPlaces();
61 _scoreService = scoreService;
63 updatePersonsAndPlaces();
69 updatePersonsAndPlaces();
77 private void updatePersonsAndPlaces()
ResultsViewModel(IScoreService scoreService)
Constructor of the results view model.
List< PersonStart > PodiumSilverStarts
List with all starts on the silver podium place (second highest scores)
List< PersonStart > PodiumBronzeStarts
List with all starts on the bronze podium place (third highest scores)
List< PersonStart > PodiumGoldStarts
List with all starts on the gold podium place (highest scores)
ResultTypes ResultType
Type of result to view.
void OnNavigatedFrom()
OnNavigatedFrom method to handle navigation away from this object.
List< Person > _sortedPersons
List with all persons sorted by score.
void OnNavigatedTo(object parameter)
OnNavigatedTo method to handle navigation to this object.
Interface for objects that need to handle navigation events.
Interface for a service used to calculate the scores for all persons.
List< Person > GetPersonsSortedByScore(ResultTypes resultType=ResultTypes.Overall, bool onlyActivePersons=true)
Get all persons, sort them depending on the requested ResultTypes and return as new list.
void UpdateResultListPlacesForAllPersons()
Update the result list places for all Person.
ResultTypes
Available result types.
ResultPodiumsPlaces
Available result podium types.