Commit 432407d4 by BellCodeEditor

save project

parent 145fe74a
Showing with 18 additions and 12 deletions
import tkinter import tkinter
def login_to_reg(): # 登录界面转注册界面 def login_to_reg(): # 登录界面转注册界面
pass app_login.root.destroy()
global app_reg
app_reg=My_register()
app_reg.show()
def reg_to_login(): # 注册界面转登录界面 def reg_to_login(): # 注册界面转登录界面
pass app_reg.root.destroy()
global app_login
app_login=My_login()
app_login.show()
def register(): # 注册验证 def register(): # 注册验证
pass pass
...@@ -24,17 +30,17 @@ class My_login(): # 登录窗口 ...@@ -24,17 +30,17 @@ class My_login(): # 登录窗口
l = tkinter.Label(self.root, text='您好!请登录', bg='green', l = tkinter.Label(self.root, text='您好!请登录', bg='green',
font=('宋体', 15), width=40, height=2) font=('宋体', 15), width=40, height=2)
l.place(x=0, y=0) l.place(x=0, y=0)
l = tkinter.Label(self.root, text='用户名:', font=("宋体", 12), l = tkinter.Label(self.root, text='用户名:', font=("隶书", 12),
fg="black") fg="black")
l.place(x=50, y=80) l.place(x=50, y=80)
l = tkinter.Label(self.root, text='密 码:', font=("宋体", 12), l = tkinter.Label(self.root, text='密 码:', font=("隶书", 12),
fg="black") fg="black")
l.place(x=50, y=140) l.place(x=50, y=140)
# Entry单行文本输入框:用户名、密码 # 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) # 显示成明文形式 bg="light grey", width=18) # 显示成明文形式
self.e2 = tkinter.Entry(self.root, show='*', font=('宋体', 14), self.e2 = tkinter.Entry(self.root, show='*', font=('隶书', 14),
width=18) # 显示成密文形式 width=18) # 显示成密文形式
self.e1.place(x=120, y=80) self.e1.place(x=120, y=80)
self.e2.place(x=120, y=140) self.e2.place(x=120, y=140)
...@@ -63,13 +69,13 @@ class My_register(): # 注册窗口 ...@@ -63,13 +69,13 @@ class My_register(): # 注册窗口
def show(self): # 注册界面的所有控件 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) # 显示成明文形式 bg="light grey", width=18) # 显示成明文形式
self.e1.place(x=140, y=80) self.e1.place(x=140, y=80)
self.e2 = tkinter.Entry(self.root, show='*', font=('宋体', 14), self.e2 = tkinter.Entry(self.root, show='*', font=('隶书', 14),
width=18) width=18)
self.e2.place(x=140, y=140) self.e2.place(x=140, y=140)
self.e3 = tkinter.Entry(self.root, show='*', font=('宋体', 14), self.e3 = tkinter.Entry(self.root, show='*', font=('隶书', 14),
width=18) width=18)
self.e3.place(x=140, y=200) self.e3.place(x=140, y=200)
...@@ -77,13 +83,13 @@ class My_register(): # 注册窗口 ...@@ -77,13 +83,13 @@ class My_register(): # 注册窗口
lab = tkinter.Label(self.root, text='您好!请填写注册信息', 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="green")
lab.place(x=0, y=0) lab.place(x=0, y=0)
lab1 = tkinter.Label(self.root, text='用户名:', font=("宋体", 12), lab1 = tkinter.Label(self.root, text='用户名:', font=("隶书", 12),
fg="black") fg="black")
lab1.place(x=60, y=80) lab1.place(x=60, y=80)
lab2 = tkinter.Label(self.root, text='密 码:', font=("宋体", 12), lab2 = tkinter.Label(self.root, text='密 码:', font=("隶书", 12),
fg="black") fg="black")
lab2.place(x=60, y=140) lab2.place(x=60, y=140)
lab3 = tkinter.Label(self.root, text='确认密码:', font=("宋体", 12), lab3 = tkinter.Label(self.root, text='确认密码:', font=("隶书", 12),
fg="black") fg="black")
lab3.place(x=50, y=200) lab3.place(x=50, y=200)
......
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