Forgive the begginer logic, but I can't afford a new degree until I get a raise.
Goal: To create a dynamic text search based on a bulleted style procedure.
Objective: Use a string reader to read a richtextbox line by line checking for the start and end of bullet points and outputting to prompt the end user to complete said step.
Problem: Extracting the text between bullet points with grace.
What I have so far:
Dim objReader As New System.IO.StringReader(ProcedureDisplay.CurrentTest.Text)
Dim TextLine As String
'Dim NextLine As String
Dim BulletStartIndex As String
Dim CurrentBullet As String
BulletStartIndex = DocSearch.ProcedureFile.Text.IndexOf(ProcedureDisplay.CurrentTest.Text) - 3
CurrentBullet = BulletStartIndex
'**** Test ****
'Dim BulletStart As Integer
Do While objReader.Peek() <> -1
'ProcedureDisplay.CurrentStep.Clear()
TextLine = objReader.ReadLine
CurrentBullet = Left(TextLine, 1)
If CurrentBullet <> BulletStartIndex Then
ProcedureDisplay.CurrentStep.AppendText(TextLine + vbNewLine + "****")
ElseIf CurrentBullet = BulletStartIndex Then
ProcedureDisplay.CurrentStep.AppendText(TextLine + vbNewLine + "9999")
End If
'MsgBox(TextLine)
Loop
This is how I would assume the logic should go.
For each line in Current test
If "First2Characters" = "BulletStart" and "ThirdCharacter"(does not increase) Then
'Store line
If "First2Characters" <> an Integer Then
'Store Line
If "ThirdCharacter"(does increase) then
'retrieve Stored lines and output to msgbox
Hopefully I'm not too off base here, but I wouldn't be surprised.