using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; namespace DeviceWCS { static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); bool result; Mutex MyMutex = new Mutex(true, "QQJF_DeviceWCS", out result); if (result) { Application.Run(new Form1()); } else { //程序已经启动 MessageBox.Show("WCS程序已启动"); } } } }