diff options
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r-- | Aktywator/MainForm.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index 602a260..40ebb2d 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -74,11 +74,31 @@ namespace Aktywator this.bwsSettings.Add(new Setting("BM2ShowPlayerNames", this.xShowPlayerNames, bws, new Version(2, 0, 0), new Version(1, 3, 1))); bindSettingChanges(); bws.loadSettings(); - syncToolStrip.Visible = false; - namesPanel.Visible = false; + + tournament = this.detectTeamyTournament(); + if (tournament != null) + { + updateTournamentInfo(tournament); + } + else + { + syncToolStrip.Visible = false; + namesPanel.Visible = false; + } + this.WindowState = FormWindowState.Normal; } + private Tournament detectTeamyTournament() + { + string name = bws.getMySQLDatabaseForSection(); + if (name != null) + { + return new TeamyTournament(name); + } + return null; + } + private void fillSectionSelector(string sections) { cbSettingsSection.SelectedIndex = 0; |