Esempio n. 1
0
 public HlavneOkno()
 {
     InitializeComponent();
     this.ClientSize = new Size(800, 600);
     ponuka          = new HlavnaPonuka();
     ponuka.Parent   = this;
     ponuka.Dock     = DockStyle.Fill;
     ponuka.Show();
     ponuka.PolozkaVybrana += Ponuka_PolozkaVybrana;
 }
Esempio n. 2
0
        private void Ponuka_PolozkaVybrana(PolozkyPonuky p)
        {
            switch (p)
            {
            case PolozkyPonuky.NovaHra:
                ponuka.Dispose();
                ponuka = null;
                NastartujHru();
                break;

            case PolozkyPonuky.Koniec:
                Application.Exit();
                break;
            }
        }