mirror of
https://github.com/HChaZZY/Random-Picker.git
synced 2025-12-06 10:33:50 +08:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aac15b255a | ||
|
|
4a9bd48cc1 | ||
|
|
2ff97d6284 | ||
|
|
7365bac137 | ||
|
|
f6c6218a87 | ||
|
|
715bda54aa |
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,7 +1,6 @@
|
||||
点名器.spec
|
||||
build/
|
||||
dist/
|
||||
.history/
|
||||
config.data
|
||||
names.xls
|
||||
Build.bat
|
||||
bin/
|
||||
assets/
|
||||
data/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# ---一个点名器的python实现---
|
||||
## 读取相同目录下的names.xls数据库文件
|
||||
## 程序启动后如果检测到数据库文件会自动加上隐藏属性
|
||||
## 读取data下的names.xls数据库文件
|
||||
## names.xls必须满足以下条件:
|
||||
### 1. 至少两行和不多于也不少于四列
|
||||
### 2. 第一行的四个单元格分别是 |序号|班级|学科|姓名
|
||||
@@ -34,9 +33,8 @@
|
||||
|
||||

|
||||
|
||||
### 在相同目录下编辑一个config.data文件
|
||||
### 在data目录下编辑一个config.data文件
|
||||
### 如果程序没有检测到文件,什么都不会发生
|
||||
### 如果检测到了,自动加隐藏属性并读取文件
|
||||
### config.data需要符合以下语法:
|
||||
#### 1. 由N行组成
|
||||
#### 2. 每一行对应一位需要更改概率的序号
|
||||
|
||||
BIN
assets/proc.wav
BIN
assets/proc.wav
Binary file not shown.
BIN
assets/sel.wav
BIN
assets/sel.wav
Binary file not shown.
BIN
assets/点名器.ico
BIN
assets/点名器.ico
Binary file not shown.
|
Before Width: | Height: | Size: 29 KiB |
7
点名器.pyw
7
点名器.pyw
@@ -12,7 +12,7 @@ configname = "./data/config.data"
|
||||
selname = "./assets/sel.wav"
|
||||
procname = "./assets/proc.wav"
|
||||
iconname = "./assets/点名器.ico"
|
||||
gui_size = "620x200"
|
||||
gui_size = "650x200"
|
||||
|
||||
sound = True
|
||||
|
||||
@@ -209,6 +209,10 @@ startrandom = Button(gui, text = "立刻摇人!", font = ("宋体", 17, "bold"),
|
||||
|
||||
setclass = Button(gui, text = "应用班级选用", font = ("宋体", 17), height = 2, command = sel_class, bg = "white")
|
||||
|
||||
scrool = Scrollbar(gui, command = listbox.yview)
|
||||
|
||||
listbox.config(yscrollcommand=scrool.set)
|
||||
|
||||
name_label = Label(gui, textvariable = cur_name, font = ("宋体", 30, "bold"), width = 20, bg = "white", fg = "blue")
|
||||
class_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
subject_label = Label(gui, text = "", font = ("宋体", 15), width = 20, bg = "white")
|
||||
@@ -219,5 +223,6 @@ name_label.grid(row = 1, column = 1, sticky = N+S)
|
||||
listbox.grid(row = 1, column = 2, sticky = N+S)
|
||||
startrandom.grid(row = 3, column = 1, sticky = N+S+E+W)
|
||||
setclass.grid(row = 3, column = 2, sticky = N+S+E+W)
|
||||
scrool.grid(row = 1, column = 3, sticky = N+S)
|
||||
|
||||
gui.mainloop()
|
||||
Reference in New Issue
Block a user