/// <summary>
 /// Check spelling of word parameter
 /// </summary>
 /// <param name="word"></param>
 /// <returns>true if word is correct and false if it's not</returns>
 public bool CheckWord(string word)
 {
     if (correctWords.Contains(word)) // if word was already checked and is correct
     {
         return(true);
     }
     else if (misspelledWords.ContainsKey(word)) // if word was already checked and is misspelled
     {
         return(false);
     }
     else if (!DictionaryScanner.IsLowerWordInDictionary(ref word)) // if word was never checked and it's misspelled
     {
         AddWordToDictionary(word);
         return(false);
     }
     correctWords.Add(word);
     return(true);
 }
        private void Start(string word, int count, int distance, int howManyChanges)
        {
            var     result = new List <string>();
            Boolean isGood = false;
            string  copy   = word;

            if (!DictionaryScanner.IsLowerWordInDictionary(ref word) && word.Length > 1)
            {
                result = DictionaryScanner.FindSimilarWords(word, count, distance, howManyChanges);
            }
            else
            {
                if (copy != word)
                {
                    result.Add(word);
                }
                else
                {
                    isGood = true;
                }
            }

            if (isGood)
            {
                AppendTextBoxes(tbList.Text, Color.Green);
            }
            else
            {
                var list = "";
                if (result.Count != 0)
                {
                    foreach (var item in result)
                    {
                        list += (item + "\r\n");
                    }
                    AppendTextBoxes(list, Color.Red);
                }
                else
                {
                    AppendTextBoxes("Brak", Color.Red);
                }
            }
        }