/// <summary> /// Gets the text for the specified line. /// </summary> public string GetLine(int index) { if (textEditorControl.InvokeRequired) { GetLineInvoker invoker = new GetLineInvoker(GetLine); return((string)textEditorControl.Invoke(invoker, new object[] { index })); } else { LineSegment lineSegment = textEditorControl.Document.GetLineSegment(index); return(textEditorControl.Document.GetText(lineSegment)); } }
/// <summary> /// Gets the text for the specified line. /// </summary> public string GetLine(int index) { if (textEditorControl.InvokeRequired) { GetLineInvoker invoker = new GetLineInvoker(GetLine); return (string)textEditorControl.Invoke(invoker, new object[] { index }); } else { LineSegment lineSegment = textEditorControl.Document.GetLineSegment(index); return textEditorControl.Document.GetText(lineSegment); } }