呵呵,培训时老师讲的简单例子,俺自己作了一下,还可以运行。 QQ:5478740 wildcatsky(原作) public Class ChinaRing1 #Region ” Web 窗体设计器生成的代码 “ 该调用是 Web 窗体设计器所必需的。 End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init #End Region Private Sub ChinaRingCkBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox1.CheckedChanged Private Sub ChinaRingCkBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox2.CheckedChanged Private Sub ChinaRingCkBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox3.CheckedChanged Private Sub ChinaRingCkBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox4.CheckedChanged Private Sub ChinaRingCkBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox5.CheckedChanged Private Sub ChinaRingCkBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox6.CheckedChanged Private Sub ChinaRingCkBox7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox7.CheckedChanged Private Sub ChinaRingCkBox8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox8.CheckedChanged Private Sub ChinaRingCkBox9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChinaRingCkBox9.CheckedChanged Private Sub ChinaRingCkBox_CheckedChanged(ByVal index As Integer, ByVal sender As System.Object, ByVal e As System.EventArgs) End Class
Inherits System.Web.UI.Page
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Protected WithEvents ChinaRingCkBox1 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox2 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox3 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox4 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox5 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox6 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox7 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox8 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingCkBox9 As System.Web.UI.WebControls.CheckBox
Protected WithEvents ChinaRingLb1 As System.Web.UI.WebControls.Label
Protected ChinaRingCkBox(8) As System.Web.UI.WebControls.CheckBox
注意: 以下占位符声明是 Web 窗体设计器所必需的。
不要删除或移动它。
Private designerPlaceholderDeclaration As System.Object
CODEGEN: 此方法调用是 Web 窗体设计器所必需的
不要使用代码编辑器修改它。
InitializeComponent()
End Sub
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ChinaRingCkBox(0) = ChinaRingCkBox1
ChinaRingCkBox(1) = ChinaRingCkBox2
ChinaRingCkBox(2) = ChinaRingCkBox3
ChinaRingCkBox(3) = ChinaRingCkBox4
ChinaRingCkBox(4) = ChinaRingCkBox5
ChinaRingCkBox(5) = ChinaRingCkBox6
ChinaRingCkBox(6) = ChinaRingCkBox7
ChinaRingCkBox(7) = ChinaRingCkBox8
ChinaRingCkBox(8) = ChinaRingCkBox9
End Sub
ChinaRingCkBox_CheckedChanged(1, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(2, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(3, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(4, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(5, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(6, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(7, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(8, sender, e)
End Sub
ChinaRingCkBox_CheckedChanged(9, sender, e)
End Sub
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
asp.net 实现“九连环”小游戏_asp.net实例
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » asp.net 实现“九连环”小游戏_asp.net实例
相关推荐
-      对.net framework 反射的反思_asp.net技巧
-      .net3.5和vs2008中的asp.net ajax_asp.net技巧
-      使用asp.net ajax框架扩展html map控件_asp.net技巧
-      asp.net应用程序资源访问安全模型_asp.net技巧
-      photoshop初学者轻松绘制螺旋漩涡特效_photoshop教程
-      photoshop通道结合图层模式抠狗尾巴草_photoshop教程
-      web.config详解+asp.net优化_asp.net技巧
-      asp.net中多彩下拉框的实现_asp.net技巧