Exemplo n.º 1
0
 private bool StartCommand(string commandtext, string key = " ")
 {
     try
     {
         string command = String.Concat(key, " ", " ", commandtext);
         Console.WriteLine(command);
         ProcessConsole.CommandRun(command);
         return(true);
     }
     catch (Exception e)
     {
         Console.WriteLine(e);
         return(false);
     }
 }
Exemplo n.º 2
0
        private void Btn_stop_Click(object sender, EventArgs e)
        {
            foreach (CommandCMD c in commlist)
            {
                switch (c.CommandName)
                {
                case "Stop Server":
                    ProcessConsole.CommandRun(c.CommandText);
                    break;

                case "Stop MySql":
                    ProcessConsole.CommandRun(c.CommandText);
                    break;
                }
            }
        }