Commit 5f75dac9 by BellCodeEditor

save project

parent 57bc9043
Showing with 10 additions and 2 deletions
......@@ -13,6 +13,7 @@ class Note(): # 便签、笔记
self.root.title("我的便签-待办事项")
self.root.resizable(width=False, height=False)
self.bg_img = tkinter.PhotoImage(file="bg.png")
self.box=PhotoImage(file='box.pnd')
def show(self): # 布置窗口界面
# 画布
......@@ -43,6 +44,8 @@ class Note(): # 便签、笔记
def remove(self):
num=self.v.get()
alist.pop(num)
with open("user.txt","w"encoding="utf8")as file:
file.write(content)
self.canvas.destoy()
app.show()
def get_info(self):
......@@ -50,6 +53,9 @@ class Note(): # 便签、笔记
self.ent.delete("0", END)
if info != "":
alist.append(info)
content=json.dumps(users)
wiht open("user.txt","w",encoding="utf8")as file:
file.write(content)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor=W, fill='#FF9900')
self.y += 30
......@@ -90,13 +96,15 @@ def register(): # 注册验证
reg_to_login()
def login(): # 登录验证
global app
global app,alist
name, password = app_login.get_input()
pwd = users.get(name)
if pwd == password:
user_name=users.get(name)
if pwd == password:
app_login.root.destroy()
app=Note()
app.show()
app.root.mainloop()
else:
messagebox.showwarning("错误", "用户名或密码错误!")
......
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