我需要在解析器字符串中做一个选择案例。我需要选择第二个字段(工作正常),然后根据第二个字段返回的字符串明智,我需要稍微切换一下,但由于某种原因它不太工作,我想我可能没有绑定它权利r
,不确定。
Dim r as DataRow
Dim command = fields(1)
Select Case command
Case 1
If fields(1) = "<Left Mouse Down> <Left Mouse Up> <Right Mouse Up>" Then
r("Mouse Command") = "Left Click"
End If
Case 2
If fields(1) = "<Right Mouse Down> <Left Mouse Up> <Right Mouse Up" Then
r("Mouse Command") = "Right click"
End If
Case 3
If fields(1) = "<Left Mouse Up> <Right Mouse Up>" & Microsoft.VisualBasic.LTrim("Scroll Wheel Roll") Then
r("Mouse Command") = "Scroll Wheel"
End If
Case 4
If fields(1) = Microsoft.VisualBasic.LTrim("<Left Mouse Up> <Right Mouse Up> <Press ") Then
r("Mouse Command") = "Key Press"
End If
Case 5
If fields(1) = "<Left Mouse Up> <Right Mouse Up>" Then
r("Mouse Command") = "Double Click"
End If
End Select
解决了