public static U_Mutex Instance() { if (null == _mutex) { _mutex = new U_Mutex(); } return(_mutex); }
void OnlyOneCanRun() { string appID = Application.productName; bool isFirst = U_Mutex.Instance().IsFirst(appID); if (false == isFirst) { Application.Quit(); } }