say_command.cs 725 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Collections.Specialized;
  4. using System.Text;
  5. using System.ConsoleApp;
  6. using System.ConsoleApp.Commands;
  7. namespace Speech.Commands {
  8. [ConsoleCommand("say")]
  9. public class say_command : BaseCommand {
  10. public static bool execute(string line, string command, NameValueCollection arg) {
  11. System.Diagnostics.Debug.WriteLine("Command: " + command);
  12. string[] keys = arg.AllKeys;
  13. foreach(string key in keys) {
  14. System.Diagnostics.Debug.WriteLine("- " + key + ": " + arg[key]);
  15. }
  16. SpeechExecute.Say(arg["general"], text.eMood.All);
  17. return false;
  18. }
  19. }
  20. }