正在阅读:用asp.net 实现九连环小游戏用asp.net 实现九连环小游戏

2004-04-27 10:02 出处:CSDN 作者:wildcatsky 责任编辑:linjixiong

    Private Sub ChinaRingCkBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox7.CheckedChanged
        ChinaRingCkBox_CheckedChanged(7, sender, e)
    End Sub

    Private Sub ChinaRingCkBox8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox8.CheckedChanged
        ChinaRingCkBox_CheckedChanged(8, sender, e)
    End Sub

    Private Sub ChinaRingCkBox9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox9.CheckedChanged
        ChinaRingCkBox_CheckedChanged(9, sender, e)
    End Sub

    Private Sub ChinaRingCkBox_CheckedChanged(ByVal index As Integer, ByVal sender As System.Object, ByVal e As System.EventArgs)
        Dim i As Integer
        i = 0
        Dim ChinaRingCk As Boolean = False
        If index = 1 Then
            ChinaRingCk = True
        Else
            If ChinaRingCkBox(index - 2).Checked Then
                ChinaRingCk = True
            End If
            Do While i < index - 2
                If ChinaRingCkBox(i).Checked Then
                    ChinaRingCk = False
                End If
                i = i + 1
            Loop
        End If
        If Not ChinaRingCk Then
            ChinaRingCkBox(index - 1).Checked = Not ChinaRingCkBox(index - 1).Checked
            '可以在这里加一个提示,根据条件提示不能套入,或不能拿出该环。
        End If
    End Sub

  End Class
 


察看评论详细内容 我要发表评论
作者笔名 简短内容 发表时间
:
键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品