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); } }
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; } } }