Beispiel #1
0
        bool CheckTranslate(bool lang, int index, string input)
        {
            bool   isCheck;
            string translate = "";


            if (lang)
            {
                string[] words = EnglishWords.BaseOfEnglishWords().ToArray();
                translate = words[index];
            }
            else
            {
                string[] words = RussianWords.BaseOfRussianWords().ToArray();
                translate = words[index];
            }



            if (translate == input)
            {
                isCheck = true;
                button1.Focus();
            }

            else
            {
                isCheck = false;
            }

            toHelp = translate;
            return(isCheck);
        }
Beispiel #2
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            //check textbox on empty

            if (textBox1.Text == "" || textBox2.Text == "")
            {
                button1.Enabled = false;
            }
            else
            {
                button1.Enabled = true;
            }
            //check on same words

            Checker(EnglishWords.BaseOfEnglishWords());
        }
Beispiel #3
0
        string Trainer(bool lang)
        {
            string words = "";
            int    index = Randomizer();

            if (lang)
            {
                string[] words_ = EnglishWords.BaseOfEnglishWords().ToArray();
                words = words_[index]; //select random word from base
            }
            else
            {
                string[] words_ = RussianWords.BaseOfRussianWords().ToArray();
                words = words_[index]; //select random word from base
            }


            indexForCChecker = index;

            return(words);
        }