Skip to content

Commit

Permalink
注释的中文与数字间增加空格
Browse files Browse the repository at this point in the history
明确 RandomFlag 的默认值
  • Loading branch information
myunco committed Jan 18, 2025
1 parent 0c456bc commit ec23970
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ Download:
Exit Sub
End If
Case 3
Static RandomFlag As Boolean
Static RandomFlag As Boolean = False '此 Flag 仅在生成随机数后赋值为 True
Static PresetIndex As Integer
Dim Preset = Setup.Get("UiCustomPreset")
If Preset <> 12 Then '非随机预设
PresetIndex = Preset
ElseIf RandomFlag = False Then '确保每次启动只生成一次随机数
Log("[Page] 主页预设:随机预设")
PresetIndex = New Random().Next(0, 12) '生成0-11的随机数
PresetIndex = New Random().Next(0, 12) '生成 0-11 的随机数
RandomFlag = True
End If
Select Case PresetIndex
Expand Down

0 comments on commit ec23970

Please sign in to comment.