33 lines
999 B
C#
33 lines
999 B
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Windows.Forms;
|
|
using Tech_Demo.Presenter;
|
|
using Tech_Demo.View.Impl;
|
|
|
|
namespace Tech_Demo
|
|
{
|
|
static class Program
|
|
{
|
|
[DllImport("kernel32.dll")]
|
|
static extern bool AttachConsole(int dwProcessId);
|
|
|
|
private const int ATTACH_PARENT_PROCESS = -1;
|
|
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
AttachConsole(ATTACH_PARENT_PROCESS);
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
var mainView = new MainView();
|
|
mainView.Presenter = new MainPresenter(mainView, null);
|
|
Application.Run(mainView);
|
|
// var startNew = Task.Factory.StartNew(() => ("Hello Task"), TaskCreationOptions.LongRunning);
|
|
// Console.WriteLine(startNew.Result);
|
|
|
|
}
|
|
}
|
|
} |