社团作业,每人做了一个东南大学课表查询系统,不得不感叹,python确实厉害(那我还学MFC干什么。。)!
这是搜索的主窗体,用来获取用户输入的信息(search.py)。
import tkinter as tk
import tkinter.messagebox
from course import *
from tkinter import ttk
from table import *
#展示搜索界面
window = tk.Tk()
window.title('东南大学课表查询系统')
window.geometry('300x150')
window.resizable(False, False)
#学号或一卡通号
student_id = tk.StringVar()
student_id.set('')
label_student_id = tk.Label(window, text='一卡通号或学号:', justify=tkinter.RIGHT)
label_student_id.place(x=30, y=20, width=80, height=20)
entry_student_id = tk.Entry(window, width=80, textvariable=student_id)
student_id.set("213173182")
entry_student_id.place(x=120, y=20, width=110, height=20)
#学年
academic_year = tkinter.StringVar()
academic_year.set('')
label_academic_year = tk.Label(window, text='学年 学期:', justify=tkinter.RIGHT)
label_academic_year.place(x=40, y=50, width=80, height=20)
entry_academic_year = ttk.Combobox(window, width=80, textvariable=academic_year)
entry_academic_year['values'] = (
"18-19-2",
"18-19-1",
"17-18-3&