Archived
1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Tetris/Views/MainWindow.xaml.cs

29 lines
655 B
C#
Raw Normal View History

2022-03-23 08:59:39 +01:00
using System;
2022-04-06 11:15:55 +02:00
using System.Runtime.InteropServices;
2022-03-23 08:59:39 +01:00
using System.Windows;
2022-04-06 11:39:36 +02:00
using Tetris.ViewsModels;
2022-03-23 08:59:39 +01:00
2022-04-06 11:15:55 +02:00
namespace Tetris.Views;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
AttachConsole(-1);
DataContext = new ViewModel();
InitializeComponent();
}
[DllImport("kernel32.dll")]
private static extern bool AttachConsole(int dwProcessId);
private void StartButton_OnClick(object sender, RoutedEventArgs e)
{
Console.WriteLine("Start game...");
new GameWindow().Show();
Close();
2022-03-23 08:59:39 +01:00
}
2022-04-06 11:15:55 +02:00
}