I added the dictionary resource to my project, now I need to convert it to a dictionary via code, but it is bringing the null resource, can anyone help me?
List<string> dic = new List<string>();
List<string> aff = new List<string>();
Assembly _assembly;
StreamReader _textStreamReader;
_assembly = Assembly.GetExecutingAssembly();
string line;
_textStreamReader = new StreamReader(
_assembly.GetManifestResourceStream("tx_spell_open_dict_resource.pt_BR.dic"));
while ((line = _textStreamReader.ReadLine()) != null)
{
dic.Add(line);
}
_textStreamReader = new StreamReader(
_assembly.GetManifestResourceStream("tx_spell_open_dict_resource.pt_BR.aff"));
while ((line = _textStreamReader.ReadLine()) != null)
{
aff.Add(line);
}
OpenOfficeDictionary dic_ptBR = new OpenOfficeDictionary(
dic.ToArray(), aff.ToArray(), new CultureInfo("pt_BR"));
txSpellChecker1.Dictionaries.Add(dic_ptBR);
Maybe the wrong part is in the string that I try to get the resource.