Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Administrator
/
level3-lesson20-diy3-1
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5f75dac9
authored
Nov 20, 2022
by
BellCodeEditor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
save project
parent
57bc9043
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
my_client.py
my_client.py
View file @
5f75dac9
...
...
@@ -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
(
"错误"
,
"用户名或密码错误!"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment