clean up Navgationservices Navbar
This commit is contained in:
@@ -13,9 +13,9 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||
|
||||
public AddTournamentViewModel(TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore, NavigationStore navigationStore,SelectedTournamentsStore selectedTournamentsStore)
|
||||
public AddTournamentViewModel(TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
ICommand submitCommand = new AddTournamentCommand(this, tournamentStore,modalNavigationStore,navigationStore, selectedTournamentsStore);
|
||||
ICommand submitCommand = new AddTournamentCommand(this, tournamentStore,modalNavigationStore);
|
||||
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(submitCommand, cancelCommand);
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ namespace Apollon.WPF.ViewModels
|
||||
public NavBarPreparationViewModel NavBarPreparationViewModel { get; }
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
|
||||
public GroupsViewModel(NavBarPreparationViewModel navBarPreparationViewModel, SelectedTournamentsStore selectedTournamentStore, NavigationStore navigationStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore, NavigationService<GroupsViewModel> groupNavigationService)
|
||||
public GroupsViewModel(NavBarPreparationViewModel navBarPreparationViewModel, SelectedTournamentsStore selectedTournamentStore, NavigationService<OverviewViewModel> overviewNavigationService)
|
||||
{
|
||||
TournamentDetailsViewModel = new TournamentDetailsViewModel(selectedTournamentStore);
|
||||
|
||||
NavBarPreparationViewModel = navBarPreparationViewModel;
|
||||
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(new NavigationService<OverviewViewModel>(navigationStore, () => OverviewViewModel.LoadViewModel(selectedTournamentStore, modalNavigationStore, tournamentsStore, navigationStore, groupNavigationService)));
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(overviewNavigationService);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,25 +46,24 @@ namespace Apollon.WPF.ViewModels
|
||||
public ICommand NavigateNameListCommand { get; }
|
||||
|
||||
public OverviewViewModel(TournamentsStore tournamentStore, SelectedTournamentsStore selectedTournamentStore,
|
||||
ModalNavigationStore modalNavigationStore, NavigationStore navigationStore, NavigationService<GroupsViewModel> groupNavigationService)
|
||||
ModalNavigationStore modalNavigationStore, NavigationService<GroupsViewModel> groupNavigationService, NavigationService<NameListViewModel> NameListNavigationService)
|
||||
{
|
||||
OverviewListingViewModel = new OverviewListingViewModel(selectedTournamentStore, modalNavigationStore, tournamentStore);
|
||||
OverviewDetailsViewModel = new OverviewDetailsViewModel(selectedTournamentStore ,groupNavigationService);
|
||||
|
||||
LoadTournamentsCommand = new LoadTournamentsCommand(this, tournamentStore);
|
||||
OpenAddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore, navigationStore, selectedTournamentStore);
|
||||
NavigateNameListCommand = new NavigateCommand<NameListViewModel>(new NavigationService<NameListViewModel>(
|
||||
navigationStore, () => new NameListViewModel()));
|
||||
OpenAddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore);
|
||||
NavigateNameListCommand = new NavigateCommand<NameListViewModel>(NameListNavigationService);
|
||||
|
||||
}
|
||||
|
||||
public static OverviewViewModel LoadViewModel(SelectedTournamentsStore selectedTournamentStore,
|
||||
ModalNavigationStore modalNavigationStore,
|
||||
TournamentsStore tournamentStore,
|
||||
NavigationStore navigationStore,
|
||||
NavigationService<GroupsViewModel> groupNavigationService)
|
||||
TournamentsStore tournamentStore,
|
||||
NavigationService<GroupsViewModel> groupNavigationService,
|
||||
NavigationService<NameListViewModel> NameListNavigationService)
|
||||
{
|
||||
OverviewViewModel viewModel = new OverviewViewModel(tournamentStore, selectedTournamentStore, modalNavigationStore, navigationStore, groupNavigationService);
|
||||
OverviewViewModel viewModel = new OverviewViewModel(tournamentStore, selectedTournamentStore, modalNavigationStore,groupNavigationService, NameListNavigationService);
|
||||
|
||||
viewModel.LoadTournamentsCommand.Execute(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user