This commit is contained in:
chi
2025-04-24 16:24:01 +09:00
parent f71b963851
commit 20dd87a9d0
55 changed files with 961 additions and 1085 deletions

View File

@@ -18,18 +18,13 @@ namespace Project
static void Main()
{
//중복실행방지
var guidAttr = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(GuidAttribute), true);
if (guidAttr != null)
string mutexName = "AGV4_Application_Mutex";
Mutex mtx = new Mutex(true, mutexName);
var success = mtx.WaitOne(new TimeSpan(0, 0, 1));
if (success == false)
{
var guida = (GuidAttribute)guidAttr[0];
var guidstr = guida.Value;
Mutex mtx = new Mutex(true, guidstr);
var success = mtx.WaitOne(new TimeSpan(0, 0, 1));
if (success == false)
{
MessageBox.Show("중복실행 불가\n\n프로그램이 실행 중 입니다");
return;
}
MessageBox.Show("Duplicate execution not allowed\n\nProgram is already running");
return;
}
Application.EnableVisualStyles();