少一小时什么意思?
If e.Col.name.StartsWith("时_") Then
e.StartDraw()
Dim ct As Integer = e.Row("项目时间")
Dim t As Integer = e.Col.Name.Replace("时_", "")
Dim pt As Integer = e.Table.Compute("sum(项目时间)", "_Identify < " & e.Row("_Identify") & " and 日期 = '" & e.Row("日期") & "'")
If pt+ct > t-60 Then
If pt >= t-60 AndAlso pt < t Then
Dim x As Integer = (e.width-2) * (pt-t+60) / 60
Dim width As Integer
If pt+ct > t Then
width = (e.width-2) *(t-pt) / 60
Else
width = (e.width-2) *(ct) / 60
End If
e.Graphics.FillRectangle(Brushes.Green,e.x + x + 1,e.y + 1, Width, e.Height - 2)
ElseIf t > pt+60
Dim x As Integer = 0
Dim width As Integer
If pt+ct > t Then
width = e.width-2
Else
width = (e.width-2) *(pt+ct-t+60) / 60
End If
e.Graphics.FillRectangle(Brushes.Green,e.x + x + 1,e.y + 1, Width, e.Height - 2)
End If
End If
e.EndDraw()
End If