first NavBar finish
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Apollon.WPF.Stores;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -8,10 +9,12 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class ArchersViewModel : ViewModelBase
|
||||
{
|
||||
public TournamentDetailsViewModel TournamentDetailsViewModel { get; }
|
||||
public NavBarPreparationViewModel NavBarPreparationViewModel { get; }
|
||||
|
||||
public ArchersViewModel(NavBarPreparationViewModel navBarPreparationViewModel)
|
||||
public ArchersViewModel(NavBarPreparationViewModel navBarPreparationViewModel, SelectedTournamentsStore selectedTournamentsStore)
|
||||
{
|
||||
TournamentDetailsViewModel = new TournamentDetailsViewModel(selectedTournamentsStore);
|
||||
NavBarPreparationViewModel = navBarPreparationViewModel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Apollon.WPF.Stores;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -8,10 +9,12 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class ClassesViewModel : ViewModelBase
|
||||
{
|
||||
public TournamentDetailsViewModel TournamentDetailsViewModel { get; }
|
||||
public NavBarPreparationViewModel NavBarPreparationViewModel { get; }
|
||||
|
||||
public ClassesViewModel(NavBarPreparationViewModel navBarPreparationViewModel)
|
||||
public ClassesViewModel(NavBarPreparationViewModel navBarPreparationViewModel, SelectedTournamentsStore selectedTournamentsStore)
|
||||
{
|
||||
TournamentDetailsViewModel = new TournamentDetailsViewModel(selectedTournamentsStore);
|
||||
NavBarPreparationViewModel = navBarPreparationViewModel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,11 +18,13 @@ namespace Apollon.WPF.ViewModels
|
||||
public NavBarPreparationViewModel NavBarPreparationViewModel { get; }
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
|
||||
public GroupsViewModel(SelectedTournamentsStore selectedTournamentStore, NavigationStore navigationStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
|
||||
public GroupsViewModel(NavBarPreparationViewModel navBarPreparationViewModel, SelectedTournamentsStore selectedTournamentStore, NavigationStore navigationStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore, NavigationService<GroupsViewModel> groupNavigationService)
|
||||
{
|
||||
TournamentDetailsViewModel = new TournamentDetailsViewModel(selectedTournamentStore);
|
||||
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(new NavigationService<OverviewViewModel>(navigationStore, () => OverviewViewModel.LoadViewModel(selectedTournamentStore, modalNavigationStore, tournamentsStore, navigationStore)));
|
||||
|
||||
NavBarPreparationViewModel = navBarPreparationViewModel;
|
||||
|
||||
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(new NavigationService<OverviewViewModel>(navigationStore, () => OverviewViewModel.LoadViewModel(selectedTournamentStore, modalNavigationStore, tournamentsStore, navigationStore, groupNavigationService)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class NavBarPreparationViewModel : ViewModelBase
|
||||
{
|
||||
public ICommand NavigateOverviewCommand { get;}
|
||||
public ICommand NavigateOverviewCommand { get; }
|
||||
public ICommand NavigateGroupsCommand { get;}
|
||||
public ICommand NavigateClassesCommand { get;}
|
||||
public ICommand NavigateArchersCommand { get;}
|
||||
|
||||
@@ -30,14 +30,13 @@ namespace Apollon.WPF.ViewModels
|
||||
|
||||
public ICommand NavigatePreparationCommand { get; }
|
||||
|
||||
public OverviewDetailsViewModel(SelectedTournamentsStore selectedTournamentStore, NavigationStore navigationStore, ModalNavigationStore modalNavigationStore,TournamentsStore tournamentsStore)
|
||||
public OverviewDetailsViewModel(SelectedTournamentsStore selectedTournamentStore, NavigationService<GroupsViewModel> groupNavigationService)
|
||||
{
|
||||
_selectedTournamentStore = selectedTournamentStore;
|
||||
|
||||
_selectedTournamentStore.SelectedTournamentChanged += SelectedTournamentStore_SelectedTournamentChanged;
|
||||
|
||||
NavigatePreparationCommand = new NavigateCommand<GroupsViewModel>(new NavigationService<GroupsViewModel> (
|
||||
navigationStore, () => new GroupsViewModel( _selectedTournamentStore, navigationStore, modalNavigationStore, tournamentsStore)));
|
||||
NavigatePreparationCommand = new NavigateCommand<GroupsViewModel>(groupNavigationService);
|
||||
}
|
||||
|
||||
protected override void Dispose()
|
||||
|
||||
@@ -46,10 +46,10 @@ namespace Apollon.WPF.ViewModels
|
||||
public ICommand NavigateNameListCommand { get; }
|
||||
|
||||
public OverviewViewModel(TournamentsStore tournamentStore, SelectedTournamentsStore selectedTournamentStore,
|
||||
ModalNavigationStore modalNavigationStore, NavigationStore navigationStore)
|
||||
ModalNavigationStore modalNavigationStore, NavigationStore navigationStore, NavigationService<GroupsViewModel> groupNavigationService)
|
||||
{
|
||||
OverviewListingViewModel = new OverviewListingViewModel(selectedTournamentStore, modalNavigationStore, tournamentStore);
|
||||
OverviewDetailsViewModel = new OverviewDetailsViewModel(selectedTournamentStore ,navigationStore, modalNavigationStore,tournamentStore);
|
||||
OverviewDetailsViewModel = new OverviewDetailsViewModel(selectedTournamentStore ,groupNavigationService);
|
||||
|
||||
LoadTournamentsCommand = new LoadTournamentsCommand(this, tournamentStore);
|
||||
OpenAddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore, navigationStore, selectedTournamentStore);
|
||||
@@ -61,9 +61,10 @@ namespace Apollon.WPF.ViewModels
|
||||
public static OverviewViewModel LoadViewModel(SelectedTournamentsStore selectedTournamentStore,
|
||||
ModalNavigationStore modalNavigationStore,
|
||||
TournamentsStore tournamentStore,
|
||||
NavigationStore navigationStore)
|
||||
NavigationStore navigationStore,
|
||||
NavigationService<GroupsViewModel> groupNavigationService)
|
||||
{
|
||||
OverviewViewModel viewModel = new OverviewViewModel(tournamentStore, selectedTournamentStore, modalNavigationStore, navigationStore);
|
||||
OverviewViewModel viewModel = new OverviewViewModel(tournamentStore, selectedTournamentStore, modalNavigationStore, navigationStore, groupNavigationService);
|
||||
|
||||
viewModel.LoadTournamentsCommand.Execute(null);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user