Commit c881fad0 by BellCodeEditor

auto save

parent 5c6ea396
Showing with 11 additions and 2 deletions
import tkinter
root =tkinter.Tk()
root.geometry('300x350+500+300')
canv=tkinter.Canvas(root,width=240,height=300,bg="lightblue")
canvas=tkinter.Canvas(canv,width=100,height=100,bg="green")
canv.place(x=30,y=20)
canvas.place(x=0,y=0)
root.mainloop()
\ No newline at end of file
import tkinter import tkinter
form tkinter import messagebox from tkinter import messagebox
import json import json
with open("user.txt","r",encoding="utf-8") as f: with open("user.txt","r",encoding="utf-8") as f:
...@@ -26,7 +26,7 @@ def register(): # 注册验证 ...@@ -26,7 +26,7 @@ def register(): # 注册验证
messagebox.showwarning("错误","用户名已经存在!") messagebox.showwarning("错误","用户名已经存在!")
elif password1 != password2: elif password1 != password2:
messagebox.showwarning("错误","两次密码不存在!") messagebox.showwarning("错误","两次密码不存在!")
elif: else:
users[name]=password1 users[name]=password1
content=json.dump(user) content=json.dump(user)
with open("user.txt","w",encoding="utf-8") as file: with open("user.txt","w",encoding="utf-8") as 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