static void Main()
{
bool newMutexCreated = true;
using (new Mutex(true, Assembly.GetExecutingAssembly().FullName, out newMutexCreated)){
if (!newMutexCreated) //exist
return;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ServiceForm());
}
}
{
bool newMutexCreated = true;
using (new Mutex(true, Assembly.GetExecutingAssembly().FullName, out newMutexCreated)){
if (!newMutexCreated) //exist
return;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ServiceForm());
}
}