Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Syntax highlighting [ Read ]

So i have the Source code of 'FASTCOLOREDTEXTBOX' and i want to make my own Syntax .

So ...
what i'm trying to do :
  • Read all keywords from the Resource ( .txt file )
  • add it as a Changed style

so in the actually code its like this

Code
e.ChangedRange.SetStyle(BlueStyle, "\b(if|as|base|bool|break|byte|case|,|catch|char|checked|class|const|continue|decimal|default|delegate|do|double|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|goto|if|implicit|in|int|interface|internal|is|lock|long|namespace|new|null|object|operator|out|override|params|private|protected|public|readonly|ref|return|sbyte|sealed|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|virtual|void|volatile|while|add|alias|ascending|descending|dynamic|from|get|global|group|into|join|let|orderby|partial|remove|select|set|value|var|where|yield)\b|#region\b|#endregion\b")

i want

to read my text resource

lets be more clear my text file include some words like this :
init_file
init_do
init_x
init_x2

and to read it and paste it as a change style in the regex
where is the fucking question?

look... ? <-- its a fucking question mark.
where is yours?
( Let me retry )

how to read a resource and parse the contents in the e.ChangedRange.SetStyle ?

did you understand me ? <- this was a fucking question !
(Jan 24, 2015 05:49 PM)Spawner10 Wrote:  ( Let me retry )

how to read a resource and parse the contents in the e.ChangedRange.SetStyle ?

did you understand me ? <- this was a fucking question !

stupidSyntax.txt
Code
I|fuck|your|mom

PHP Code

<?php 
Dim txt 
As String() = Split(File.ReadAllText("C:\stupidSyntax.txt"), "|")
e.ChangedRange.SetStyle(BlueStyle, txt) 

Maybe my simple logic will help you.
🤗

- It's me Rhez
Thanks Rhez ^_^ ! This is the good one !


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by IndusAug 29, 2015 12:30 PM 6 165 Aug 29, 2015 12:30 PM
Last Post: JoshuaSmith
[.NET] by JoshuaSmithJul 31, 2015 05:12 AM 5 233 Jul 31, 2015 05:12 AM
Last Post: JoshuaSmith
[.NET] by ρãήžε®Jan 2, 2015 01:33 PM 6 125 Jan 2, 2015 01:33 PM
Last Post: ρãήžε®