private void uniqueButton_Click(object sender, EventArgs e) { string unique; StringAid stringAid = new StringAid(textBox.Text); unique = stringAid.UniqueCharacters(); MessageBox.Show(unique); }
private void largestWordButton_Click(object sender, EventArgs e) { string str; StringAid stringAid = new StringAid(textBox.Text); str = stringAid.LongestWord(); MessageBox.Show(str); CleanForm(); }
private void luckyButton_Click(object sender, EventArgs e) { string str; bool isLucky; StringAid stringAid = new StringAid(textBox.Text); isLucky = stringAid.FeelingLucky(); if (isLucky) { MessageBox.Show("You are feeling lucky."); } else { MessageBox.Show("You are not feeling lucky."); } CleanForm(); }