Exemplo n.º 1
0
        private void TextArea_CharAdded(object sender, ScintillaNET.CharAddedEventArgs e)
        {
            char cc = (char)TextArea.GetCharAt(TextArea.CurrentPosition - 1);

            switch (AutoCompleteVer)
            {
            case 1:
                if (cc != '\r' && cc != '\n' && cc != '\t')
                {
                    TextArea.AutoCShow(0, AutoCompletev1);
                }
                break;

            case 2:
                if (cc != '\r' && cc != '\n' && cc != '\t')
                {
                    TextArea.AutoCShow(0, AutoCompletev2);
                }
                break;

            case 3:
                if (cc != '\r' && cc != '\n' && cc != '\t')
                {
                    TextArea.AutoCShow(0, AutoCompletevB);
                }
                break;
            }
        }
Exemplo n.º 2
0
        private void Editor_CharAdded(object sender, ScintillaNET.CharAddedEventArgs e)
        {
            ScintillaNET.Scintilla Editor = sender as ScintillaNET.Scintilla;

            curWord = Editor.GetWordFromPosition(Editor.SelectionStart);
            if (curWord.Length == 0)
            {
                return;
            }
            Predicate <string> startWord = compareWithCurrentWord;
            List <string>      list      = autoCompleteList.FindAll(startWord);

            if (list.Count > 0)
            {
                Editor.AutoCShow(curWord.Length, string.Join(SciEditor.AutoCSeparator.ToString(), list.ToArray()));
            }
        }