/// <summary> /// Find the next term /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void OnFindNext(object sender, EventArgs e) { if (document == null) { return; } if (textBoxFind.Text == "") { return; } ScintillaNET.SearchFlags flags = ScintillaNET.SearchFlags.Empty; if (checkboxCase.Checked) { flags |= ScintillaNET.SearchFlags.MatchCase; } if (checkBoxWord.Checked) { flags |= ScintillaNET.SearchFlags.WholeWord; } if (checkBoxRegex.Checked) { flags |= ScintillaNET.SearchFlags.RegExp; } ScintillaNET.Range range = document.Scintilla.FindReplace.FindNext(textBoxFind.Text, true, flags); if (range != null) { range.GotoStart(); range.Select(); } }
public void SetSel(ScintillaNET.Range range, bool makeVisible = false) { range.Select(); /*Editor.ClearSelections(); * Editor.Selection.Start = range.Start; * Editor.Selection.End = range.End; * if (makeVisible) * { * Editor.NativeInterface.SetSelection(range.Start, range.End); * }*/ }