110,499
社区成员
发帖
与我相关
我的任务
分享
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Process[] pro = Process.GetProcesses();
int n = pro.Where(p => p.ProcessName.Equals("进程名称")).Count();
if (n > 1)
{
Application.Current.Shutdown();
return;
}
}