forked from Veinsvx/eudicPro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
35 lines (33 loc) · 976 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
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace oulupor
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
Mutex m = new Mutex(false, "Product_Index_Cntvs", out bool bCreatedNew);
if(bCreatedNew)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
else
{
MessageBox.Show("应用程序已经在运行中...");
System.Threading.Thread.Sleep(600);
// 终止此进程并为基础操作系统提供指定的退出代码。
System.Environment.Exit(1);
}
}
}
}