熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

Asp.net 實現“九連環”小游戲

2022-06-13   來源: .NET編程 

  ublic Class ChinaRing
  
  Inherits SystemWebUIPage
  
  #Region Web 窗體設計器生成的代碼
  
  該調用是 Web 窗體設計器所必需的
  
  <SystemDiagnosticsDebuggerStepThrough()> Private Sub InitializeComponent()
  
  End Sub
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingCkBox As SystemWebUIWebControlsCheckBox
  
  Protected WithEvents ChinaRingLb As SystemWebUIWebControlsLabel
  
  Protected ChinaRingCkBox() As SystemWebUIWebControlsCheckBox
  
  注意: 以下占位符聲明是 Web 窗體設計器所必需的
  
  不要刪除或移動它
  
  Private designerPlaceholderDeclaration As SystemObject
  
  Private Sub Page_Init(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles MyBaseInit
  
  CODEGEN: 此方法調用是 Web 窗體設計器所必需的
  
  不要使用代碼編輯器修改它
  
  InitializeComponent()
  
  End Sub
  
  #End Region
  
  Private Sub Page_Load(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles MyBaseLoad
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  ChinaRingCkBox() = ChinaRingCkBox
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal sender As SystemObject ByVal e As SystemEventArgs) Handles ChinaRingCkBoxCheckedChanged
  
  ChinaRingCkBox_CheckedChanged( sender e)
  
  End Sub
  
  Private Sub ChinaRingCkBox_CheckedChanged(ByVal index As Integer ByVal sender As SystemObject ByVal e As SystemEventArgs)
  
  Dim i As Integer
  
  i =
  
  Dim ChinaRingCk As Boolean = False
  
  If index = Then
  
  ChinaRingCk = True
  
  Else
  
  If ChinaRingCkBox(index )Checked Then
  
  ChinaRingCk = True
  
  End If
  
  Do While i < index
  
  If ChinaRingCkBox(i)Checked Then
  
  ChinaRingCk = False
  
  End If
  
  i = i +
  
  Loop
  
  End If
  
  If Not ChinaRingCk Then
  
  ChinaRingCkBox(index )Checked = Not ChinaRingCkBox(index )Checked
  
  可以在這裡加一個提示根據條件提示不能套入或不能拿出該環
  
  End If
  
  End Sub
  
  End Class
From:http://tw.wingwit.com/Article/program/net/201311/13378.html
    推薦文章
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.