using System; using System.Collections.Generic; using System.Configuration; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace PurchingMistakeNew { static class Program { /// /// 应用程序的主入口点。 /// [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); //Application.Run(new FrmPrint()); string load = ConfigurationManager.AppSettings["loadForm"]; switch (load) { case "1": //门板生产 Application.Run(new Form1());//OK break; case "2": //门板入库 Application.Run(new Form3());//OK break; case "3": //x247轮眉生产 Application.Run(new Form4());//OK break; case "4": //x247轮眉入库 Application.Run(new Form5());//OK break; case "5": //x247小轮眉生产 Application.Run(new Form6()); //OK break; case "6": //扰流板生产 Application.Run(new Form7());//没改,有点特殊 break; case "7": //扰流板入库 Application.Run(new Form8()); //OK break; case "8": //x243轮眉生产 Application.Run(new Form9());//可能用FrmProduct_243了 break; case "9": //x247轮眉入库 Application.Run(new Form10());//页面为空 可能用FrmCheck243了 break; case "10": //x243轮眉生产 Application.Run(new FrmProduct_243()); //OK 243条码啥样不知道 break; case "11": //x243轮眉入库 Application.Run(new FrmCheck243()); //OK 243箱码啥样不知道 break; case "12": //x247订单打印 Application.Run(new FrmPrint()); //不用 break; case "13": //x243订单打印 Application.Run(new FrmPrint_243());//不用 break; case "14": //x247轮眉扫描给视觉 Application.Run(new FrmScan_247());//不用 break; default: break; } //Application.Run(new FrmTest()); mutex.ReleaseMutex(); } else { MessageBox.Show("程序已启动!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }