Example #1
0
 public String SystemAction(String command)
 {
     if (RunSystemAction.Run(command))
     {
         return(JsonConstructor.SendMessage(true, "成功"));
     }
     else
     {
         return(JsonConstructor.SendMessage(false, "命令不存在"));
     }
 }
Example #2
0
 private void button6_Click(object sender, EventArgs e)
 {
     RunSystemAction.Run("sleep");
 }
Example #3
0
 private void button5_Click(object sender, EventArgs e)
 {
     RunSystemAction.Run("hibernate");
 }
Example #4
0
 private void button4_Click(object sender, EventArgs e)
 {
     RunSystemAction.Run("logoff");
 }
Example #5
0
 private void button2_Click(object sender, EventArgs e)
 {
     RunSystemAction.Run("reboot");
 }
Example #6
0
 private void button1_Click(object sender, EventArgs e)
 {
     RunSystemAction.Run("shutdown");
 }