static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
bool instantiated;
Mutex mutex = new Mutex(true, "UniqueID", out instantiated);
if (!instantiated) {
MessageBox.Show("程序已经在运行中。。。");
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new login());
GC.KeepAlive(mutex);
}
}