6 Commits
v1.1 ... v1.2.1

Author SHA1 Message Date
13632530821
aac15b255a 新增班级选择滚动条 2022-11-19 23:26:19 +08:00
13632530821
4a9bd48cc1 Merge branch 'master' of https://github.com/PeterBilly/--- 2022-11-19 21:54:33 +08:00
13632530821
2ff97d6284 更改.gitignore:不再包含assets 2022-11-19 21:54:18 +08:00
PeterBilly
7365bac137 Delete assets directory 2022-11-19 21:53:50 +08:00
13632530821
f6c6218a87 由于移除了文件自动隐藏功能,更新README 2022-11-19 21:33:21 +08:00
13632530821
715bda54aa 由于文件架构的变更,更新README 2022-11-19 21:19:47 +08:00
6 changed files with 11 additions and 9 deletions

7
.gitignore vendored
View File

@@ -1,7 +1,6 @@
点名器.spec
build/
dist/
.history/
config.data
names.xls
Build.bat
bin/
assets/
data/

View File

@@ -1,6 +1,5 @@
# ---一个点名器的python实现---
## 读取相同目录下的names.xls数据库文件
## 程序启动后如果检测到数据库文件会自动加上隐藏属性
## 读取data下的names.xls数据库文件
## names.xls必须满足以下条件:
### 1. 至少两行和不多于也不少于四列
### 2. 第一行的四个单元格分别是 |序号|班级|学科|姓名
@@ -34,9 +33,8 @@
![image](https://user-images.githubusercontent.com/10991308/200277421-a81b11a2-eec2-4373-957a-37dc134ef0b8.png)
### 在相同目录下编辑一个config.data文件
### 在data目录下编辑一个config.data文件
### 如果程序没有检测到文件,什么都不会发生
### 如果检测到了,自动加隐藏属性并读取文件
### config.data需要符合以下语法:
#### 1. 由N行组成
#### 2. 每一行对应一位需要更改概率的序号

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

View File

@@ -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()