break;
case "UNLOCK"://解锁屏幕//解除键盘鼠标锁定
BlockInput(false);
FileStream fs1 = new FileStream(Environment.ExpandEnvironmentVariables("%windir%\\system32\\taskmgr.exe"), FileMode.Open);
fs1.Close(); //用文件流打开任务管理器应用程序而不关闭文件流就会阻止打开任务管理器
break;
case "CLOSEPC"://关闭机器
DoExitWin(EWX_SHUTDOWN);
break;
case "RESTART": //重启计算机
DoExitWin(EWX_REBOOT);
break;
case "NO LINK"://关闭客户端的程序进程
Process[] myProcesses;
myProcesses = Process.GetProcessesByName("Client");
foreach (Process instance in myProcesses)
{
instance.WaitForExit(3000);
instance.CloseMainWindow();
instance.Kill();
}
break;
default:
Console.WriteLine("Default case");
break;
}//对客户机的控制到此结束
}
else
{
bool send_all_screen = false;
if (bufs.IndexOf("#SENDALL#") > 0)
{
send_all_screen = true;
}
|