Tournament Dashboard fixed, started to wire up tournamentviewer form

This commit is contained in:
2020-04-12 21:17:01 +02:00
parent dee234408d
commit 8d3e6fdfa4
11 changed files with 294 additions and 29 deletions

View File

@ -7,14 +7,37 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using TrackerLibrary;
using TrackerLibrary.Models;
namespace TrackerUI
{
public partial class TournamentDashboardForm : Form
{
List<TournamentModel> tournaments = GlobalConfig.Connection.GetTournament_All();
public TournamentDashboardForm()
{
InitializeComponent();
WireUpLists();
}
private void WireUpLists()
{
loadExistingTournamentDropDown.DataSource = tournaments;
loadExistingTournamentDropDown.DisplayMember = "TournamentName";
}
private void createTournamentButton_Click(object sender, EventArgs e)
{
CreateTournamentForm frm = new CreateTournamentForm();
frm.Show();
}
private void loadTournamentButton_Click(object sender, EventArgs e)
{
TournamentModel tm = (TournamentModel)loadExistingTournamentDropDown.SelectedItem;
TournamentViewerForm frm = new TournamentViewerForm(tm);
frm.Show();
}
}
}