The TXSpellChecker.OptionsDialog does not display the dictionary names in the Dictionaries tab:
This is the c# code used to display the optionsdialog :
This is also true when you click on the user dictionaries button.Code:TXTextControl.WPF.Proofing.TXSpellChecker txSpellChecker1 = (TXTextControl.WPF.Proofing.TXSpellChecker)Resources["txSpellChecker1"]; txSpellChecker1.OptionsDialog();
This is the code used to create and add the user dictionary:
Am I missing something or is this a bug in TXSpell .Net for WPF 2.0Code:private void SetUserDictionary() { try { string strAppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DocuMinder\\user_dictionary.txd"; if (!File.Exists(strAppData)) { if (Directory.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DocuMinder")) { StreamWriter fs = File.CreateText(strAppData); fs.Close(); } else { Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\DocuMinder"); StreamWriter fs = File.CreateText(strAppData); fs.Close(); } } TXTextControl.Proofing.UserDictionary u_dic = new TXTextControl.Proofing.UserDictionary(strAppData); u_dic.DictionaryEncoding = System.Text.Encoding.UTF8; TXTextControl.WPF.Proofing.TXSpellChecker txSpellChecker1 = (TXTextControl.WPF.Proofing.TXSpellChecker)Resources["txSpellChecker1"]; txSpellChecker1.Dictionaries.Add(u_dic); u_dic.Name = "User_Dictionary"; u_dic.Save(strAppData); } catch (Exception ex) { } }
Regards,
Steve Perrins
SCP Computers


Reply With Quote

Bookmarks