summaryrefslogtreecommitdiff
path: root/Aktywator/ChooseTournament.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator/ChooseTournament.cs')
-rw-r--r--Aktywator/ChooseTournament.cs10
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();
}
}