/// <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); } }
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); }
private void OnAutoCCompleted(object sender, AutoCSelectionEventArgs e) { AutoCTimer.Enabled = false; AutoCMode = 0; }