mirror of
https://github.com/CHN-beta/group-meeting-lottery.git
synced 2024-10-22 19:38:43 +08:00
我也忘了改了什么
This commit is contained in:
parent
d1a3ec1b98
commit
783a50a984
19
Form1.Designer.vb
generated
19
Form1.Designer.vb
generated
@ -39,12 +39,13 @@ Partial Class Form1
|
||||
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
Me.Button6 = New System.Windows.Forms.Button()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button1
|
||||
'
|
||||
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.Location = New System.Drawing.Point(231, 316)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(170, 72)
|
||||
Me.Button1.TabIndex = 0
|
||||
@ -150,7 +151,6 @@ Partial Class Form1
|
||||
'TextBox4
|
||||
'
|
||||
Me.TextBox4.BackColor = System.Drawing.SystemColors.HighlightText
|
||||
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"
|
||||
@ -182,6 +182,7 @@ Partial Class Form1
|
||||
'
|
||||
'Timer1
|
||||
'
|
||||
Me.Timer1.Interval = 50
|
||||
'
|
||||
'Timer2
|
||||
'
|
||||
@ -195,15 +196,25 @@ Partial Class Form1
|
||||
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" &
|
||||
Me.Label5.Text = "code by 陈浩南@第一小组" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "最后修改于2022年4月20日,基于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
|
||||
'
|
||||
'Button6
|
||||
'
|
||||
Me.Button6.Location = New System.Drawing.Point(12, 447)
|
||||
Me.Button6.Name = "Button6"
|
||||
Me.Button6.Size = New System.Drawing.Size(75, 23)
|
||||
Me.Button6.TabIndex = 14
|
||||
Me.Button6.Text = "导出数据"
|
||||
Me.Button6.UseVisualStyleBackColor = True
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 17.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(640, 482)
|
||||
Me.Controls.Add(Me.Button6)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.TextBox4)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
@ -219,6 +230,7 @@ Partial Class Form1
|
||||
Me.Controls.Add(Me.Button2)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D
|
||||
Me.ImeMode = System.Windows.Forms.ImeMode.Disable
|
||||
Me.MaximizeBox = False
|
||||
Me.Name = "Form1"
|
||||
Me.Text = "KK集团大组会抽奖"
|
||||
@ -243,4 +255,5 @@ Partial Class Form1
|
||||
Friend WithEvents Timer1 As Timer
|
||||
Friend WithEvents Timer2 As Timer
|
||||
Friend WithEvents Label5 As Label
|
||||
Friend WithEvents Button6 As Button
|
||||
End Class
|
||||
|
49
Form1.vb
49
Form1.vb
@ -14,12 +14,15 @@
|
||||
},
|
||||
New List(Of String) From
|
||||
{
|
||||
"曾鑫龙", "常青", "陈晨", "陈铭禹", "陈子龙", "范洋涛", "费煜晨", "高扬钧", "胡玮琳", "黄飞鸿", "黄家新",
|
||||
"蓝进肾", "李光容", "李锦安", "李迎秋", "林建平", "刘海洋", "刘兴宜", "柳梦宇", "莫炳杰", "聂思晴", "平坦",
|
||||
"曲善直", "檀鹏", "唐唯卿", "万景", "吴建峰", "吴启鹏", "吴维", "吴雪峰", "徐聪卉", "徐望舒", "杨成彪", "叶晓芳",
|
||||
"张爱忠", "张腾", "张耀宗", "张裕祥", "张宗南", "周小龙"
|
||||
"曾鑫龙", "常青", "陈铭禹", "陈子龙", "范洋涛", "费煜晨", "高扬钧", "胡玮琳", "黄飞鸿",
|
||||
"蓝进肾", "李光容", "李锦安", "李迎秋", "林建平", "刘海洋", "柳梦宇", "莫炳杰", "聂思晴",
|
||||
"曲善直", "唐唯卿", "万景", "吴启鹏", "吴维", "吴雪峰", "徐望舒", "杨成彪", "叶晓芳",
|
||||
"张腾", "张裕祥", "张宗南", "周小龙"
|
||||
},
|
||||
New List(Of String) From {"赵三", "赵四", "赵五"}
|
||||
New List(Of String) From
|
||||
{
|
||||
"陈晨", "黄家新", "黄昱祺", "刘兴宜", "平坦", "檀鹏", "吴建峰", "徐聪卉", "张爱忠", "张耀宗"
|
||||
}
|
||||
}
|
||||
|
||||
Private TextBox_(3) As TextBox
|
||||
@ -31,6 +34,7 @@
|
||||
' 在 InitializeComponent() 调用之后添加任何初始化。
|
||||
TextBox_ = {TextBox1, TextBox2, TextBox3, TextBox4}
|
||||
ButtonRegenerate_ = {Button2, Button3, Button4, Button5}
|
||||
OfficeOpenXml.ExcelPackage.LicenseContext = OfficeOpenXml.LicenseContext.NonCommercial
|
||||
End Sub
|
||||
|
||||
Private Sub set_select_name(i As Integer)
|
||||
@ -44,8 +48,7 @@
|
||||
|
||||
|
||||
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 2
|
||||
For i As Integer = 0 To 3
|
||||
set_select_name(i)
|
||||
Next
|
||||
End Sub
|
||||
@ -54,23 +57,20 @@
|
||||
If (Timer1.Enabled) Then
|
||||
Timer1.Enabled = False
|
||||
Button1.Text = "再来一次"
|
||||
'For i As Integer = 0 To 3
|
||||
For i As Integer = 0 To 2
|
||||
For i As Integer = 0 To 3
|
||||
ButtonRegenerate_(i).Visible = True
|
||||
Next
|
||||
Else
|
||||
Timer1.Enabled = True
|
||||
Button1.Text = "停!"
|
||||
'For i As Integer = 0 To 3
|
||||
For i As Integer = 0 To 2
|
||||
For i As Integer = 0 To 3
|
||||
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 2
|
||||
For i As Integer = 0 To 3
|
||||
If sender Is ButtonRegenerate_(i) Then
|
||||
set_select_name(i)
|
||||
End If
|
||||
@ -96,4 +96,27 @@
|
||||
MsgBox("调用浏览器失败,请手动使用浏览器访问kkmeeting.chn.moe。")
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
|
||||
Dim dialog As New SaveFileDialog With {.Filter = "Excel 工作簿|*.xlsx", .Title = "保存为excel", .FileName = "成员名单"}
|
||||
Dim result = dialog.ShowDialog()
|
||||
If result = DialogResult.OK Then
|
||||
Try
|
||||
If FileIO.FileSystem.FileExists(dialog.FileName) Then FileIO.FileSystem.DeleteFile(dialog.FileName)
|
||||
Dim file As New OfficeOpenXml.ExcelPackage(dialog.FileName)
|
||||
Dim sheet = file.Workbook.Worksheets.Add("分组名单")
|
||||
For i As Integer = 0 To 3
|
||||
Dim c = Chr(Asc("A"c) + i)
|
||||
sheet.Cells(c + "1").Value = "第" + Convert.ToString(i + 1) + "小组"
|
||||
For j As Integer = 0 To Students_(i).Count - 1
|
||||
sheet.Cells(c + Convert.ToString(j + 2)).Value = Students_(i)(j)
|
||||
Next
|
||||
Next
|
||||
file.Save()
|
||||
MsgBox("保存成功")
|
||||
Catch ex As Exception
|
||||
MsgBox("保存失败")
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
73
My Project/Settings.Designer.vb
generated
Normal file
73
My Project/Settings.Designer.vb
generated
Normal file
@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' 此代码由工具生成。
|
||||
' 运行时版本:4.0.30319.42000
|
||||
'
|
||||
' 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
' 重新生成代码,这些更改将会丢失。
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.1.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings 自动保存功能"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.幸运抽奖.My.MySettings
|
||||
Get
|
||||
Return Global.幸运抽奖.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
6
My Project/Settings.settings
Normal file
6
My Project/Settings.settings
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
</SettingsFile>
|
14
幸运抽奖.vbproj
14
幸运抽奖.vbproj
@ -24,6 +24,10 @@
|
||||
<Import Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EPPlus" Version="6.0.7" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="My Project\Application.Designer.vb">
|
||||
<DesignTime>True</DesignTime>
|
||||
@ -35,6 +39,11 @@
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="My Project\Settings.Designer.vb">
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@ -50,6 +59,11 @@
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Update="My Project\Settings.settings">
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue
Block a user