/// <summary> /// Check to see if the word is already in the list box. /// </summary> /// <param name="duplicate">The items from the list box.</param> /// /// /// <param name="addWord">The word to check for.</param> /// <returns>True if word is all ready in the list else false.</returns> /// <created>,5/10/2019</created> /// <changed>,5/10/2019</changed> public static bool CheckDuplicateWord(List <string> duplicate, string addWord) { MyMessages.NameOfMethod = MethodBase.GetCurrentMethod().Name; if (!LoopThrewWordsList(duplicate, addWord)) { return(false); } MyMessages.InformationMessage = "The word entered is all ready in the list of spelling words. "; MyMessages.ShowInformationMessageBox(); return(true); }
/// <summary> /// Check to see if the word is already in the list box. /// </summary> /// <param name="duplicate">The items from the list box.</param> /// /// /// <param name="addWord">The word to check for.</param> /// <returns>True if word is all ready in the list else false.</returns> /// <created>,5/10/2019</created> /// <changed>,5/10/2019</changed> public bool CheckDuplicateWord(List <string> duplicate, string addWord) { var declaringType = MethodBase.GetCurrentMethod().DeclaringType; if (declaringType != null) { MyMessages.NameOfClass = declaringType.Name; } MyMessages.NameOfMethod = MethodBase.GetCurrentMethod().Name; if (!this.LoopThrewWordsList(duplicate, addWord)) { return(false); } MyMessages.InformationMessage = "The word entered is all ready in the list of spelling words. "; MyMessages.ShowInformationMessageBox( MyMessages.InformationMessage, MyMessages.NameOfClass, MyMessages.NameOfMethod); return(true); }