コード例 #1
0
ファイル: Form07_game.cs プロジェクト: Zenab99/TypeEasy
        private void TextBoxDisplay_Config(string promptText)
        {
            promptText.Text2Speech(3, false);


            var tmp_exp = Gcide.GetMeaning(promptText);

            ExplanationRichTextBox.Text = tmp_exp;

            ExplanationRichTextBox.ColorWord(promptText, Color.Black, 0);

            var pos = new List <string>(new string[]
            {
                "noun", "pronoun", "verb", "adjective", "adverb",
                "preposition", "conjunction", "interjection"
            });

            foreach (string p in pos)
            {
                ExplanationRichTextBox.ColorWord(p, Color.DarkCyan, 0);
            }
            var num    = new List <string>();
            var no_max = 20;

            for (int i = 0; i < no_max; i++)
            {
                num.Add(Convert.ToString(i));
            }

            foreach (string n in num)
            {
                ExplanationRichTextBox.ColorWord(n, Color.MediumBlue, 0);
            }
        }
コード例 #2
0
ファイル: Form03_type_word.cs プロジェクト: Zenab99/TypeEasy
        private void TextBoxDisplay_Config(string promptText)
        {
            promptText.Text2Speech(3, false);
            PromptLineRichTextBox.AppendText(promptText + " ");
            PromptLineRichTextBox.ScrollToBottom();

            var tmp_exp = Gcide.GetMeaning(promptText);

            ExplanationRichTextBox.Text = tmp_exp;
            //ExplanationRichTextBox1.ColorWord(tmp_exp, Color.DarkOrange, 0);
            ExplanationRichTextBox.ColorWord(promptText, Color.Black, 0);
            //  ExplanationRichTextBox1.ColorWord(Gcide.GetPhoonetic(promptText), Color.Green, 0);
            //promptRichTextBox.Text = promptText;
            var pos = new List <string>(new string[]
            {
                "noun", "pronoun", "verb", "adjective", "adverb",
                "preposition", "conjunction", "interjection"
            });

            foreach (string p in pos)
            {
                ExplanationRichTextBox.ColorWord(p, Color.DarkCyan, 0);
            }
            var num    = new List <string>();
            var no_max = 20;

            for (int i = 0; i < no_max; i++)
            {
                num.Add(Convert.ToString(i));
            }

            foreach (string n in num)
            {
                ExplanationRichTextBox.ColorWord(n, Color.MediumBlue, 0);
            }
        }