4
I added the Dictionary Source to my project, now I need to convert it into a code dictionary, but it is bringing the null resource, someone can 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 to Resource.
On what line or lines is this happening?
– novic
The moment I’m giving
GetManifestResouceStream
– Verin
The name of
tx_spell_open_dict_resource.pt_BR.dic
would betx_spell_open_dict_resource.pt_BR.dic.resx
?– novic
Take a look at https://stackoverflow.com/questions/10726857/why-does-getmanifestresourcestream-returns-null-while-the-resource-name-exists-w
– Otto
I took a look , but unfortunately that’s not the problem. I tried to rename with the namespace, even so it return null.
– Verin