@@ -608,6 +608,9 @@ private void Highlight(string text, int offset)
608608 richTextBox1 . Select ( match . Index + offset , 5 ) ;
609609 richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#3498db" ) ;
610610
611+ richTextBox1 . Select ( match . Groups [ 1 ] . Index + offset , match . Groups [ 1 ] . Length ) ;
612+ richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#2ecc71" ) ;
613+
611614 richTextBox1 . Select ( match . Groups [ 1 ] . Index + match . Groups [ 1 ] . Length + offset , 1 ) ;
612615 richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#3498db" ) ;
613616 }
@@ -643,6 +646,20 @@ private void Highlight(string text, int offset)
643646 richTextBox1 . Select ( match . Index + offset , 6 ) ;
644647 richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#3498db" ) ;
645648 }
649+
650+ Regex callcsharp = new Regex ( @"([a-zA-Z0-9]{1,})\:(.*?)\((.*)\)" ) ;
651+ MatchCollection callcsharpm = callcsharp . Matches ( text ) ;
652+ foreach ( Match match in callcsharpm )
653+ {
654+ richTextBox1 . Select ( match . Groups [ 1 ] . Index + offset , match . Groups [ 1 ] . Length ) ;
655+ richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#27ae60" ) ;
656+
657+ richTextBox1 . Select ( match . Groups [ 2 ] . Index + offset , match . Groups [ 2 ] . Length ) ;
658+ richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#e67e22" ) ;
659+
660+ richTextBox1 . Select ( match . Groups [ 3 ] . Index + offset , match . Groups [ 3 ] . Length ) ;
661+ richTextBox1 . SelectionColor = ColorTranslator . FromHtml ( "#27ae60" ) ;
662+ }
646663 }
647664 }
648665}
0 commit comments