Quote:
Originally Posted by DarK TeaM PT
Hey all like you can see on tittle says im doing one SIMPLE pawn identer so what i need its if i put in one TextBox a
and if i press the buttom it put on textbox2 this
im doing one VISUAL BASIC 2008 i used this code
Код:
If RichTextBox1.Text = "}else" Then
RichTextBox2.Text = "}" & Environment.NewLine & "else"
but the problem with this code itґs if i put
on textbox1
on textbox2 dont appears nothing
can anyone help me in advance thanks
|
I wouldnt do it that way lol. Your program is going to be ridiculously long if you have to map out every condition; you should simply just check for open curly braces, and closing curly braces. Just check all the braces in the textbox to see if there is text on the same line, if there is move it to a new line and the continue checking and fixing the indentation. For every open brace, indent the following text four spaces. For the closing braces simply remove four spaces from the following text.