コード例 #1
0
 private void LoadMapBtn_Click(object sender, EventArgs e)
 {
     String map;
     map = ReadFile();
     if (myForm == "Game")
     {
         if (mapLoc != null && map != "")
         {
             gf = new GameForm(map);
             gf.Show();
         }
     }
     else if (myForm == "Design")
     {
         if (mapLoc != null && map != "")
         {
             ldf = new LevelDesignForm(map);
             ldf.Show();
         }
     }
     
 }
コード例 #2
0
 private void MapSizeBtn_Click(object sender, EventArgs e)
 {
     if (mapHeight.Text.ToString() == "")
     {
         MessageBox.Show("Please enter Height!");
     }
     else if (mapWidth.Text.ToString() == "")
     {
         MessageBox.Show("Please enter Width!");
     }
     else if (mapWidth.IntValue <= 1 | mapHeight.IntValue <= 1)
     {
         MessageBox.Show("Map Size too small!");
     }
     else
     {
         ldf = new LevelDesignForm(CreateNewMap());
         //MessageBox.Show(CreateNewMap());
         this.Hide();
         ldf.Show();
     }
     
 }