我有两个文本框的 Txtmark 和 TxtName 输入数据,然后在 20 个条目后存储在一个数组中,显示一个列表框以显示名称并标记我想要做什么 id 添加一个额外的有奖励的列
高区分度90%及以上;区别 75% 到 89%;信贷 60% 至 74%;并通过 50% 到 59%,其他一切都是参与
这是我到目前为止的代码:
'Enter scores - press to place value into Array
Private Sub TxtMark_Enter(ByVal sender As System.Object, _
ByVal e As KeyPressEventArgs) Handles TxtMark.KeyPress
Dim Mark As Double
Dim DataString As String
If e.KeyChar = ControlChars.Cr Then
If Double.TryParse(TxtMark.Text, Mark) = False Then
MessageBox.Show(" You must enter a numeric value like 1 or 2")
TxtMark.Clear()
TxtMark.Focus()
Exit Sub
End If
If Mark < 0 Or Mark > 100 Then
MessageBox.Show("Valid range is between 0 and 100, 7 would work " _
& Mark.ToString & " Does not")
TxtMark.Clear()
TxtMark.Focus()
Exit Sub
End If
If NumberOfScores < MaxEntries Then
ScoreArray(NumberOfScores) = Mark
DataString = (NumberOfScores + 1).ToString + ". " + _
NameArray(NumberOfScores).PadRight(15) + _
Mark.ToString.PadLeft(5)
ListBox1.Items.Add(DataString)
NumberOfScores += 1
End If
TxtMark.Clear()
TxtName.Clear()
TxtName.Focus()
Exit Sub
End If
If ListBox1.Items.Count >= 20 Then
ListBox1.Visible = True
Else
ListBox1.Visible = False
End If