Commit 1b2b45b5 by BellCodeEditor

save project

parent 0086e0b9
Showing with 6 additions and 5 deletions
......@@ -45,8 +45,12 @@ class Note(): # 便签、笔记
def remove(self):
num=self.v.get()
alist.pop(num)
self.canvas.destroy()
app.show()
content = json.dumps(users)
with open("user.txt", "w", encoding="utf-8") as file: # "w"每次写入都覆盖原来的内容
file.write(content)
self.canvas.destroy()
app.show()
def get_info(self):
info = self.ent.get()
......@@ -93,9 +97,6 @@ def register(): # 注册验证
messagebox.showwarning("错误", "两次密码不一致!")
else:
users[name] = password1
content = json.dumps(users)
with open("user.txt", "w", encoding="utf-8") as file: # "w"每次写入都覆盖原来的内容
file.write(content)
# 注册成功,跳往登陆界面
messagebox.showinfo("成功", "注册成功")
reg_to_login()
......
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