40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
namespace EgwControlCenter.App
|
|
{
|
|
internal static class Program
|
|
{
|
|
#region Private Fields
|
|
|
|
private static string appGuid = "e5dc2566-ba1a-4f7b-94bb-e678715f9b41";
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Methods
|
|
|
|
/// <summary>
|
|
/// The main entry point for the application.
|
|
/// </summary>
|
|
[STAThread]
|
|
private static void Main()
|
|
{
|
|
using (Mutex mutex = new Mutex(false, "Global\\" + appGuid))
|
|
{
|
|
if (!mutex.WaitOne(500, false))
|
|
{
|
|
MessageBox.Show("Another instance is already running! Check for it on the SystemTray", "EgalWare AppControlCenter", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
|
return;
|
|
}
|
|
|
|
// To customize application configuration such as set high DPI settings or default
|
|
// font, see https://aka.ms/applicationconfiguration.
|
|
ApplicationConfiguration.Initialize();
|
|
// valutare se necessari...
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
Application.SetHighDpiMode(HighDpiMode.SystemAware);
|
|
Application.Run(new BlazorForm());
|
|
}
|
|
}
|
|
|
|
#endregion Private Methods
|
|
}
|
|
} |