Beispiel #1
0
        private void translateButton_Click(object sender, EventArgs e)
        {
            string lang;

            if (radioButton1.Checked == true)
            {
                lang = "ru-en";
            }
            else
            {
                lang = "en-ru";
            }

            textBox2.Text = yt.Translate(textBox1.Text, lang);
        }
Beispiel #2
0
        private void translateButton_Click(object sender, EventArgs e)
        {
            string lang;

            if (ruEnRadioButton.Checked == true)
            {
                lang = "ru-en";
            }
            else
            {
                lang = "en-ru";
            }

            outputTextBox.Text = yt.Translate(inputTextBox.Text, lang);
        }
Beispiel #3
0
        private void translateButton_Click(object sender, EventArgs e)
        {
            string lang;
            string defis = "-";
            //string comboText = comboBox1.Text;
            int indexLang1 = comboBox1.SelectedIndex;
            int indexLang2 = comboBox2.SelectedIndex;

            string [] array = File.ReadAllText("1.txt", Encoding.Default).Split(' ');
            if (indexLang1 != 0)
            {
                lang = array[indexLang1] + defis + array[indexLang2 + 1];
            }
            else
            {
                lang = array[indexLang2 + 1];
            }

            outputTextBox.Text = yt.Translate(inputTextBox.Text, lang);
        }