欢迎光临
我们一直在努力

用asp.net 实现“九连环” 小游戏-.NET教程,Asp.Net开发

建站超值云服务器,限时71元/月

msn:

public class chinaring1

inherits system.web.ui.page

#region " web 窗体设计器生成的代码 "

该调用是 web 窗体设计器所必需的。

<system.diagnostics.debuggerstepthrough()> private sub initializecomponent()

end sub

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

private sub page_init(byval sender as system.object, byval e as system.eventargs) handles mybase.init

codegen: 此方法调用是 web 窗体设计器所必需的

不要使用代码编辑器修改它。

initializecomponent()

end sub

#end region

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

private sub chinaringckbox1_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles chinaringckbox1.checkedchanged

chinaringckbox_checkedchanged(1, sender, e)

end sub

private sub chinaringckbox2_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles chinaringckbox2.checkedchanged

chinaringckbox_checkedchanged(2, sender, e)

end sub

private sub chinaringckbox3_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles chinaringckbox3.checkedchanged

chinaringckbox_checkedchanged(3, sender, e)

end sub

private sub chinaringckbox4_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles chinaringckbox4.checkedchanged

chinaringckbox_checkedchanged(4, sender, e)

end sub

private sub chinaringckbox5_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles chinaringckbox5.checkedchanged

chinaringckbox_checkedchanged(5, sender, e)

end sub

private sub chinaringckbox6_checkedchanged(byval sender as system.object, byval e as system.eventargs) handles chinaringckbox6.checkedchanged

chinaringckbox_checkedchanged(6, sender, e)

end sub

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

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用asp.net 实现“九连环” 小游戏-.NET教程,Asp.Net开发
分享到: 更多 (0)