-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCodeDrawStyle.cs
More file actions
101 lines (93 loc) · 3.88 KB
/
Copy pathCodeDrawStyle.cs
File metadata and controls
101 lines (93 loc) · 3.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace pluginTcl
{
public class CodeDrawStyle : ajkControls.CodeTextbox.CodeDrawStyle
{
public override System.Drawing.Color[] ColorPallet
{
get
{
return colorPallet;
}
}
private static System.Drawing.Color[] colorPallet = new Color[16]
{
System.Drawing.Color.FromArgb(212,212,212), // default
System.Drawing.Color.LightGray, // inactivated
System.Drawing.Color.DarkGray, // 2
System.Drawing.Color.Crimson, // variable-heavy
System.Drawing.Color.MediumBlue, // keyword
System.Drawing.Color.ForestGreen, // comment
System.Drawing.Color.CadetBlue, // identifier
System.Drawing.Color.Orchid, // variable-fixed
System.Drawing.Color.SandyBrown, // number
System.Drawing.Color.Salmon, // variable-light
System.Drawing.Color.Green, // highlighted comment
System.Drawing.Color.Pink, // 11
System.Drawing.Color.Black, // 12
System.Drawing.Color.Black, // 13
System.Drawing.Color.Black, // 14
System.Drawing.Color.Black // 15
};
public static byte ColorIndex(ColorType colorType)
{
return (byte)colorType;
}
public static System.Drawing.Color Color(ColorType colorType)
{
return colorPallet[ColorIndex(colorType)];
}
public enum ColorType : byte
{
Normal = 0,
Comment = 5,
Register = 3,
Net = 9,
Variable = 11,
Paramater = 7,
Keyword = 4,
Identifier = 6,
Number = 8,
Inactivated = 1
}
public override Color[] MarkColor
{
get
{
return new System.Drawing.Color[8]
{
System.Drawing.Color.FromArgb(128,System.Drawing.Color.Red), // 0
System.Drawing.Color.FromArgb(128,System.Drawing.Color.Orange), // 1
System.Drawing.Color.Red, // 2
System.Drawing.Color.Red, // 3
System.Drawing.Color.Red, // 4
System.Drawing.Color.Red, // 5
System.Drawing.Color.Red, // 6
System.Drawing.Color.Red // 7
};
}
}
public override ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum[] MarkStyle
{
get
{
return new ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum[8]
{
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.wave, // 0
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.wave, // 1
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.underLine,
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.underLine,
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.underLine,
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.underLine,
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.underLine,
ajkControls.CodeTextbox.CodeTextbox.MarkStyleEnum.underLine
};
}
}
}
}