2022.4.18

This commit is contained in:
陈浩南 2022-04-18 21:04:18 +08:00
parent 189c44f429
commit d1a3ec1b98
7 changed files with 124 additions and 86 deletions

126
Form1.Designer.vb generated
View File

@ -37,160 +37,174 @@ Partial Class Form1
Me.Label4 = New System.Windows.Forms.Label()
Me.Button5 = New System.Windows.Forms.Button()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.PictureBox1 = New System.Windows.Forms.PictureBox()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
Me.Label5 = New System.Windows.Forms.Label()
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button1.Location = New System.Drawing.Point(115, 246)
Me.Button1.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button1.Location = New System.Drawing.Point(227, 336)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(125, 49)
Me.Button1.Size = New System.Drawing.Size(170, 72)
Me.Button1.TabIndex = 0
Me.Button1.Text = "开始抽奖"
Me.Button1.UseVisualStyleBackColor = True
'
'Button2
'
Me.Button2.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button2.Location = New System.Drawing.Point(602, 33)
Me.Button2.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button2.Location = New System.Drawing.Point(421, 38)
Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(107, 38)
Me.Button2.Size = New System.Drawing.Size(147, 60)
Me.Button2.TabIndex = 1
Me.Button2.Text = "换一个"
Me.Button2.UseVisualStyleBackColor = True
Me.Button2.Visible = False
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label1.Location = New System.Drawing.Point(356, 38)
Me.Label1.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label1.Location = New System.Drawing.Point(51, 45)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(96, 28)
Me.Label1.Size = New System.Drawing.Size(160, 46)
Me.Label1.TabIndex = 2
Me.Label1.Text = "第一小组"
'
'TextBox1
'
Me.TextBox1.BackColor = System.Drawing.SystemColors.HighlightText
Me.TextBox1.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox1.Location = New System.Drawing.Point(458, 35)
Me.TextBox1.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox1.Location = New System.Drawing.Point(217, 42)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.ReadOnly = True
Me.TextBox1.Size = New System.Drawing.Size(138, 34)
Me.TextBox1.Size = New System.Drawing.Size(198, 52)
Me.TextBox1.TabIndex = 3
Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'TextBox2
'
Me.TextBox2.BackColor = System.Drawing.SystemColors.HighlightText
Me.TextBox2.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox2.Location = New System.Drawing.Point(458, 79)
Me.TextBox2.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox2.Location = New System.Drawing.Point(217, 108)
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.ReadOnly = True
Me.TextBox2.Size = New System.Drawing.Size(138, 34)
Me.TextBox2.Size = New System.Drawing.Size(198, 52)
Me.TextBox2.TabIndex = 6
Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label2.Location = New System.Drawing.Point(356, 82)
Me.Label2.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label2.Location = New System.Drawing.Point(51, 111)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(96, 28)
Me.Label2.Size = New System.Drawing.Size(160, 46)
Me.Label2.TabIndex = 5
Me.Label2.Text = "第二小组"
'
'Button3
'
Me.Button3.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button3.Location = New System.Drawing.Point(602, 77)
Me.Button3.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button3.Location = New System.Drawing.Point(421, 104)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(107, 38)
Me.Button3.Size = New System.Drawing.Size(147, 60)
Me.Button3.TabIndex = 4
Me.Button3.Text = "换一个"
Me.Button3.UseVisualStyleBackColor = True
Me.Button3.Visible = False
'
'TextBox3
'
Me.TextBox3.BackColor = System.Drawing.SystemColors.HighlightText
Me.TextBox3.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox3.Location = New System.Drawing.Point(458, 123)
Me.TextBox3.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox3.Location = New System.Drawing.Point(217, 174)
Me.TextBox3.Name = "TextBox3"
Me.TextBox3.ReadOnly = True
Me.TextBox3.Size = New System.Drawing.Size(138, 34)
Me.TextBox3.Size = New System.Drawing.Size(198, 52)
Me.TextBox3.TabIndex = 9
Me.TextBox3.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label3.Location = New System.Drawing.Point(356, 126)
Me.Label3.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label3.Location = New System.Drawing.Point(51, 177)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(96, 28)
Me.Label3.Size = New System.Drawing.Size(160, 46)
Me.Label3.TabIndex = 8
Me.Label3.Text = "第三小组"
'
'Button4
'
Me.Button4.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button4.Location = New System.Drawing.Point(602, 121)
Me.Button4.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button4.Location = New System.Drawing.Point(421, 170)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(107, 38)
Me.Button4.Size = New System.Drawing.Size(147, 60)
Me.Button4.TabIndex = 7
Me.Button4.Text = "换一个"
Me.Button4.UseVisualStyleBackColor = True
Me.Button4.Visible = False
'
'TextBox4
'
Me.TextBox4.BackColor = System.Drawing.SystemColors.HighlightText
Me.TextBox4.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox4.Location = New System.Drawing.Point(458, 167)
Me.TextBox4.Enabled = False
Me.TextBox4.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.TextBox4.Location = New System.Drawing.Point(217, 240)
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.ReadOnly = True
Me.TextBox4.Size = New System.Drawing.Size(138, 34)
Me.TextBox4.Size = New System.Drawing.Size(198, 52)
Me.TextBox4.TabIndex = 12
Me.TextBox4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label4.Location = New System.Drawing.Point(356, 170)
Me.Label4.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Label4.Location = New System.Drawing.Point(51, 243)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(96, 28)
Me.Label4.Size = New System.Drawing.Size(160, 46)
Me.Label4.TabIndex = 11
Me.Label4.Text = "第四小组"
'
'Button5
'
Me.Button5.Font = New System.Drawing.Font("Microsoft YaHei UI", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button5.Location = New System.Drawing.Point(602, 165)
Me.Button5.Font = New System.Drawing.Font("Microsoft YaHei UI", 26.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point)
Me.Button5.Location = New System.Drawing.Point(421, 236)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(107, 38)
Me.Button5.Size = New System.Drawing.Size(147, 60)
Me.Button5.TabIndex = 10
Me.Button5.Text = "换一个"
Me.Button5.UseVisualStyleBackColor = True
Me.Button5.Visible = False
'
'Timer1
'
'
'PictureBox1
'Timer2
'
Me.PictureBox1.Image = Global.幸运抽奖.My.Resources.Resources.egg
Me.PictureBox1.Location = New System.Drawing.Point(48, 23)
Me.PictureBox1.Name = "PictureBox1"
Me.PictureBox1.Size = New System.Drawing.Size(272, 208)
Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
Me.PictureBox1.TabIndex = 13
Me.PictureBox1.TabStop = False
Me.PictureBox1.Visible = False
Me.Timer2.Enabled = True
Me.Timer2.Interval = 500
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(243, 411)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(385, 68)
Me.Label5.TabIndex = 13
Me.Label5.Text = "code by 陈浩南@第一小组" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "最后修改于2022年4月18日基于2021年10月5日统计的组成员信息" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "如果不是最新版双击此处或手动访问kkmeetin" &
"g.chn.moe下载最新版" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "您也可以访问我的Github获取源代码"
Me.Label5.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'Form1
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(763, 319)
Me.Controls.Add(Me.PictureBox1)
Me.ClientSize = New System.Drawing.Size(640, 482)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.TextBox4)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Button5)
@ -204,9 +218,10 @@ Partial Class Form1
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
Me.MaximizeBox = False
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.Text = "KK集团大组会抽奖"
Me.ResumeLayout(False)
Me.PerformLayout()
@ -226,5 +241,6 @@ Partial Class Form1
Friend WithEvents Label4 As Label
Friend WithEvents Button5 As Button
Friend WithEvents Timer1 As Timer
Friend WithEvents PictureBox1 As PictureBox
Friend WithEvents Timer2 As Timer
Friend WithEvents Label5 As Label
End Class

View File

@ -60,4 +60,7 @@
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>109, 17</value>
</metadata>
</root>

View File

@ -1,11 +1,27 @@
Public Class Form1
Private Students_() As List(Of String) =
{
New List(Of String) From {"张三", "张四", "张五"},
New List(Of String) From {"李三", "李四", "李五"},
New List(Of String) From {"王三", "王四", "王五"},
New List(Of String) From
{
"蔡文为", "蔡叶杭", "陈秉桓", "陈柏逸", "陈瀚", "陈浩南", "陈俊鑫", "陈心路", "付星瑞", "郭斌", "郭中丽",
"胡汛", "江莹", "李鹏岗", "林泽锋", "刘国振", "刘璐", "刘志强", "卢诗强", "邱鸿伟", "沈鹏", "石澜", "唐锐凡",
"唐燕", "王豪", "王丽兰", "王永嘉", "项磊磊", "闫金健", "杨谦益", "张宏烨", "赵珊珊", "赵政仰", "钟志白", "周其程"
},
New List(Of String) From
{
"邓铁龙", "杜颖", "黄鑫", "林高翔", "楼伟涛", "曲真魁", "萨娜", "沈晓鑫", "汤昊", "吐尔洪江 吾拉木 ", "王小丹",
"王紫云", "向阳", "邢欢", "许书逸", "张晓娟", "赵经天", "郑力诚"
},
New List(Of String) From
{
"曾鑫龙", "常青", "陈晨", "陈铭禹", "陈子龙", "范洋涛", "费煜晨", "高扬钧", "胡玮琳", "黄飞鸿", "黄家新",
"蓝进肾", "李光容", "李锦安", "李迎秋", "林建平", "刘海洋", "刘兴宜", "柳梦宇", "莫炳杰", "聂思晴", "平坦",
"曲善直", "檀鹏", "唐唯卿", "万景", "吴建峰", "吴启鹏", "吴维", "吴雪峰", "徐聪卉", "徐望舒", "杨成彪", "叶晓芳",
"张爱忠", "张腾", "张耀宗", "张裕祥", "张宗南", "周小龙"
},
New List(Of String) From {"赵三", "赵四", "赵五"}
}
Private TextBox_(3) As TextBox
Private ButtonRegenerate_(3) As Button
@ -17,13 +33,6 @@
ButtonRegenerate_ = {Button2, Button3, Button4, Button5}
End Sub
Private Sub egg_try_visible()
PictureBox1.Visible = TextBox_(0).Text = "陈浩南"
End Sub
Private Sub egg_invisible()
PictureBox1.Visible = False
End Sub
Private Sub set_select_name(i As Integer)
Dim rand As New Random
Dim current_text = TextBox_(i).Text
@ -35,7 +44,8 @@
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
For i As Integer = 0 To 3
'For i As Integer = 0 To 3
For i As Integer = 0 To 2
set_select_name(i)
Next
End Sub
@ -44,21 +54,46 @@
If (Timer1.Enabled) Then
Timer1.Enabled = False
Button1.Text = "再来一次"
egg_try_visible()
'For i As Integer = 0 To 3
For i As Integer = 0 To 2
ButtonRegenerate_(i).Visible = True
Next
Else
Timer1.Enabled = True
Button1.Text = "停!"
egg_invisible()
'For i As Integer = 0 To 3
For i As Integer = 0 To 2
ButtonRegenerate_(i).Visible = False
Next
End If
End Sub
Private Sub ButtonRefresh_Click(sender As Object, e As EventArgs) Handles Button2.Click, Button3.Click, Button4.Click, Button5.Click
For i As Integer = 0 To 3
'For i As Integer = 0 To 3
For i As Integer = 0 To 2
If sender Is ButtonRegenerate_(i) Then
set_select_name(i)
End If
Next
egg_try_visible()
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
If Not Timer1.Enabled AndAlso TextBox_(0).Text.StartsWith("陈浩") Then
TextBox_(0).Text = "陈浩" + New List(Of String) From {"", "西", "", ""}((New Random).Next(0, 4))
TextBox_(0).Refresh()
End If
' If Me.Text = "" Then
' Me.Text = "激★情★大★抽★奖"
' Else
' Me.Text = ""
' End If
End Sub
Private Sub Label5_DoubleClick(sender As Object, e As EventArgs) Handles Label5.DoubleClick
Try
Process.Start(New ProcessStartInfo("https://kkmeeting.chn.moe") With {.UseShellExecute = True})
Catch ex As Exception
MsgBox("调用浏览器失败请手动使用浏览器访问kkmeeting.chn.moe。")
End Try
End Sub
End Class

View File

@ -59,15 +59,5 @@ Namespace My.Resources
resourceCulture = value
End Set
End Property
'''<summary>
''' 查找 System.Drawing.Bitmap 类型的本地化资源
'''</summary>
Friend ReadOnly Property egg() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("egg", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
End Module
End Namespace

View File

@ -117,8 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="egg" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\egg.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

BIN
egg.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

View File

@ -21,8 +21,6 @@
</PropertyGroup>
<ItemGroup>
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Windows.Forms" />
</ItemGroup>