Esempio n. 1
0
        private void DisplayNextWord()
        {
            WordInstructionLabel.Text = "Enter " + madLib.CurrentWord;
            CountLabel.Text           = madLib.EntryCount + " of " + madLib.TotalEntries;
            var examples = PartsOfSpeechHelper.RetrieveExampleList(madLib.CurrentWord);

            if (examples.Any())
            {
                WordExamplesLabel.Text = "Examples: ";
                foreach (var example in examples)
                {
                    WordExamplesLabel.Text += example;
                    if (example != examples.Last())
                    {
                        WordExamplesLabel.Text += ", ";
                    }
                }
                ChooseForMeButton.Enabled = true;
            }
            else
            {
                WordExamplesLabel.Text    = "No examples available.";
                ChooseForMeButton.Enabled = false;
            }
        }
Esempio n. 2
0
 private void ChooseForMeButton_Click(object sender, EventArgs e)
 {
     WordBox.Text = string.Empty;
     WordBox.Text = PartsOfSpeechHelper.RetrieveSuggestedWord(madLib.CurrentWord);
 }