Exemple #1
0
        /// <summary>
        /// Spell button: ask Google for a suggested alternate spelling, display it
        /// </summary>
        private void spellButton_Click(object sender, System.EventArgs e)
        {
            // Create a Google Search object
            GoogleSearchService s = new GoogleSearchService();
            // Ask for spelling suggestion
            String suggestion = s.doSpellingSuggestion(keyBox.Text, spellBox.Text);

            // Display the suggestion, if any
            if (suggestion == null)
            {
                this.spellResultLabel.Text = "<no suggestion>";
            }
            else
            {
                this.spellResultLabel.Text = suggestion;
            }
        }