clean up Navgationservices Navbar

This commit is contained in:
Natlinux
2023-02-05 20:40:46 +01:00
parent 7ac59d15b3
commit 4ef5f60ca0
6 changed files with 30 additions and 58 deletions

View File

@@ -2,29 +2,22 @@
using Apollon.WPF.Stores;
using Apollon.WPF.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Apollon.WPF.Commands
{
public class AddTournamentCommand : AsyncCommandBase
{
private readonly TournamentsStore _tournamentStore;
private readonly NavigationStore _navigationStore;
private readonly ModalNavigationStore _modalNavigationStore;
private readonly SelectedTournamentsStore _selectedTournamentsStore;
private readonly TournamentsStore _tournamentStore;
private readonly ModalNavigationStore _modalNavigationStore;
private AddTournamentViewModel _addTournamentViewModel;
public AddTournamentCommand(AddTournamentViewModel addTournamentViewModel, TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore, NavigationStore navigationStore, SelectedTournamentsStore selectedTournamentsStore)
public AddTournamentCommand(AddTournamentViewModel addTournamentViewModel, TournamentsStore tournamentStore, ModalNavigationStore modalNavigationStore)
{
_addTournamentViewModel = addTournamentViewModel;
_tournamentStore = tournamentStore;
_modalNavigationStore = modalNavigationStore;
_navigationStore = navigationStore;
_selectedTournamentsStore = selectedTournamentsStore;
_modalNavigationStore = modalNavigationStore;
}
public override async Task ExecuteAsync(object parameter)
@@ -51,8 +44,7 @@ namespace Apollon.WPF.Commands
{
await _tournamentStore.Add(tournament);
_modalNavigationStore.Close();
//_navigationStore.CurrentViewModel = new GroupsViewModel(_selectedTournamentsStore, _navigationStore, _modalNavigationStore, _tournamentStore);
_modalNavigationStore.Close();
}
catch (Exception)