Commit 88f2abaf by BellCodeEditor

save project

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