Пример #1
0
        private void uniqueButton_Click(object sender, EventArgs e)
        {
            string unique;

            StringAid stringAid = new StringAid(textBox.Text);

            unique = stringAid.UniqueCharacters();

            MessageBox.Show(unique);
        }
Пример #2
0
        private void largestWordButton_Click(object sender, EventArgs e)
        {
            string str;

            StringAid stringAid = new StringAid(textBox.Text);

            str = stringAid.LongestWord();

            MessageBox.Show(str);
            CleanForm();
        }
Пример #3
0
        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();
        }