Open/Close AddTournamentModal
This commit is contained in:
@@ -95,8 +95,15 @@ namespace Apollon.WPF.ViewModels
|
||||
}
|
||||
|
||||
public bool CanSubmit => !string.IsNullOrEmpty(Tournamentname);
|
||||
|
||||
public ICommand SubmitCommand { get; }
|
||||
public ICommand CancelCommand { get; }
|
||||
|
||||
public AddEditDetailsViewModel(ICommand submitCommand, ICommand cancelCommand)
|
||||
{
|
||||
SubmitCommand = submitCommand;
|
||||
CancelCommand = cancelCommand;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
using System;
|
||||
using Apollon.WPF.Commands;
|
||||
using Apollon.WPF.Stores;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
@@ -10,9 +13,10 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||
|
||||
public AddTournametViewModel()
|
||||
public AddTournametViewModel(ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel();
|
||||
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(null, cancelCommand);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,17 +1,22 @@
|
||||
using System;
|
||||
using Apollon.WPF.Commands;
|
||||
using Apollon.WPF.Stores;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public class EditTournamentViewModel : ViewModelBase
|
||||
{
|
||||
public AddEditDetailsViewModel AddEditDetailsViewModel { get; }
|
||||
public EditTournamentViewModel()
|
||||
|
||||
public EditTournamentViewModel(ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel();
|
||||
ICommand cancelCommand = new CloseModalCommand(modalNavigationStore);
|
||||
AddEditDetailsViewModel = new AddEditDetailsViewModel(null, cancelCommand); ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Apollon.WPF.Stores;
|
||||
using Apollon.WPF.Commands;
|
||||
using Apollon.WPF.Stores;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -12,12 +13,15 @@ namespace Apollon.WPF.ViewModels
|
||||
{
|
||||
public OverviewListingViewModel OverviewListingViewModel { get; }
|
||||
public OverviewDetailsViewModel OverviewDetailsViewModel{ get; }
|
||||
|
||||
public ICommand AddTournamentCommand { get; }
|
||||
|
||||
public OverviewViewModel(SelectedTournamentStore _selectedTournamentStore)
|
||||
public OverviewViewModel(SelectedTournamentStore _selectedTournamentStore, ModalNavigationStore modalNavigationStore)
|
||||
{
|
||||
OverviewListingViewModel = new OverviewListingViewModel(_selectedTournamentStore);
|
||||
OverviewDetailsViewModel = new OverviewDetailsViewModel(_selectedTournamentStore);
|
||||
|
||||
AddTournamentCommand = new OpenAddTournamentCommand(modalNavigationStore);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user