コード例 #1
0
        /// <summary> Tested ? Working ? </summary>
        /// <param name="sender"> </param>
        /// <param name="e"> </param>
        private void selectedScintilla_AutoCompleteAccepted(object sender, AutoCSelectionEventArgs e)
        {
            if (!hit)
            {
                //ahk.MsgBox(e.Text.ToString());
                hit = true;

                var    currentPos   = selectedScintilla.CurrentPosition;
                var    wordStartPos = selectedScintilla.WordStartPosition(currentPos, true);
                string SoFarText    = selectedScintilla.GetWordFromPosition(wordStartPos); // word typed so far

                var lenEntered = currentPos - wordStartPos;
                selectedScintilla.DeleteRange(wordStartPos, lenEntered);

                string NewPaste = SoFarText;

                //if (SoFarText == "List_String") { NewPaste = "List<string> list = new List<string>();\n"; }
                //if (SoFarText == "SQLiteGen") { ahk.MsgBox("Started Tool"); }
                selectedScintilla.InsertText(selectedScintilla.CurrentPosition, NewPaste);
                //selectedScintilla.CurrentPosition()
                //selectedScintilla.CurrentPosition(selectedScintilla.CurrentPosition + NewPaste.Length);
                //int currentline = scintilla1.CurrentLine;
                selectedScintilla.GotoPosition(selectedScintilla.CurrentPosition + NewPaste.Length);
                //ahk.MsgBox("Pasted: " + SoFarText);
            }
        }
コード例 #2
0
        private void scintilla1_AutoCSelection(object sender, AutoCSelectionEventArgs e)
        {
            Type t = getPropertieType(currentNodeType, e.Text);

            var text       = "=\"\" ";
            var currentPos = scintilla1.CurrentPosition;

            scintilla1.InsertText(currentPos, text);

            scintilla1.GotoPosition(currentPos + 2);
        }
コード例 #3
0
ファイル: SBLexer.cs プロジェクト: Blockguy24/SB-IDE
 private void OnAutoCCompleted(object sender, AutoCSelectionEventArgs e)
 {
     AutoCTimer.Enabled = false;
     AutoCMode          = 0;
 }