Commit 881a7b65 by BellCodeEditor

save project

parent aa11b598
Showing with 6 additions and 7 deletions
......@@ -2,8 +2,7 @@ import tkinter
from tkinter import *
from tkinter import messagebox
import json
alist = ["星期六下午打篮球", "星期天下午和小美一起看电影",
"12月18日给蒂法过生日", "12.24送妈妈圣诞礼物"]
class Note(): # 便签、笔记
def __init__(self):
......@@ -14,7 +13,6 @@ class Note(): # 便签、笔记
self.bg_img = tkinter.PhotoImage(file="bg.png")
self.box=PhotoImage(file='box.png')
def show(self): # 布置窗口界面
# 画布
self.canvas = tkinter.Canvas(self.root, width=300, height=340)
self.canvas.create_image(0, 0, image=self.bg_img, anchor=NW)
self.canvas.place(x=0, y=0)
......@@ -99,10 +97,11 @@ def register(): # 注册验证
reg_to_login()
def login(): # 登录验证
global app
global app,alist
name, password = app_login.get_input()
user_name = users.get(name)
if user_name!=None and user_name['password'] == password:
if user_name != None and user_name['password'] == password:
alist=users[name]['event']
app_login.root.destroy()
app=Note()
app.show()
......
{"admin": "admin", "python": "123456", "1": "1"}
\ No newline at end of file
{"admin": "admin", "python": "123456", "1": "1", "2": "2", "a": "1"}
\ 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