Commit 88f2abaf by BellCodeEditor

save project

parent 8e391c80
Showing with 15 additions and 7 deletions
import tkinter as tk import tkinter as tk
clock = 0
def btn(): def btn():
global clock
global var global var
global en_user global en_user
global en_pass global en_pass
usersname = en_user.get() usersname = en_user.get()
password = en_pass.get() password = en_pass.get()
if usersname == "ak47" and password == 'dnfh': if clock != 5:
var.set("登录成功!") if usersname == "ak47" and password == 'dnfh':
elif usersname != 'ak47': var.set("登录成功!")
var.set("用户名错误") elif usersname != 'ak47':
elif password != 'dnfh': var.set("用户名错误")
var.set("密码错误!") clock += 1
elif password != 'dnfh':
var.set("密码错误!")
clock += 1
else:
var.set("用户名和密码错误!")
clock += 1
else: else:
var.set("用户名和密码错误!") var.set("你已无法登录!")
root = tk.Tk() root = tk.Tk()
root.geometry("200x150") root.geometry("200x150")
root.title("登录") root.title("登录")
......
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