Beispiel #1
0
 private void SetInternalStatus(string word, bool isCorrect)
 {
     if (isCorrect)
     {
         if (IsVernacular)
         {
             // Custom vernacular-only dictionary.
             // want it 'affixed' like the prototype, which has been marked to suppress other-case matches
                                 #if __MonoCS__
             Hunspell_add_with_affix(m_hunspellHandle, MarshallAsUtf8Bytes(word),
                                     MarshallAsUtf8Bytes(SpellingHelper.PrototypeWord));
                                 #else
             m_hunspellHandle.AddWithAffix(MarshallAsUtf8Bytes(word), MarshallAsUtf8Bytes(SpellingHelper.PrototypeWord));
                                 #endif
         }
         else
         {
             // not our custom dictionary, some majority language, we can't (and probably don't want)
             // to be restrictive about case.
                                 #if __MonoCS__
             Hunspell_add(m_hunspellHandle, MarshallAsUtf8Bytes(word));
                                 #else
             m_hunspellHandle.Add(MarshallAsUtf8Bytes(word));
                                 #endif
         }
     }
     else
     {
                         #if __MonoCS__
         Hunspell_remove(m_hunspellHandle, MarshallAsUtf8Bytes(word));
                         #else
         m_hunspellHandle.Remove(MarshallAsUtf8Bytes(word));
                         #endif
     }
 }