Beispiel #1
0
        public void bt_play_Click(object sender, EventArgs e)
        {
            GameForm gf = new GameForm(Saves.Generate((int)this.nUD_height.Value, (int)this.nUD_width.Value, (int)this.nUD_mines.Value));

            this.Hide();
            gf.ShowDialog();
            this.Show();
        }
Beispiel #2
0
        private void bt_load_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Filter           = "Text File | *.txt";
            ofd.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory;
            if (ofd.ShowDialog() == DialogResult.OK)
            {
                var      mezo = Saves.Load(ofd.FileName);
                GameForm gf   = new GameForm(mezo);
                this.Hide();
                gf.ShowDialog();
                this.Show();
            }
        }