Dim e = Args(0)
Dim ColName As String = Args(1)
If e.Col.Name = ColName Then
Dim i1 As Integer
Dim i2 As Integer
Dim ary() As String = e.text.split("*")
Dim swidth As Double = 0
For i As Integer = 0 To ary.length-1
Dim t As String = ary(i)
Dim ts() As String = {"",""}
If t.Contains("|")
Dim ts2() As String = t.Split("|")
ts(0) = ts2(0)
ts(1) = ts2(1)
Else
ts(0) = t
End If
Dim reg As new System.Text.RegularExpressions.Regex("|[+0-9\d\./a-zA-Z→]+$")
Dim reg1 As new System.Text.RegularExpressions.Regex("|[+0-9\d\-+./a-zA-Z→]+$")
If ts.Length >= 2 AndAlso reg.IsMatch(ts(0)) Then
Dim RectF As RectangleF '绘制区域
Dim fnt1 As Font = e.Table.Grid.Cols(e.Col.Name).Style.Font.Clone() '获取大字体
If e.Height > fnt1.Height Then
RectF = New RectangleF(e.x+swidth,e.y + (e.Height - fnt1.Height)/2,e.Width ,fnt1.Height)
Else
RectF = New RectangleF(e.x+swidth,e.y,e.Width ,e.Height)
End If
Dim FI As New C1.C1Preview.Util.FontInfo(fnt1)
Dim fnt2 As New Font(fnt1.Name,FI.SuperscriptSize) '获取小字体
Dim size As SizeF = e.Graphics.MeasureString(ts(0), fnt1) '计算大字体的位置
Dim sf As new StringFormat
sf.Trimming = 0
e.Graphics.DrawString(ts(0),fnt1,Brushes.Red,RectF ,sf)
swidth += size.width
Dim s1 As object
If ts(1) > "" AndAlso reg1.IsMatch(ts(1)) Then
e.Graphics.DrawString(ts(1),fnt2,Brushes.Red,new RectangleF(e.x+swidth-10,RectF.y ,RectF.Width,RectF.Height) ,sf)
s1 = e.Graphics.MeasureString(ts(1), fnt2)
swidth += s1.width-7
End If
If i < ary.length-1 Then
e.Graphics.DrawString("*",fnt1,Brushes.Red, (e.x+swidth-10), RectF.y,sf)
size = e.Graphics.MeasureString("*", fnt1)
End If
e.Text = ""
End If
Next
End If