| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using System;
- using System.Collections.Generic;
- using System.Collections.Specialized;
- using System.Text;
- using System.ConsoleApp;
- using System.ConsoleApp.Commands;
- namespace Keln.Commands.Speech {
- [ConsoleCommand("speech"), ConsoleCommand("say")]
- public class Speech : BaseCommand {
- public static bool execute() {
- System.Diagnostics.Debug.WriteLine("ConsoleCommand: DeviceEmotion::execute()");
- return true;
- }
- public static string LineStartText() {
- return "Speech";
- }
- [ConsoleCommand("qqq")]
- [ConsoleCommand("exit")]
- [ConsoleCommand("quit")]
- public static bool exit() {
- return false;
- }
- [ConsoleCommand("say")]
- public static bool get(string line, string cmd, NameValueCollection arguments) {
- string text = arguments["general"];
- if (text.Length == 0) {
- if (!Input("What to say", ref text, InputStyle.All)) {
- return true;
- }
- }
- NameValueCollection value = new NameValueCollection() { { "say", text } };
- Leah.Client.GetJson(Leah.Client.eService.Speech, "say.cgi", value);
- return true;
- }
- }
- }
|