mirror of
https://github.com/quasar/Quasar.git
synced 2026-10-24 17:31:11 +08:00
- Improved Client Installation, Update and Uninstallation - Improved Registry Access - Split SystemCore class
23 lines
478 B
C#
23 lines
478 B
C#
using System.Threading;
|
|
|
|
namespace xClient.Core.Helper
|
|
{
|
|
public static class MutexHelper
|
|
{
|
|
private static Mutex _appMutex;
|
|
|
|
public static bool CreateMutex(string name)
|
|
{
|
|
bool createdNew;
|
|
_appMutex = new Mutex(false, name, out createdNew);
|
|
return createdNew;
|
|
}
|
|
|
|
public static void CloseMutex()
|
|
{
|
|
if (_appMutex != null)
|
|
_appMutex.Close();
|
|
}
|
|
}
|
|
}
|