Exemplo n.º 1
0
        public void Form1_Load(object sender, EventArgs e)

        {
            if (EnglishWords.Count() == 0 || RussianWords.Count() == 0)
            {
                button2.Enabled = false;
            }

            //how many words base have
            label3.Text     = EnglishWords.Count().ToString();
            label4.Text     = RussianWords.Count().ToString();
            button1.Enabled = false;
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //for add new english word to base

            EnglishWords.Add(textBox1.Text);


            //for add new rissian word to base

            RussianWords.Add(textBox2.Text);

            label3.Text   = EnglishWords.Count().ToString();
            label4.Text   = RussianWords.Count().ToString();
            textBox1.Text = "";
            textBox2.Text = "";
            if (button2.Enabled == false)
            {
                button2.Enabled = true;
            }
        }
Exemplo n.º 3
0
        int Randomizer()
        {
            Random random = new Random();

            return(random.Next(0, EnglishWords.Count()));
        }