static class Program
{
[STAThread]
static void Main()
{
if (VerifyMacAddress())
{
MessageBox.Show("不支持的PC,请联系软件开发人员!", "提示");
return;
}
if (NotOpenMore())
{
return;
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Index());
}
static bool VerifyMacAddress()
{
List<string> lst = NetworkInterface.GetAllNetworkInterfaces()
.Select(adaper => adaper.GetPhysicalAddress().ToString())
.ToList();
if (lst.Contains("B07B253E28ED"))
{
return false;
}
if (lst.Contains("00FF817332CB"))
{
return false;
}
return true;
}
static bool NotOpenMore()
{
var processes = Process.GetProcesses();
var currentProcess = Process.GetCurrentProcess();
return processes.Any(p => p.ProcessName == currentProcess.ProcessName && p.Id != currentProcess.Id);
}
}