using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Diagnostics;
using System.Reflection;
namespace Phone2007
{
static class Program
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
int i = 0;
Process current = Process.GetCurrentProcess();
Process[] processName = Process.GetProcessesByName(current.ProcessName);
foreach (Process ps in processName)
{
if (current.Id != ps.Id)
{
if (Assembly.GetExecutingAssembly().Location.Replace("/", "//") == current.MainModule.FileName)
{
i++;
}
}
}
if (i > 0)
{
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}