private void btnAnagramResult_Click(object sender, EventArgs e) { if (TextManipulation.AreStringsAnagrams(textSelection, txtAnagram.Text)) { lblResult.Text = "Yes!"; } else if (!TextManipulation.AreStringsAnagrams(textSelection, txtAnagram.Text)) { lblResult.Text = "No!"; } }
private void btnPallindrome_Click(object sender, EventArgs e) { if (TextManipulation.IsItAPalindrome(textSelection)) { lblResult.Text = "Yes!"; } else if (!TextManipulation.IsItAPalindrome(textSelection)) { lblResult.Text = "No!"; } }
private void btnLongestSentence_Click(object sender, EventArgs e) { MessageBox.Show("Longest Sentence: " + TextManipulation.getLongestSentence(txtMain.Text), "Longest Sentence", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void btnMostFrequent_Click(object sender, EventArgs e) { MessageBox.Show("Most Frequent Word: " + TextManipulation.GetMostFrequentWord(txtMain.Text), "Most Frequent Word", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void btnWordCount_Click(object sender, EventArgs e) { MessageBox.Show("Word Count: " + TextManipulation.CountWords(txtMain.Text), "Word Count", MessageBoxButtons.OK, MessageBoxIcon.Information); }