This repository has been archived on 2024-08-06. You can view files and clone it, but cannot push or open issues or pull requests.
linear-app-launcher/Program.cs

32 lines
811 B
C#
Raw Normal View History

2020-03-27 23:16:34 +00:00
using System;
using System.Windows.Forms;
namespace AppLauncher
{
static class Program
{
2020-05-18 19:45:25 +00:00
const string applicationID = "f31c9f65-4047-41e4-ac85-dbe11d12ee46";
2020-03-27 23:16:34 +00:00
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
2020-05-18 19:45:25 +00:00
System.Threading.Mutex mutex = new System.Threading.Mutex(false, applicationID);
if (mutex.WaitOne(TimeSpan.Zero))
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
mutex.ReleaseMutex();
2020-05-18 19:45:25 +00:00
}
mutex.Close();
mutex.Dispose();
mutex = null;
2020-03-27 23:16:34 +00:00
}
}
}