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); }
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); }
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); }