public void EnableSpellCheck() { if (!InitializeSpellCheck()) { throw new Exception("Spellcheck initialization error!"); } listeners.Add(new System.EventHandler(this.textbox_TextChanged)); this.textbox.TextChanged += (System.EventHandler)listeners[0]; cntl = new CustomPaintTextBox(this.textbox, this); SpellCheck(); }
public void enableSpellCheck() { if (localeId == null) { return; } try { string dictPath = workingDir + "/dict/" + localeId; spellDict = new Hunspell(dictPath + ".aff", dictPath + ".dic"); LoadUserDictionary(); listeners.Add(new System.EventHandler(this.textbox_TextChanged)); this.textbox.TextChanged += (System.EventHandler)listeners[0]; cntl = new CustomPaintTextBox(this.textbox, this); spellCheck(); } catch (Exception e) { MessageBox.Show(e.Message); } }