Beispiel #1
0
        private void Say()
        {
            var t = ddlSay.Text;

            if (!string.IsNullOrEmpty(t))
            {
                SpeechSynth.Say(t, CW);
                CW.LogToPlugin("Text: " + t);
                var p = new List <string> {
                    t
                };
                foreach (var i in ddlSay.Items)
                {
                    if (!p.Contains(i) && !string.IsNullOrEmpty(i.ToString()))
                    {
                        p.Add(i.ToString());
                    }
                }

                var x = "";
                int j = 0;
                foreach (string s in p)
                {
                    if (j < 10)
                    {
                        x += s + "|";
                    }
                    else
                    {
                        break;
                    }
                    j++;
                }
                x = x.Trim('|');
                MainForm.Conf.TextSentences = x;
                PopSentences();
            }
        }