private void System_count_Click(object sender, EventArgs e) { if (onCount != null) { onCount(); } if ((!system_active) && (tvlData.gametype != 0) && (tvlData.players.Count >= 2)) { system_active = true; allowed_next = true; Addbutton.Enabled = false; switch (tvlData.gametype) { case 1: rt = new Round_table(tvlData.players.Count); Nextbutton.Visible = false; winget_button.Width = 238; break; case 2: ot = new Olympic_table(tvlData.players.Count); break; case 3: st = new Swiss_table(); break; case 4: mt = new Mixed_table(); break; } SystemResults_listBox.Items.AddRange(tvlData.counted.ToArray()); if (tvlData.gametype != 1) { Tour_numericUpDown.Value = 1; } Refresh_playerstable(); System_count_btn.Enabled = false; Del_button.Enabled = false; System_count_btn.Visible = false; save_data(); refresh_game_table(); } else { данныеТурнираToolStripMenuItem.PerformClick(); } }
public void restore() { switch (tvlData.gametype) { case 1: break; case 2: ot = new Olympic_table(SystemResults_listBox.Items.Count); break; case 3: st = new Swiss_table(SystemResults_listBox.Items.Count); break; case 4: mt = new Mixed_table(SystemResults_listBox.Items.Count); break; } game.lastid = tvlData.games.Last().id; allowed_next = true; System_count_btn.Visible = false; Nextbutton.Enabled = true; }