public HlavniOkno() { InitializeComponent(); _nastaveni = new Nastaveni(); backgroundWorker = new BackgroundWorker { WorkerSupportsCancellation = true, WorkerReportsProgress = true }; backgroundWorker.ProgressChanged += WorkerProgressChanged; backgroundWorker.DoWork += WorkerMakej; backgroundWorker.RunWorkerCompleted += WorkerDomakal; _worker = backgroundWorker; HraciDeska = new HraciDeska(); VytvorHraciPlochu(); }
private void NováHraToolStripMenuItem_Click(object sender, EventArgs e) { var noveNastaveni = new Nastaveni { UlozitNastaveniEnabled = false, NovaHraEnabled = true }; noveNastaveni.ShowDialog(); if (noveNastaveni.Result != DialogResult.OK) { return; } _nastaveni = noveNastaveni; VytvorNovouHru(); NastavHru(true); nastaveníToolStripMenuItem.Enabled = true; }