diff options
author | emkael <emkael@tlen.pl> | 2017-07-30 01:44:48 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-07-30 01:44:48 +0200 |
commit | cfe97d223573c4792e5d42a4443c139fd8c87381 (patch) | |
tree | fc40d2ec06d712c4fbf6832ad894ab120a330402 /Aktywator/ChooseTournament.cs | |
parent | f14238e95bf1a10789585bf7632c5506daecc630 (diff) |
Refactoring MySQL tournament names: generalization
Diffstat (limited to 'Aktywator/ChooseTournament.cs')
-rw-r--r-- | Aktywator/ChooseTournament.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Aktywator/ChooseTournament.cs b/Aktywator/ChooseTournament.cs index 155624b..734b191 100644 --- a/Aktywator/ChooseTournament.cs +++ b/Aktywator/ChooseTournament.cs @@ -34,7 +34,15 @@ namespace Aktywator { if (listBox.SelectedIndex >= 0) { - chosenTournament = turns[listBox.SelectedIndex]; + switch (turns[listBox.SelectedIndex].type) + { + case Tournament.TYPE_PARY: + chosenTournament = new ParyTournament(turns[listBox.SelectedIndex].name); + break; + case Tournament.TYPE_TEAMY: + chosenTournament = new TeamyTournament(turns[listBox.SelectedIndex].name); + break; + } Close(); } } |