29 lines
No EOL
655 B
C#
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();
|
|
}
|
|
} |