更新 随机选人-tk - 作业版-s.py
This commit is contained in:
parent
02fb994f87
commit
e5da8b389a
@ -999,7 +999,7 @@ def schedule(fr):
|
||||
on_button_click(a,'')
|
||||
lose=[]
|
||||
if fr=='fromclean':
|
||||
step_wid = (50 - root.winfo_width()) / speed
|
||||
step_wid = (80 - root.winfo_width()) / speed
|
||||
step_hei = (500 - root.winfo_height()) / speed
|
||||
step_x = (root.winfo_x() - (screen_width)) / speed
|
||||
step_y = ((root.winfo_y() - root.winfo_screenheight() / 2) + 250) / speed
|
||||
@ -1012,9 +1012,9 @@ def schedule(fr):
|
||||
'{}x{}+{}+{}'.format(int(wid), int(hei), int(root.winfo_x() - step_x), int(root.winfo_y() - step_y)))
|
||||
root.update()
|
||||
root.geometry(
|
||||
'{}x{}+{}+{}'.format(50, 500, screen_width - 50, root.winfo_screenheight() // 2 - 500 // 2))
|
||||
'{}x{}+{}+{}'.format(80, 500, screen_width - 50, root.winfo_screenheight() // 2 - 500 // 2))
|
||||
elif fr=='fromchoice':
|
||||
step_wid = (50 - root.winfo_width()) / speed
|
||||
step_wid = (80 - root.winfo_width()) / speed
|
||||
step_hei = (500 - root.winfo_height()) / speed
|
||||
step_x = (root.winfo_x() - (screen_width)) / speed
|
||||
step_y = ((root.winfo_y() - root.winfo_screenheight() / 2) + 250) / speed
|
||||
@ -1027,9 +1027,9 @@ def schedule(fr):
|
||||
'{}x{}+{}+{}'.format(int(wid), int(hei), int(root.winfo_x() - step_x), int(root.winfo_y() - step_y)))
|
||||
root.update()
|
||||
root.geometry(
|
||||
'{}x{}+{}+{}'.format(50, 500, screen_width - 50, root.winfo_screenheight() // 2 - 500 // 2))
|
||||
'{}x{}+{}+{}'.format(80, 500, screen_width - 50, root.winfo_screenheight() // 2 - 500 // 2))
|
||||
elif fr=='fromhomework':
|
||||
step_wid = (50 - root.winfo_width()) / speed
|
||||
step_wid = (80 - root.winfo_width()) / speed
|
||||
step_hei = (500 - root.winfo_height()) / speed
|
||||
step_x = (root.winfo_x()-(screen_width)) / speed
|
||||
step_y = ((root.winfo_y() - root.winfo_screenheight() / 2)+250) / speed
|
||||
@ -1042,7 +1042,7 @@ def schedule(fr):
|
||||
'{}x{}+{}+{}'.format(int(wid), int(hei), int(root.winfo_x() - step_x), int(root.winfo_y() - step_y)))
|
||||
root.update()
|
||||
root.geometry(
|
||||
'{}x{}+{}+{}'.format(50, 500, screen_width - 50,root.winfo_screenheight() // 2 - 500 // 2))
|
||||
'{}x{}+{}+{}'.format(80, 500, screen_width - 50,root.winfo_screenheight() // 2 - 500 // 2))
|
||||
root.update()
|
||||
root.title('课程表')
|
||||
root.resizable(0, 0)
|
||||
@ -1057,35 +1057,16 @@ def schedule(fr):
|
||||
on_button_click('请确认课程表文件\n存在且格式正确','')
|
||||
log('课程表文件不存在','error')
|
||||
root.quit()
|
||||
|
||||
g=0.113
|
||||
if len(listindes)==9:
|
||||
for i in range(1, len(listindes)):
|
||||
if '/' not in listindes[i]:
|
||||
zxs = tkinter.Label(text=listindes[i][0], width=15, font=('华文行楷', 40))
|
||||
else:
|
||||
zxs = tkinter.Label(text=listindes[i], width=15, font=('华文行楷', 20))
|
||||
zxs.place(relx=0.5, rely=g, anchor='center')
|
||||
g = g + 0.113
|
||||
elif len(listindes)==10:
|
||||
for i in range(1, len(listindes)):
|
||||
if '/' not in listindes[i]:
|
||||
zxs = tkinter.Label(text=listindes[i][0], width=15, font=('华文行楷', 40))
|
||||
else:
|
||||
zxs = tkinter.Label(text=listindes[i], width=15, font=('华文行楷', 20))
|
||||
zxs.place(relx=0.5, rely=g, anchor='center')
|
||||
g = g + 0.093
|
||||
else:
|
||||
for i in range(1, len(listindes)):
|
||||
if '/' not in listindes[i]:
|
||||
zxs = tkinter.Label(text=listindes[i][0], width=15, font=('华文行楷', 40))
|
||||
else:
|
||||
zxs = tkinter.Label(text=listindes[i], width=15, font=('华文行楷', 20))
|
||||
zxs.place(relx=0.5, rely=g, anchor='center')
|
||||
g = g + 0.106
|
||||
zxs.grid(column=0,row=i)
|
||||
listindes.clear()
|
||||
y = tkinter.Button(text=zhou[d.weekday()], width=15, command=lambda :choice('fromschedule'))
|
||||
y.place(relx=0.5, rely=1, anchor='s')
|
||||
y.grid(column=0,row=i+1)
|
||||
global h
|
||||
h = tkinter.Button(text='添加作业', command=lambda: homework())
|
||||
h.place(relx=0.5, rely=0, anchor='n')
|
||||
|
Loading…
Reference in New Issue
Block a user