Пример #1
0
 private void LoadGamePicture_Click(object sender, EventArgs e)
 {
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         GameMenu game = new GameMenu(SimpleGame.Logic.Game.LoadGame(openFileDialog.FileName));
         this.Hide();
         game.Show();
     }
 }
Пример #2
0
 private void LoadGamePicture_Click(object sender, EventArgs e)
 {
     if (openFileDialog.ShowDialog() == DialogResult.OK)
     {
         var player = game.LoadGame(openFileDialog.FileName);
         GameMenu gameMenu = new GameMenu(game, itemGenerator, player, monsterRepository);
         this.Hide();
         gameMenu.Show();
     }
 }
Пример #3
0
 private void newgame()
 {
     NewGame window = new NewGame();
     if (window.ShowDialog(this) == DialogResult.OK)
     {
         GameMenu game = new GameMenu(SimpleGame.Logic.Game.StartGame(window.CharacterNameTextBox()));
         this.Hide();
         game.Show();
     }
 }
Пример #4
0
 private void newgame()
 {
     NewGame window = new NewGame(game);
     if (window.ShowDialog(this) == DialogResult.OK)
     {
         var player = game.StartGame(window.CharacterNameTextBox());
         GameMenu gameMenu = new GameMenu(game, itemGenerator, player, monsterRepository);
         this.Hide();
         gameMenu.Show();
     }
 }