Commit ec5982a7 by BellCodeEditor

save project

parent 145fe74a
Showing with 25 additions and 20 deletions
import tkinter
def login_to_reg(): # 登录界面转注册界面
pass
app_login.root.destroy()
global app_reg
app_reg = My_register()
app_reg.show()
def reg_to_login(): # 注册界面转登录界面
pass
app_reg.root.destroy()
global app_login
app_login = My_login()
app_login.show()
def register(): # 注册验证
pass
......@@ -21,21 +27,21 @@ class My_login(): # 登录窗口
def show(self): # 登录界面的所有控件
# Label文本标签,界面提示信息
l = tkinter.Label(self.root, text='您好!请登录', bg='green',
font=('体', 15), width=40, height=2)
l = tkinter.Label(self.root, text='您好!请登录', bg='sky blue',
font=('体', 15), width=40, height=2)
l.place(x=0, y=0)
l = tkinter.Label(self.root, text='用户名:', font=("体", 12),
l = tkinter.Label(self.root, text='用户名:', font=("体", 12),
fg="black")
l.place(x=50, y=80)
l = tkinter.Label(self.root, text='密 码:', font=("体", 12),
l = tkinter.Label(self.root, text='密 码:', font=("体", 12),
fg="black")
l.place(x=50, y=140)
# Entry单行文本输入框:用户名、密码
self.e1 = tkinter.Entry(self.root, show=None, font=('体', 14),
self.e1 = tkinter.Entry(self.root, show=None, font=('体', 14),
bg="light grey", width=18) # 显示成明文形式
self.e2 = tkinter.Entry(self.root, show='*', font=('宋体', 14),
width=18) # 显示成密文形式
self.e2 = tkinter.Entry(self.root, show='3', font=('楷体', 14),
bg="light grey",width=18) # 显示成密文形式
self.e1.place(x=120, y=80)
self.e2.place(x=120, y=140)
......@@ -63,27 +69,27 @@ class My_register(): # 注册窗口
def show(self): # 注册界面的所有控件
# 用户名、密码、确认密码输入框
self.e1 = tkinter.Entry(self.root, show=None, font=('体', 14),
self.e1 = tkinter.Entry(self.root, show=None, font=('体', 14),
bg="light grey", width=18) # 显示成明文形式
self.e1.place(x=140, y=80)
self.e2 = tkinter.Entry(self.root, show='*', font=('宋体', 14),
width=18)
self.e2 = tkinter.Entry(self.root, show='4', font=('楷体', 14),
bg="light grey",width=18)
self.e2.place(x=140, y=140)
self.e3 = tkinter.Entry(self.root, show='*', font=('宋体', 14),
width=18)
self.e3 = tkinter.Entry(self.root, show='4', font=('楷体', 14),
bg="light grey",width=18)
self.e3.place(x=140, y=200)
# Label文本标签,窗口界面文字:用户名、密码、确认密码
lab = tkinter.Label(self.root, text='您好!请填写注册信息',
font=('宋体', 15),fg="black", width=40, height=2, bg="green")
font=('楷体', 15),fg="black", width=40, height=2, bg="sky blue")
lab.place(x=0, y=0)
lab1 = tkinter.Label(self.root, text='用户名:', font=("体", 12),
lab1 = tkinter.Label(self.root, text='用户名:', font=("体", 12),
fg="black")
lab1.place(x=60, y=80)
lab2 = tkinter.Label(self.root, text='密 码:', font=("体", 12),
lab2 = tkinter.Label(self.root, text='密 码:', font=("体", 12),
fg="black")
lab2.place(x=60, y=140)
lab3 = tkinter.Label(self.root, text='确认密码:', font=("体", 12),
lab3 = tkinter.Label(self.root, text='确认密码:', font=("体", 12),
fg="black")
lab3.place(x=50, y=200)
......
{"admin": "123456"}
\ No newline at end of file
{"admin": "123456"}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment