Commit 113d6770 by BellCodeEditor

auto save

parent b1be7aaa
Showing with 21 additions and 9 deletions
import tkinter
from tkinter import messagebox
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
name,password1,password2=app_reg.get_input()
if name=='' or password1=='' or password2=='':
messagebox.showwarning('警告','请填写完整的注册资料')
elif name in users:
messagebox.showwarning('错误','用户名已经存在!')
elif password1 != password2:
messagebox.showwarning('错误','两次密码不一致!')
else:
users[name]=password1
def login(): # 登录验证
pass
......@@ -35,7 +47,7 @@ class My_login(): # 登录窗口
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) # 显示成密文形式
bg="light grey",width=18) # 显示成密文形式
self.e1.place(x=120, y=80)
self.e2.place(x=120, y=140)
......@@ -67,10 +79,10 @@ class My_register(): # 注册窗口
bg="light grey", width=18) # 显示成明文形式
self.e1.place(x=140, y=80)
self.e2 = tkinter.Entry(self.root, show='*', font=('宋体', 14),
width=18)
bg="light grey",width=18)
self.e2.place(x=140, y=140)
self.e3 = tkinter.Entry(self.root, show='*', font=('宋体', 14),
width=18)
bg="light grey",width=18)
self.e3.place(x=140, y=200)
# Label文本标签,窗口界面文字:用户名、密码、确认密码
......
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