'QQ闪烁
Static OpenQQ As RibbonMenu.Button
Static LastTime As Date
If OpenQQ Is Nothing Then
OpenQQ = ConfigBar.Items("OpenQQ")
End If
Dim txt As String
If QQClient.Ready
If QQClient.UnreadCount > 0 Then
txt = "(" & QQClient.UnreadCount & "条)"
End If
End If
If OpenQQ.Text <> txt Then
OpenQQ.Text = txt
End If
If OpenQQ.Text > "" Then
Dim ntp As timeSpan = Date.Now - LastTime
If ntp.TotalSeconds >= 0.5 Then
LastTime = Date.Now
If OpenQQ.ForeColor = Color.Red Then
OpenQQ.ForeColor = Color.Transparent
Else
OpenQQ.ForeColor = Color.Red
End If
End If
End If
'待办事件闪烁
Static workwait As RibbonMenu.Button
Static LastTime1 As Date
If workwait Is Nothing Then
workwait = ConfigBar.Items("待办事宜")
End If
Dim txt1 As String
Dim drsp As List(Of DataRow)
drsp = DataTables("信息查阅情况").Select("状态 = 0 and 人名 = '" & Vars("user") & "' and 会议开始时间 > #" & Date.now & "#")
If drsp.Count > 0 Then
txt1 = "(" & drsp.Count & "件)"
Else
txt1= ""
End If
If workwait.Text <> txt1 Then
workwait.Text = txt1
End If
If drsp.Count > 0 Then
Dim ntp As timeSpan = Date.Now - LastTime1
If ntp.TotalSeconds >= 0.5 Then
LastTime1 = Date.Now
If workwait.ForeColor = Color.Red Then
workwait.ForeColor = Color.Transparent
Else
workwait.ForeColor = Color.Red
End If
End If
End If
Static biaoqian As RibbonMenu.Label
If biaoqian Is Nothing Then
biaoqian = ConfigBar.Items("标签1") ‘用于固定配置栏的长度
End If
If txt.Contains("(") AndAlso txt1.Contains("(") Then
biaoqian.text = " "
End If
If txt.Contains("(") AndAlso txt1.Contains("(") = False Then
biaoqian.text = " "
End If
If txt.Contains("(") = False AndAlso txt1.Contains("(") Then
biaoqian.text = " "
End If
If txt.Contains("(") = False AndAlso txt1.Contains("(") = False Then
biaoqian.text = " "
End If
systemidle事件里面加了红色的代码 就会报错,提示 未应用到实例中