using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace FacOneZPStation { static class Program { public static string partNo; // 塑件零件号 public static string partNo1; // 总成零件号 public static bool IsOK = true; //胎膜和零件是否匹配 false:不匹配;true:匹配 public static string mouldNo; //胎膜号 /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { bool isRuned; System.Threading.Mutex mutex = new System.Threading.Mutex(true, "OnlyRunOneInstance", out isRuned); if (isRuned) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (ConfigurationManager.AppSettings["IsPunch"] == "1") { Application.Run(new FrmMain()); } else { Application.Run(new FrmZP()); } mutex.ReleaseMutex(); } else { MessageBox.Show("程序已启动!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }