Commit 8fdd580d by BellCodeEditor

save project

parent d1aac6be
Showing with 11 additions and 5 deletions
import tkinter
from tkinter import messagebox
import json
from os import system
with open("user.txt", "r", encoding="utf-8") as f:
info = f.read()
......@@ -40,6 +41,8 @@ def login(): # 登录验证
pwd = users.get(name)
if pwd == password:
messagebox.showinfo("成功", "登录成功")
app_login.root.destroy()
system("call my_client.py")
else:
messagebox.showwarning("错误", "用户名或密码错误!")
......
......@@ -5,6 +5,7 @@ alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
"12月18日给蒂法过生日", "12.24送妈妈圣诞礼物"]
unlocklist={}
infolist={}
class Note(): # 便签、笔记
def __init__(self):
......@@ -32,11 +33,12 @@ class Note(): # 便签、笔记
i=0
for info in alist:
va=IntVar()
va.set(i)
va.set(0)
# self.checklock(i,info)
self.canvas.create_text(40, self.y, text=info,
font=("宋体", 11), anchor=W, fill='#FF9900')
b=Checkbutton(width=1,height=1,variable=va,bg='#FFFAE0',command=lambda:
self.unlock(va,alist.index(info),info)).place(x=0,y=self.y-18)
b=Checkbutton(width=1,height=1,onvalue=i,variable=va,bg='#FFFAE0',command=lambda:
self.unlock(va,i,info)).place(x=0,y=self.y-18)
i+=1
self.y += 30
......@@ -49,6 +51,7 @@ class Note(): # 便签、笔记
# unlocklist.pop(info)
# print(unlocklist)
def get_info(self):
info = self.ent.get()
self.ent.delete("0", END)
......
{"admin": "admin", "python": "123456"}
\ No newline at end of file
{"admin": "admin", "python": "123456", "1": "123"}
\ No newline at end of file
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