32 lines
837 B
C#
32 lines
837 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
|
|
namespace InventoryTool
|
|
{
|
|
static class Program
|
|
{
|
|
private static System.Threading.Mutex mutex;
|
|
/// <summary>
|
|
/// 应用程序的主入口点。
|
|
/// </summary>
|
|
[STAThread]
|
|
static void Main()
|
|
{
|
|
Application.EnableVisualStyles();
|
|
Application.SetCompatibleTextRenderingDefault(false);
|
|
mutex = new System.Threading.Mutex(true, "InventoryTool");
|
|
if (mutex.WaitOne(0, false))
|
|
{
|
|
//if (args.Length == 1)
|
|
// Application.Run(new ServerSetting());
|
|
//else
|
|
Application.Run(new InventoryToolMain());
|
|
}
|
|
else
|
|
{
|
|
Application.Exit();
|
|
}
|
|
}
|
|
}
|
|
}
|