Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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);
            }
        }