Dim lbl1 As WinForm.Label = e.Form.Controls("Label1")
Dim txt1 As WinForm.TextBox = e.Form.Controls("TextBox1")
If lbl1.text <> txt1.text Then
msgbox("不匹配")
Else
匹配后的如果目录_状态列内容 为 待考核 ,执行红色代码,
如果匹配后的如果目录_状态列内容 为 重学习 ,执行绿色代码,
Dim t As Table = Tables("单词")
t.Current("目录_状态") = "已学习"
Dim t As Table = Tables("单词")
t.Current("目录_状态") = "再学习"
感谢 感谢
If e.Form.controls("checkbox1").checked Then
Dim drs As List(Of DataRow) = t.DataTable.Select("目录_状态 Is null Or 目录_状态 <> '已学习'")
If drs.count > 0 Then
Dim idx As Integer = Rand.Next(drs.count-1)
t.position = t.FindRow(drs(idx))
Dim r = t.current
Dim sp As New DotNetSpeech.SpVoice()
sp.Speak(r("目录_英文"), DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync)'包括读音
txt1.text = ""
Else
msgbox("已学完")
End If
Else
Dim idx As Integer = t.FindRow("目录_状态 is null or 目录_状态 <> '已学习'", t.Position+1, True)
If idx = -1 Then
msgbox("已学完")
Else
Dim r As Row = t.Rows(idx)
t.Position = idx
Dim sp As New DotNetSpeech.SpVoice()
sp.Speak(r("目录_英文"), DotNetSpeech.SpeechVoiceSpeakFlags.SVSFlagsAsync) '包括读音
txt1.text = ""
End If
End If
End If