Create Tournament screen is wired up an is functioning

This commit is contained in:
2020-05-18 21:29:14 +02:00
parent bcb1a561d4
commit 1207617a7c
8 changed files with 334 additions and 143 deletions

View File

@ -9,22 +9,30 @@ using TrackerLibrary.Models;
namespace TrackerWPFUI.ViewModels
{
public class ShellViewModel : Conductor<object> //ActiveItem in Itemcontrol tells whats going on
public class ShellViewModel : Conductor<object>,IHandle<TournamentModel> //ActiveItem in Itemcontrol tells whats going on
{
public ShellViewModel()
{
// Initialize the database connections
GlobalConfig.InitializeConnections(DatabaseType.Sql);
EventAggregationProvider.TrackerEventAggregator.Subscribe(this);
_existingTournaments = new BindableCollection<TournamentModel>(GlobalConfig.Connection.GetTournament_All());
//ActivateItem(new CreatePrizeViewModel());
//ActivateItem(new CreateTeamViewModel());
//ActivateItem(new CreatePersonViewModel());
ActivateItem(new CreateTournamentViewModel());
}
public void CreateTournament()
{
ActivateItem(new CreateTournamentViewModel());
}
public void Handle(TournamentModel message)
{
// Open the tournamentViewer to the given tournament
throw new NotImplementedException();
}
private BindableCollection<TournamentModel> _existingTournaments;