1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/*
[+] #region [Restliche Using-Direktiven]
*/
using System.Drawing;
using System.Windows.Forms;
using System.Text.RegularExpressions;
/*
[+] #region [Restlicher WindowsForms-Code]
*/
private void richTextBox1_TextChanged(object sender, EventArgs e)
{
Regex exp = new Regex("Snippet");
int select = richTextBox1.SelectionStart;
foreach (Match m in exp.Matches(richTextBox1.Text))
{
richTextBox1.Select(m.Index, m.Value.Length);
richTextBox1.SelectionColor = Color.Blue;
richTextBox1.SelectionStart = select;
richTextBox1.SelectionColor = Color.Black;
}
}
|