All but the button Create Tournament Wired up

This commit is contained in:
2020-04-06 22:21:02 +02:00
parent af9ee4113d
commit d6f251c822
4 changed files with 26 additions and 9 deletions

View File

@ -96,7 +96,7 @@ namespace TrackerLibrary.DataAccess
public List<TeamModel> GetTeam_All() public List<TeamModel> GetTeam_All()
{ {
throw new NotImplementedException(); return TeamFile.FullFilePath().LoadFile().ConvertToTeamModels(PeopleFile);
} }
} }
} }

View File

@ -205,6 +205,7 @@
this.removeSelectedPrizeButton.TabIndex = 23; this.removeSelectedPrizeButton.TabIndex = 23;
this.removeSelectedPrizeButton.Text = "Remove Selected"; this.removeSelectedPrizeButton.Text = "Remove Selected";
this.removeSelectedPrizeButton.UseVisualStyleBackColor = true; this.removeSelectedPrizeButton.UseVisualStyleBackColor = true;
this.removeSelectedPrizeButton.Click += new System.EventHandler(this.removeSelectedPrizeButton_Click);
// //
// prizesLabel // prizesLabel
// //
@ -240,6 +241,7 @@
this.createTournamentButton.TabIndex = 24; this.createTournamentButton.TabIndex = 24;
this.createTournamentButton.Text = "Create Tournament"; this.createTournamentButton.Text = "Create Tournament";
this.createTournamentButton.UseVisualStyleBackColor = true; this.createTournamentButton.UseVisualStyleBackColor = true;
this.createTournamentButton.Click += new System.EventHandler(this.createTournamentButton_Click);
// //
// CreateTournamentForm // CreateTournamentForm
// //

View File

@ -80,16 +80,31 @@ namespace TrackerUI
private void removeSelectedPlayerButton_Click(object sender, EventArgs e) private void removeSelectedPlayerButton_Click(object sender, EventArgs e)
{ {
TeamModel t = (TeamModel)tournamentTeamsListBox.SelectedItem;
if (t != null)
{
selectedTeams.Remove(t);
availableTeams.Add(t);
//PersonModel p = (PersonModel)teamMembersListBox.SelectedItem; WireUpLists();
}
//if (p != null) }
//{
// selectedTeamMembers.Remove(p); private void removeSelectedPrizeButton_Click(object sender, EventArgs e)
// availableTeamMembers.Add(p); {
PrizeModel p = (PrizeModel)prizesListBox.SelectedItem;
if (p != null)
{
selectedPrizes.Remove(p);
WireUpLists();
}
}
private void createTournamentButton_Click(object sender, EventArgs e)
{
// WireUpLists();
//}
} }
} }
} }

View File

@ -19,7 +19,7 @@ namespace TrackerUI
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
// Initialize the database connections // Initialize the database connections
GlobalConfig.InitializeConnections(DatabaseType.Sql); GlobalConfig.InitializeConnections(DatabaseType.TextFile);
Application.Run(new CreateTournamentForm()); Application.Run(new CreateTournamentForm());
//Application.Run(new TournamentDashboardForm()); //Application.Run(new TournamentDashboardForm());