예제 #1
0
        /// <summary>
        ///     Check the spelling word user has entered.
        /// </summary>
        /// <param name="word">The word to be checked for spelling.</param>
        /// <returns>True if word is correct else false.</returns>
        /// <created>art2m,5/12/2019</created>
        /// <changed>art2m,5/12/2019</changed>
        private bool CheckWordSpelling(string word)
        {
            var spwc = new SpellingWordsCollection();

            if (SpellingListClass.CheckWordSpelling(word))
            {
                this.lstWords.Items.Add(word);

                spwc.FillCollection(this.lstWords.Items.OfType <string>().ToList());
                return(true);
            }

            this.AddSuggestions();

            return(false);
        }
예제 #2
0
        /// <summary>
        ///     Check to see if the word is all ready contained in the list box.
        /// </summary>
        /// <param name="word">The word to be added to the list box.</param>
        /// <returns>True if no duplicate word found in the list box else false.</returns>
        /// <created>art2m,5/12/2019</created>
        /// <changed>art2m,5/12/2019</changed>
        private bool CheckListBoxForWord(string word)
        {
            var spwc = new SpellingWordsCollection();

            List <string> list = this.lstWords.Items.OfType <string>().ToList();

            if (list.Contains(word))
            {
                return(true);
            }

            spwc.FillCollection(list);

            this.cboWord.Text = string.Empty;
            this.cboWord.Focus();
            return(false);
        }
예제 #3
0
        /// <summary>
        ///     Check the spelling word user has entered.
        /// </summary>
        /// <param name="word">The word to be checked for spelling.</param>
        /// <returns>True if word is correct else false.</returns>
        /// <created>art2m,5/12/2019</created>
        /// <changed>art2m,5/12/2019</changed>
        private bool CheckWordSpelling(string word)
        {
            MyMessagesClass.NameOfMethod = MethodBase.GetCurrentMethod().Name;

            var spwc = new SpellingWordsCollection();

            if (SpellingListClass.CheckWordSpelling(word))
            {
                this.lstWords.Items.Add(word);

                spwc.FillCollection(this.lstWords.Items.OfType <string>().ToList());
                return(true);
            }

            this.AddSuggestions();

            return(false);
        }