using HotelPms.Share.Windows.Util;
|
using HotelPms.WinForm.Common.Util;
|
using System.Diagnostics;
|
using PmsForm = HotelPms.WinForm.View;
|
|
namespace HotelPms.WinApp
|
{
|
internal static class Program
|
{
|
/// <summary>
|
/// The main entry point for the application.
|
/// </summary>
|
[STAThread]
|
static void Main()
|
{
|
UnhandledExceptionListener.Execute();
|
ApplicationConfiguration.Initialize();
|
|
//ñdN®ð`FbN·é
|
if (Process.GetProcessesByName(Process.GetCurrentProcess().ProcessName).Length > 1)
|
{
|
Application.Exit();
|
return;
|
}
|
|
using (System.Threading.Mutex mutex = new System.Threading.Mutex(false, Application.ProductName))
|
{
|
if (mutex.WaitOne(0, false))
|
{
|
if (EnvironmentSetting.Init()) { Application.Run(new PmsForm.Menu()); }
|
}
|
GC.KeepAlive(mutex);
|
mutex.Close();
|
}
|
}
|
}
|
}
|