stand 06.11.2022

This commit is contained in:
Natlinux
2022-11-06 21:21:20 +01:00
parent 38a5d57b25
commit a18158806c
12 changed files with 85 additions and 26 deletions

View File

@@ -33,7 +33,7 @@ namespace Apollon.WPF.ViewModels
_selectedTournamentStore.SelectedTournamentChanged += SelectedTournamentStore_SelectedTournamentChanged;
NavigateNavBarCommand = new NavigateCommand<NavBarViewModel>(navigationStore, () => new NavBarViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
NavigateNavBarCommand = new NavigateCommand<TournamentDetailsViewModel>(navigationStore, () => new TournamentDetailsViewModel(navigationStore, selectedTournamentStore, modalNavigationStore, tournamentsStore));
}
protected override void Dispose()

View File

@@ -47,7 +47,8 @@ namespace Apollon.WPF.ViewModels
public bool HasErrorMessage => !string.IsNullOrEmpty(ErrorMessage);
public ICommand AddTournamentCommand { get; }
public ICommand LoadTournamentsCommand { get; }
public ICommand LoadTournamentsCommand { get; }
public ICommand NavigateNameListCommand { get; }
public OverviewViewModel(TournamentsStore tournamentStore, SelectedTournamentsStore selectedTournamentStore,
ModalNavigationStore modalNavigationStore, NavigationStore navigationStore)
@@ -57,6 +58,8 @@ namespace Apollon.WPF.ViewModels
LoadTournamentsCommand = new LoadTournamentsCommand(this, tournamentStore);
AddTournamentCommand = new OpenAddTournamentCommand(tournamentStore, modalNavigationStore, navigationStore, selectedTournamentStore);
NavigateNameListCommand = new NavigateCommand<RootdatesViewModel>(navigationStore, () => new RootdatesViewModel());
}
public static OverviewViewModel LoadViewModel(SelectedTournamentsStore selectedTournamentStore,

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.WPF.ViewModels
{
public class RootdatesViewModel : ViewModelBase
{
}
}

View File

@@ -10,7 +10,7 @@ using System.Windows.Input;
namespace Apollon.WPF.ViewModels
{
public class NavBarViewModel : ViewModelBase
public class TournamentDetailsViewModel : ViewModelBase
{
@@ -28,7 +28,7 @@ namespace Apollon.WPF.ViewModels
public int Rounds => SelectedTournament?.Rounds ?? 0;
public ICommand NavigateOverviewCommand { get; }
public NavBarViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
public TournamentDetailsViewModel(NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore, ModalNavigationStore modalNavigationStore, TournamentsStore tournamentsStore)
{
NavigateOverviewCommand = new NavigateCommand<OverviewViewModel>(navigationStore, () => OverviewViewModel.LoadViewModel( selectedTournamentsStore, modalNavigationStore, tournamentsStore, navigationStore));