Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
nivereno committed Sep 5, 2021
1 parent 270e0ec commit 43d8168
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions TrackerUI/CreateTournamentForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 18 additions & 2 deletions TrackerUI/CreateTournamentForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ public CreateTournamentForm()
{
InitializeComponent();

InitializeLists();
WireUpLists();
}

private void InitializeLists()
private void WireUpLists()
{
selectTeamDropDown.DataSource = null;
selectTeamDropDown.DataSource = availableTeams;
selectTeamDropDown.DisplayMember = "TeamName";

tournamentTeamsListBox.DataSource = null;
tournamentTeamsListBox.DataSource = selectedTeams;
tournamentTeamsListBox.DisplayMember = "TeamName";

prizesListBox.DataSource = null;
prizesListBox.DataSource = selectedPrizes;
prizesListBox.DisplayMember = "PlaceName";
}
Expand All @@ -41,5 +44,18 @@ private void deleteSelectedPrizeButton_Click(object sender, EventArgs e)
{

}

private void addTeamButton_Click(object sender, EventArgs e)
{
TeamModel t = (TeamModel)selectTeamDropDown.SelectedItem;

if (t != null)
{
availableTeams.Remove(t);
selectedTeams.Add(t);

WireUpLists();
}
}
}
}

0 comments on commit 43d8168

Please sign in to comment.