Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            var game = new Game(0);

            game.GameBegin();
        }
Exemple #2
0
 private void loadOne_Click(object sender, EventArgs e)
 {
     String location = Application.StartupPath;
     String filename = "save1.txt";
     String pathString = System.IO.Path.Combine(location, filename);
     //MessageBox.Show(pathString);
     if (System.IO.File.Exists(pathString))
     {
         System.IO.StreamReader sw = new System.IO.StreamReader(pathString);
         int newTheme = int.Parse(sw.ReadLine());
         MessageBox.Show("Game successfully loaded from " + pathString);
         this.Hide();
         var game = new Game(newTheme);
         game.GameBegin();
     }
     else
     {
         MessageBox.Show("No save file exists in " + pathString);
     }
 }
Exemple #3
0
        private void loadFour_Click(object sender, EventArgs e)
        {
            String location   = Application.StartupPath;
            String filename   = "save4.txt";
            String pathString = System.IO.Path.Combine(location, filename);

            //MessageBox.Show(pathString);
            if (System.IO.File.Exists(pathString))
            {
                System.IO.StreamReader sw = new System.IO.StreamReader(pathString);
                int newTheme = int.Parse(sw.ReadLine());
                MessageBox.Show("Game successfully loaded from " + pathString);
                this.Hide();
                var game = new Game(newTheme);
                game.GameBegin();
            }
            else
            {
                MessageBox.Show("No save file exists in " + pathString);
            }
        }
 private void button1_Click(object sender, EventArgs e)
 {
     this.Hide();
     var game = new Game();
     game.GameBegin();
 }