summaryrefslogtreecommitdiff
path: root/Aktywator/MainForm.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-08-23 17:18:38 +0200
committeremkael <emkael@tlen.pl>2017-08-23 17:18:38 +0200
commit7a496566f759a5aac8b56d46c1b9eb36bdcb3f52 (patch)
tree46cc61cb4764af626a59f3236a9c9e7f75c02a1c /Aktywator/MainForm.cs
parent6ad488f28bfd74c39be0c420a671b7c33f9250d6 (diff)
Editor for BWS names
Diffstat (limited to 'Aktywator/MainForm.cs')
-rw-r--r--Aktywator/MainForm.cs25
1 files changed, 23 insertions, 2 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index 3cf660a..4eec352 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -73,6 +73,7 @@ namespace Aktywator
bindSettingChanges();
bws.loadSettings();
syncToolStrip.Visible = false;
+ namesPanel.Visible = false;
this.WindowState = FormWindowState.Normal;
}
@@ -339,6 +340,11 @@ namespace Aktywator
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;
@@ -361,7 +367,7 @@ namespace Aktywator
{
try
{
- bws.syncNames(tournament, true, eOomRounds.Text);
+ bws.syncNames(tournament, true, eOomRounds.Text, namesGridView);
}
catch (Exception ee)
{
@@ -416,7 +422,7 @@ namespace Aktywator
private void timer_Tick(object sender, EventArgs e)
{
- bws.syncNames(tournament, false, eOomRounds.Text);
+ bws.syncNames(tournament, false, eOomRounds.Text, namesGridView);
}
private void bForceSync_Click(object sender, EventArgs e)
@@ -497,5 +503,20 @@ namespace Aktywator
lOomLabel.Enabled = toolStripButton2.Checked;
}
+ private void namesGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e)
+ {
+ if (e.RowIndex > -1 && e.ColumnIndex > 0)
+ {
+ DataGridViewCell cell = namesGridView.Rows[e.RowIndex].Cells[e.ColumnIndex];
+ cell.Tag = true;
+ cell.Style.BackColor = Color.Yellow;
+ }
+ }
+
+ private void namesTimer_Tick(object sender, EventArgs e)
+ {
+ tournament.displayNameList(namesGridView);
+ }
+
}
}