using System; using System.Windows.Forms; namespace InventoryTool { static class Program { private static System.Threading.Mutex mutex; /// /// 应用程序的主入口点。 /// [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(); } } } }