Esempio n. 1
0
 private void button_stage1_Click(object sender, EventArgs e)
 {
     Object[,] map = Map.ReadMap(Environment.CurrentDirectory + @"\..\..\stage\stage1");
     if (!player2)
     {
         Form_game form_game = new Form_game(this, map);
         form_game.Show();
     }
     else
     {
         Form_game_2player form_game = new Form_game_2player(this, map);
         form_game.Show();
     }
     this.Hide();
 }
Esempio n. 2
0
        private void 開啟OToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();

            if (open.ShowDialog() == DialogResult.OK)
            {
                try
                {
                    map = Map.ReadMap(open.FileName);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                setMap();
            }
        }