|
|
@@ -13,7 +13,8 @@ from PIL import Image |
|
|
|
import threading |
|
|
|
import time |
|
|
|
|
|
|
|
|
|
|
|
import requests |
|
|
|
from io import BytesIO |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -54,9 +55,13 @@ def WebViewApp(port,dev=False): |
|
|
|
webview.start(debug=DEBUG, http_server=True) # 启动窗口 |
|
|
|
timer = threading.Timer(0.25, detect) # 在回调函数中再次启动定时器 |
|
|
|
timer.start() # 启动定时器 |
|
|
|
image = Image.open("C:/Users/16775/Pictures/head.jpg") |
|
|
|
response = requests.get('http://docs.marlene.top/demo/model/logo.png') |
|
|
|
response = response.content |
|
|
|
BytesIOObj = BytesIO() |
|
|
|
BytesIOObj.write(response) |
|
|
|
image = Image.open(BytesIOObj) |
|
|
|
menu = (item('打开主页面', action), item('退出', exitProgram)) |
|
|
|
icon = pystray.Icon("name", image, "title", menu) |
|
|
|
icon = pystray.Icon("name", image, "EMC", menu) |
|
|
|
icon.run() |
|
|
|
|
|
|
|
|
|
|
|