-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
29 lines (29 loc) · 872 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MediaHarbor
{
internal static class Program
{
public static Task<int> WaitForExitAsync(this Process process)
{
var tcs = new TaskCompletionSource<int>();
process.EnableRaisingEvents = true;
process.Exited += (sender, args) => tcs.TrySetResult(process.ExitCode);
return tcs.Task;
}
/// <summary>
/// Uygulamanın ana girdi noktası.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}