The TournamentViewer is quite ready, just the score-handling is left to wire up
This commit is contained in:
@ -29,13 +29,23 @@ namespace TrackerWPFUI.ViewModels
|
||||
ActivateItem(new CreateTournamentViewModel());
|
||||
}
|
||||
|
||||
public void LoadTournament()
|
||||
{
|
||||
if (SelectedTournament !=null && !string.IsNullOrWhiteSpace(SelectedTournament.TournamentName))
|
||||
{
|
||||
ActivateItem(new TournamentViewerViewModel(SelectedTournament));
|
||||
}
|
||||
}
|
||||
|
||||
public void Handle(TournamentModel message)
|
||||
{
|
||||
// Open the tournamentViewer to the given tournament
|
||||
throw new NotImplementedException();
|
||||
ExistingTournaments.Add(message);
|
||||
SelectedTournament = message;
|
||||
}
|
||||
|
||||
private BindableCollection<TournamentModel> _existingTournaments;
|
||||
private TournamentModel _SelectedTournament;
|
||||
|
||||
public BindableCollection<TournamentModel> ExistingTournaments
|
||||
{
|
||||
@ -43,7 +53,6 @@ namespace TrackerWPFUI.ViewModels
|
||||
set { _existingTournaments = value; }
|
||||
}
|
||||
|
||||
private TournamentModel _SelectedTournament;
|
||||
|
||||
public TournamentModel SelectedTournament
|
||||
{
|
||||
@ -52,9 +61,8 @@ namespace TrackerWPFUI.ViewModels
|
||||
{
|
||||
_SelectedTournament = value;
|
||||
NotifyOfPropertyChange(() => SelectedTournament);
|
||||
LoadTournament();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user