Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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;
        }