public int FindLineNumberForText(string text) { string currentText = this.scintillaControl1.GetText(); if (currentText.IndexOf(text) >= 0) { return FindLineNumberForCharacterIndex(currentText.IndexOf(text)); } return 0; }