17 lines
312 B
C#
17 lines
312 B
C#
using System.Threading;
|
|||
|
|
|
||
|
|
namespace CvMega.Helper;
|
||
|
|
|
||
|
|
public static class MutexControl
|
||
|
|
{
|
||
|
|
public static Mutex currentApp;
|
||
|
|
|
||
|
|
public static bool createdNew;
|
||
|
|
|
||
|
|
public static bool CreateMutex(string mtx)
|
||
|
|
{
|
||
|
|
currentApp = new Mutex(initiallyOwned: false, mtx, out createdNew);
|
||
|
|
return createdNew;
|
||
|
|
}
|
||
|
|
}
|