35 lines
679 B
C#
35 lines
679 B
C#
using System;
|
|
using System.Threading;
|
|
using System.Windows.Forms;
|
|
|
|
namespace StartApp
|
|
{
|
|
static class Program
|
|
{
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
bool createdNew;
|
|
Mutex mutex = new Mutex(true, "shanghua_startapp_UniqueMutex", out createdNew);
|
|
|
|
if (!createdNew)
|
|
{
|
|
MessageBox.Show("程序已经在运行中,请不要重复启动。"
|
|
, "提示"
|
|
, MessageBoxButtons.OK
|
|
, MessageBoxIcon.Information);
|
|
return;
|
|
}
|
|
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
var wnd = new form_Main();
|
|
if (wnd.init())
|
|
{
|
|
//if (!wnd.directStartCAD())
|
|
Application.Run(wnd);
|
|
}
|
|
}
|
|
}
|
|
}
|