The new WPF UI Can run and show existing Tournaments
This commit is contained in:
@ -4,10 +4,45 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using TrackerLibrary;
|
||||
using TrackerLibrary.Models;
|
||||
|
||||
namespace TrackerWPFUI.ViewModels
|
||||
{
|
||||
public class ShellViewModel:Conductor<object>
|
||||
public class ShellViewModel : Conductor<object>
|
||||
{
|
||||
|
||||
public ShellViewModel()
|
||||
{
|
||||
// Initialize the database connections
|
||||
GlobalConfig.InitializeConnections(DatabaseType.Sql);
|
||||
_existingTournaments = new BindableCollection<TournamentModel>(GlobalConfig.Connection.GetTournament_All());
|
||||
}
|
||||
public void CreateTournament()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private BindableCollection<TournamentModel> _existingTournaments;
|
||||
|
||||
public BindableCollection<TournamentModel> ExistingTournaments
|
||||
{
|
||||
get { return _existingTournaments; }
|
||||
set { _existingTournaments = value; }
|
||||
}
|
||||
|
||||
private TournamentModel _SelectedTournament;
|
||||
|
||||
public TournamentModel SelectedTournament
|
||||
{
|
||||
get { return _SelectedTournament; }
|
||||
set
|
||||
{
|
||||
_SelectedTournament = value;
|
||||
NotifyOfPropertyChange(() => SelectedTournament);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user