Exemplo n.º 1
0
        public List <string> DoSuggest(string word)
        {
            var parameter     = new SuggestionParameter(word, _hunspell);
            var suggestThread = new System.Threading.Thread(DoWork);

            suggestThread.Start(parameter);
            suggestThread.Join(3000); // wait max 3 seconds
            suggestThread.Abort();
            if (!parameter.Success)
            {
                LoadHunspell(_currentDictionary);
            }
            return(parameter.Suggestions);
        }
Exemplo n.º 2
0
 public List<string> DoSuggest(string word)
 {
     var parameter = new SuggestionParameter(word, _hunspell);
     var suggestThread = new System.Threading.Thread(DoWork);
     suggestThread.Start(parameter);
     suggestThread.Join(3000); // wait max 3 seconds
     suggestThread.Abort();
     if (!parameter.Success)
         LoadHunspell(_currentDictionary);
     return parameter.Suggestions;
 }