|
@@ -1,6 +1,7 @@
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
|
using System.Linq;
|
|
|
+using System.Threading;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
|
|
@@ -14,10 +15,18 @@ namespace DWZB_Agv_Agreement
|
|
|
[STAThread]
|
|
|
static void Main()
|
|
|
{
|
|
|
- Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
|
|
- Application.EnableVisualStyles();
|
|
|
- Application.SetCompatibleTextRenderingDefault(false);
|
|
|
- Application.Run(new Form1());
|
|
|
+ _ = new Mutex(true, "DRM2", out bool canCreateNew);
|
|
|
+ if (canCreateNew)
|
|
|
+ {
|
|
|
+ Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
|
|
+ Application.EnableVisualStyles();
|
|
|
+ Application.SetCompatibleTextRenderingDefault(false);
|
|
|
+ Application.Run(new Form1());
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("³ÌÐòÒѾÔËÐУ¡£¡");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|