Navigate NavBar finished
This commit is contained in:
@@ -15,7 +15,6 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
|
||||
private readonly SelectedTournamentsStore _selectedTournamentsStore;
|
||||
|
||||
private Tournament SelectedTournament => _selectedTournamentsStore.SelectedTournament;
|
||||
|
||||
public bool HasSelectedTournament => SelectedTournament != null;
|
||||
@@ -28,11 +27,10 @@ namespace Apollon.WPF.ViewModels
|
||||
public string Location => SelectedTournament?.Location ?? "kein Ort";
|
||||
public int Rounds => SelectedTournament?.Rounds ?? 0;
|
||||
|
||||
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
public NavBarViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
|
||||
{
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(navigationStore, () => new OverviewViewModel(tournamentsStore, selectedTournamentsStore, modalNavigationStore,navigationStore));
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(navigationStore, () => OverviewViewModel.LoadViewModel( selectedTournamentsStore, modalNavigationStore, tournamentsStore, navigationStore));
|
||||
|
||||
_selectedTournamentsStore = selectedTournamentsStore;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
protected override void Dispose()
|
||||
{
|
||||
_selectedTournamentStore.SelectedTournamentChanged += SelectedTournamentStore_SelectedTournamentChanged;
|
||||
_selectedTournamentStore.SelectedTournamentChanged -= SelectedTournamentStore_SelectedTournamentChanged;
|
||||
|
||||
_tournamentStore.TournamentLoaded -= TournamentStore_TournamentLoaded;
|
||||
_tournamentStore.TournamentAdded -= TournamentStore_TournamentAdded;
|
||||
|
||||
Reference in New Issue
Block a user