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
2022-04-06 11:15:55 +02:00

29 lines
No EOL
655 B
C#

using System;
using System.Runtime.InteropServices;
using System.Windows;
using Tetris.ViewsModels;
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();
}
}