GameView.xaml.cs 623 B

12345678910111213141516171819202122232425262728
  1. using Windows.UI.Xaml;
  2. using Windows.UI.Xaml.Controls;
  3. using YJMPD_UWP.ViewModels;
  4. namespace YJMPD_UWP.Views
  5. {
  6. public sealed partial class GameView : Page
  7. {
  8. GameVM gamevm;
  9. public GameView()
  10. {
  11. gamevm = new GameVM();
  12. this.DataContext = gamevm;
  13. this.InitializeComponent();
  14. }
  15. private void StartGameButton_Click(object sender, RoutedEventArgs e)
  16. {
  17. App.Game.StartGame();
  18. }
  19. private void StopGameButton_Click(object sender, RoutedEventArgs e)
  20. {
  21. App.Game.StopGame();
  22. }
  23. }
  24. }