Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
272579e83e | ||
|
|
bbb57c87c0 | ||
|
|
4c22809fcb | ||
|
|
c62ab42d35 | ||
|
|
f56f42af9f | ||
|
|
9e30b814f9 | ||
|
|
b94c0105e7 | ||
|
|
bdb783bc1d |
26
client.pyw
26
client.pyw
@@ -3,6 +3,7 @@ import platform
|
||||
import tkinter as tk
|
||||
from tkinter import messagebox
|
||||
from time import sleep
|
||||
import sys
|
||||
|
||||
# Define constants
|
||||
CURRENT_DIR = os.getcwd()
|
||||
@@ -31,45 +32,24 @@ def update():
|
||||
else:
|
||||
messagebox.showerror('update', '更新日志文件丢失,请检查文件并重新安装')
|
||||
|
||||
def user_xy():
|
||||
if os.path.exists(os.path.join(CURRENT_DIR, "使用协议.docx")):
|
||||
os.system("start 使用协议.docx")
|
||||
else:
|
||||
messagebox.showerror('使用协议','文档丢失,请检查文件内容并重新安装')
|
||||
pass
|
||||
pass
|
||||
|
||||
def quit_exe():
|
||||
os.system('taskkill -f -t -im aiyunos.exe')
|
||||
os.system('taskkill -f -t -im extkj.exe')
|
||||
os.system('taskkill -f -t -im gk.exe')
|
||||
os.system('taskkill -f -t -im update.exe')
|
||||
os.system('taskkill -f -t -im wuguokai.exe')
|
||||
root.destroy()
|
||||
|
||||
def file_jc():
|
||||
if os.path.exists(os.path.join(CURRENT_DIR, "if_file.exe")):
|
||||
os.system('start if_file.exe')
|
||||
else:
|
||||
messagebox.showerror('sittings', '系统文件丢失,程序出现错误!')
|
||||
sleep(1)
|
||||
quit_exe()
|
||||
pass
|
||||
sys.exit()
|
||||
|
||||
def gk():
|
||||
open_exe("gk")
|
||||
|
||||
def sittings():
|
||||
st = tk.Tk()
|
||||
bt_xy = tk.Button(st, text='使用协议(使用前必看)', command=user_xy)
|
||||
bt_update = tk.Button(st, text='更新日志', command=update)
|
||||
bt_gk = tk.Button(st, text='关于', command=gk)
|
||||
bt_fj = tk.Button(st, text='检查文件完整度', command=file_jc)
|
||||
# pack
|
||||
bt_update.pack()
|
||||
bt_gk.pack()
|
||||
bt_fj.pack()
|
||||
bt_xy.pack()
|
||||
# mainloop
|
||||
st.title('设置')
|
||||
st.geometry("200x200+400+600")
|
||||
@@ -85,11 +65,13 @@ tk.Label(root, text='chatGPT').pack()
|
||||
bt_w = tk.Button(root, text='wuguokai网站', command=wuguokai)
|
||||
bt_e = tk.Button(root, text='extkj网站', command=extkj)
|
||||
bt_f1 = tk.Button(root, text='aitianhu网站', command=f1)
|
||||
bt_st = tk.Button(root, text='其他内容', command=sittings)
|
||||
quit_bt = tk.Button(root, text='退出', command=quit_exe)
|
||||
|
||||
bt_w.pack()
|
||||
bt_e.pack()
|
||||
bt_f1.pack()
|
||||
bt_st.pack()
|
||||
quit_bt.pack()
|
||||
|
||||
# mainloop
|
||||
|
||||
@@ -11,11 +11,9 @@ error = 0
|
||||
def file_jx(exe_name):
|
||||
maths += 1
|
||||
if os.path.exists(os.path.join(ml, f"{exe_name}")):
|
||||
print(f'文件{maths}正常存在')
|
||||
pass
|
||||
else:
|
||||
error += 1
|
||||
print(f"丢失{error}文件")
|
||||
pass
|
||||
pass
|
||||
|
||||
def extkj():
|
||||
38
sittings.pyw
Normal file
38
sittings.pyw
Normal file
@@ -0,0 +1,38 @@
|
||||
import os
|
||||
import webbrowser
|
||||
from tkinter import *
|
||||
from tkinter import messagebox
|
||||
|
||||
|
||||
root = Tk()
|
||||
ml = os.getcwd()
|
||||
|
||||
|
||||
def jc(exe_name):
|
||||
if os.path.exists(os.path.join(ml,f"{exe_name}.exe")):
|
||||
os.system(f"start {exe_name}.exe")
|
||||
else:
|
||||
messagebox.showerror("sittings", '系统文件丢失!请重新安装')
|
||||
pass
|
||||
pass
|
||||
|
||||
def gk():
|
||||
jc("gk")
|
||||
|
||||
def update():
|
||||
jc("update")
|
||||
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
|
||||
# Button, Label and pack
|
||||
Label(root, text='其他内容').pack()
|
||||
bt_update = Button(root, text='更新日志', command=update).pack()
|
||||
bt_gk = Button(root, text='关于', command=gk).pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
root.title("其他")
|
||||
root.geometry("200x200+400+400")
|
||||
root.mainloop()
|
||||
@@ -15,9 +15,12 @@ Label(root, text='''0.1.0 DEMO制作完成
|
||||
0.1.1 demo版本增加lbbAI网站
|
||||
0.1.2 demo版本删除lbbAI网站,因为无法使用
|
||||
0.1.3 修复BUG
|
||||
1.0 加入关于模块,更新网站aitianhu.top;修复“退出”按钮的问题;''').pack()
|
||||
1.0 加入关于模块,更新网站aitianhu.top;修复“退出”按钮的问题
|
||||
1.1 修复BUG:移除“检查文件完整度”程序使用
|
||||
(可以在github仓库的old文件夹里面看;修复其他BUG......
|
||||
1.2 修复BUG ''').pack()
|
||||
|
||||
Label(root, text='当前版本:1.0 (Not beta or demo)').pack()
|
||||
Label(root, text='当前版本:1.0.1 (Not beta or demo)').pack()
|
||||
|
||||
# Button
|
||||
quit_bt = Button(root, text='返回', command=quit_exe).pack()
|
||||
@@ -25,5 +28,5 @@ quit_bt = Button(root, text='返回', command=quit_exe).pack()
|
||||
|
||||
# mainloop
|
||||
root.title('更新日志')
|
||||
root.geometry('260x250+400+400')
|
||||
root.geometry('355x250+400+400')
|
||||
root.mainloop()
|
||||
Reference in New Issue
Block a user