private void TranslateButton_Click(object sender, EventArgs e) { var validString = EnglishRichTextBox.Text; if (!validString.Equals("") && !validString.Equals(" ")) { TranslateRichTextBox.Clear(); if (PigLatinRadio.Checked) { PigLatinTranslator pigLatin = new PigLatinTranslator(); var translated = pigLatin.PigLatin(validString); foreach (var word in translated) { TranslateRichTextBox.Text += $"{word} "; } } else if (PigGreekRadio.Checked) { PigGreekTranslator pigGreek = new PigGreekTranslator(); var translated = pigGreek.PigGreek(validString); foreach (var word in translated) { TranslateRichTextBox.Text += $"{word} "; } } } //else text field is blank, doNothing(); }
private void ClearButton_Click(object sender, EventArgs e) { TranslateRichTextBox.Clear(); EnglishRichTextBox.Clear(); }
private void PigGreekRadio_Click(object sender, EventArgs e) { TranslateLabel.Text = "Pig Greek Translation:"; TranslateRichTextBox.Clear(); }