Files
CPXV2/SystemX.Net.CP.Middleware.PD/SystemX.Net.Middleware.UI/Program.cs

38 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Windows.Forms;
namespace SystemX.Net.MiddlewareUI
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
bool bCreateProgram = false;
Mutex SetMutex = new Mutex(true, "SystemX.Net.Middleware.UI CPXV2-JSON", out bCreateProgram);
if (bCreateProgram)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
SetMutex.ReleaseMutex();
}
else
{
MessageBox.Show("[SystemX.Net.MiddlewareUI CPXV2] Already this program excute now. Check the process.", "SystemX.Net.Middleware.UI", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
}
}
}