mirror of
https://github.com/HChaZZY/Random-Picker.git
synced 2025-12-06 10:33:50 +08:00
加入临时取消+和-标记的功能
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -2,3 +2,5 @@
|
|||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
.history/
|
.history/
|
||||||
|
config.data
|
||||||
|
names.xls
|
||||||
6
点名器.pyw
6
点名器.pyw
@@ -119,7 +119,7 @@ for tmp_class in classes:
|
|||||||
listbox.insert("end",tmp_class)
|
listbox.insert("end",tmp_class)
|
||||||
|
|
||||||
def sel_class(flag = 1):
|
def sel_class(flag = 1):
|
||||||
global filter, listbox, classes, cur_stu, students
|
global filter, listbox, classes, cur_stu, students, percent_override
|
||||||
filter.clear()
|
filter.clear()
|
||||||
for selection in listbox.curselection():
|
for selection in listbox.curselection():
|
||||||
# print(selection)
|
# print(selection)
|
||||||
@@ -128,6 +128,7 @@ def sel_class(flag = 1):
|
|||||||
if filter:
|
if filter:
|
||||||
if flag:
|
if flag:
|
||||||
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
msgbox.showinfo('班级选择已应用', '已应用当前班级选择', parent=gui)
|
||||||
|
percent_override = False
|
||||||
cur_stu.clear()
|
cur_stu.clear()
|
||||||
for student in students:
|
for student in students:
|
||||||
if student.class_name in filter:
|
if student.class_name in filter:
|
||||||
@@ -136,9 +137,12 @@ def sel_class(flag = 1):
|
|||||||
else:
|
else:
|
||||||
if flag:
|
if flag:
|
||||||
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
msgbox.showwarning('班级选择已应用', '当前设置会选择所有班级的名单,这样对吗?', parent=gui)
|
||||||
|
percent_override = False
|
||||||
filter = classes[:]
|
filter = classes[:]
|
||||||
cur_stu = students[:]
|
cur_stu = students[:]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def choose():
|
def choose():
|
||||||
global last_choice, cur_stu
|
global last_choice, cur_stu
|
||||||
sel_class(0)
|
sel_class(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user