diff options
author | emkael <emkael@tlen.pl> | 2017-09-19 19:34:11 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-09-19 19:34:11 +0200 |
commit | 57f308f755a8b5107a801e1d0808d1541b3b7968 (patch) | |
tree | 279e07c50886a9aee1b2f7f588033787b691456f /Aktywator/MainForm.cs | |
parent | 4bab40908ea6fc5ccde7801b690442d341a5d6cf (diff) |
Invoking and updating additional info for Teamy tournament
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r-- | Aktywator/MainForm.cs | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index 1942dd2..e254f9a 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -19,6 +19,7 @@ namespace Aktywator private Bws bws; private List<Setting> bwsSettings; private Tournament tournament; + internal static TeamNamesSettings teamNames; private Version BCSVersion; @@ -337,6 +338,7 @@ namespace Aktywator tournament = new RRBTournament(fDialog.FileName); updateTournamentInfo(tournament); } + bTeamsNamesSettings.Visible = false; } catch (Exception ee) { @@ -354,22 +356,27 @@ namespace Aktywator lType.Text = tournament.getTypeLabel(); lSections.Text = tournament.getSectionsNum(); lTables.Text = tournament.getTablesNum(); - syncToolStrip.Visible = true; - namesPanel.Visible = true; - tournament.clearCellLocks(namesGridView); - tournament.displayNameList(namesGridView); - tournament.clearCellLocks(namesGridView); - namesTimer.Enabled = true; if (tournament.GetType().Equals(typeof(TeamyTournament))) { lSkok.Visible = true; numTeamsTableOffset.Visible = true; + bTeamsNamesSettings.Visible = true; + teamNames = new TeamNamesSettings(); + teamNames.initTournament((TeamyTournament)tournament, this); + bTeamsNamesSettings.Text = teamNames.getLabel(); } else { lSkok.Visible = false; numTeamsTableOffset.Visible = false; + bTeamsNamesSettings.Visible = false; } + syncToolStrip.Visible = true; + namesPanel.Visible = true; + tournament.clearCellLocks(namesGridView); + tournament.displayNameList(namesGridView); + tournament.clearCellLocks(namesGridView); + namesTimer.Enabled = true; } else { @@ -528,7 +535,7 @@ namespace Aktywator } } - private void namesTimer_Tick(object sender, EventArgs e) + public void namesTimer_Tick(object sender, EventArgs e) { tournament.displayNameList(namesGridView); } @@ -568,5 +575,9 @@ namespace Aktywator MessageBox.Show("Opcja grupowania zapisów w sektorach (albo osobnego maksowania sektorów) nie może być zaktualizowana w trakcie trwania sesji!", "Ustawienia grupowania zapisów w sektorach", MessageBoxButtons.OK, MessageBoxIcon.Question); } + private void bTeamsNamesSettings_Click(object sender, EventArgs e) + { + teamNames.ShowDialog(); + } } } |