Commit 3d70237c by BellCodeEditor

save project

parent 12b5cae0
Showing with 28 additions and 18 deletions
......@@ -38,32 +38,42 @@ class Note(): # 便签、笔记
self.select.place(x=0,y=self.y-10)
self.val+=1
self.y += 30
def get_info(self):
def remove(self): # 清除选中的任务事件
num = self.v.get()
print("num %d"%num)
alist.pop(num)
content = json.dumps(users)
with open("user.txt", "w") as file:
file.write(content)
self.canvas.destroy()
app.show()
def get_info(self):
info = self.ent.get()
self.ent.delete("0", END)
if info != "":
alist.append(info)
content = json.dumps(users)
with open("user.txt", "w") as file:
file.write(content)
self.canvas.create_text(40,self.y,text=info,font=("宋体",11),
anchor="w", fill='#FF9900')
self.select=tkinter.Radiobutton(self.canvas,image=self.box,value=self.val,variable=self.v,width=25,height=15,borderwidth=0,command=self.remove)
self.select.place(x=0,y=self.y-10)
self.val+=1
anchor='w', fill='#FF9900')
self.select = tkinter.Radiobutton(self.canvas,image=self.box,
value=self.val,variable=self.v,width=25, height=15,
borderwidth=0,command=self.remove)
self.select.place(x=-10,y=self.y-10)
self.val += 1
self.y += 30
def remove(self):
num = self.v.get()
alist.pop(num)
self.canvas.destroy()
app.show()
with open("user.txt", "r", encoding="utf-8") as f:
with open("user.txt", "r") as f:
global users
users = {}
info = f.read()
users = json.loads(info)
if info != '':
users = json.loads(info)
def login_to_reg(): # 登录界面转注册界面
app_login.root.destroy()
global app_reg
......
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