Files
envi-code/SourceCode/Code2026/StartApp/Program.cs
T
2026-09-28 15:28:50 +08:00

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);
}
}
}
}