chatweb
This commit is contained in:
42
client.pyw
42
client.pyw
@@ -16,30 +16,28 @@ def open_exe(exe_name):
|
||||
os.system(f"start {exe_name}.exe")
|
||||
else:
|
||||
messagebox.showerror('system', FILE_ERROR)
|
||||
def open_cmd(cmd_name):
|
||||
if os.path.exists(os.path.join(CURRENT_DIR, f"{cmd_name}.cmd")):
|
||||
os.system(f"start {cmd_name}.cmd")
|
||||
else:
|
||||
messagebox.showerror('system', 'cmd服务启动失败,请重新安装')
|
||||
pass
|
||||
pass
|
||||
|
||||
def extkj():
|
||||
open_exe("extkj")
|
||||
|
||||
def wuguokai():
|
||||
open_exe("wuguokai")
|
||||
|
||||
def f1():
|
||||
open_exe("aiyunos")
|
||||
def web_xz():
|
||||
open_exe("xz_web.exe")
|
||||
|
||||
def update():
|
||||
if os.path.exists(os.path.join(CURRENT_DIR, "update.exe")):
|
||||
os.system("start update.exe")
|
||||
else:
|
||||
messagebox.showerror('update', '更新日志文件丢失,请检查文件并重新安装')
|
||||
open_exe("update")
|
||||
|
||||
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')
|
||||
open_cmd('taskkill')
|
||||
sys.exit()
|
||||
|
||||
def jc():
|
||||
messagebox.showerror('system', '检测程序暂时无法使用!!!(应该以后都不会写完了......)')
|
||||
pass
|
||||
|
||||
def gk():
|
||||
open_exe("gk")
|
||||
|
||||
@@ -47,7 +45,9 @@ def sittings():
|
||||
st = tk.Tk()
|
||||
bt_update = tk.Button(st, text='更新日志', command=update)
|
||||
bt_gk = tk.Button(st, text='关于', command=gk)
|
||||
bt_jc = tk.Button(root, text='检测文件完整度', command=jc)
|
||||
# pack
|
||||
bt_jc.pack()
|
||||
bt_update.pack()
|
||||
bt_gk.pack()
|
||||
# mainloop
|
||||
@@ -62,15 +62,11 @@ root.title('chatGPT')
|
||||
root.geometry('200x200+400+400')
|
||||
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_web_xz = tk.Button(root, text='网站选择', command='xxx')
|
||||
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()
|
||||
|
||||
|
||||
@@ -17,7 +17,12 @@ def jc(exe_name):
|
||||
pass
|
||||
|
||||
def gk():
|
||||
jc("gk")
|
||||
if os.path.exists(os.path.join(ml, "gk.exe")):
|
||||
os.system("start gk.exe")
|
||||
else:
|
||||
messagebox.showerror('sittings', '系统文件丢失!请重新安装')
|
||||
pass
|
||||
pass
|
||||
|
||||
def update():
|
||||
jc("update")
|
||||
|
||||
5
taskkill.cmd
Normal file
5
taskkill.cmd
Normal file
@@ -0,0 +1,5 @@
|
||||
taskkill -f -t -im aiyunos.exe
|
||||
taskkill -f -t -im extkj.exe
|
||||
taskkill -f -t -im gk.exe
|
||||
taskkill -f -t -im update.exe
|
||||
taskkill -f -t -im wuguokai.exe
|
||||
53
xz_web1.pyw
Normal file
53
xz_web1.pyw
Normal file
@@ -0,0 +1,53 @@
|
||||
from tkinter import *
|
||||
from tkinter import messagebox
|
||||
import os
|
||||
import webbrowser
|
||||
|
||||
|
||||
root = Tk()
|
||||
file_error = '重要文件丢失!请重新安装'
|
||||
ml = os.getcwd()
|
||||
|
||||
# Define functions
|
||||
def open_exe(exe_name):
|
||||
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
||||
os.system(f"start {exe_name}.exe")
|
||||
else:
|
||||
messagebox.showerror('system', file_error)
|
||||
|
||||
def extkj():
|
||||
open_exe("extkj")
|
||||
|
||||
def wuguokai():
|
||||
open_exe("wuguokai")
|
||||
|
||||
def f1():
|
||||
open_exe("aiyunos")
|
||||
|
||||
def lbbai():
|
||||
webbrowser.open("https://link.lbbai.com")
|
||||
|
||||
def fh():
|
||||
root.destroy()
|
||||
|
||||
|
||||
# Button
|
||||
bt_wuguokai = Button(root, text='wuguokai网站')
|
||||
bt_extkj = Button(root, text='extkj网站', command=extkj)
|
||||
bt_f1 = Button(root, text='aiyunos网站', command=f1)
|
||||
bt_lbbai = Button(root, text='lbbai网站', command=lbbai)
|
||||
bt_fh = Button(root, text='返回', command=fh)
|
||||
|
||||
# pack and Label
|
||||
Label(root, text='选择界面').pack()
|
||||
bt_wuguokai.pack()
|
||||
bt_extkj.pack()
|
||||
bt_f1.pack()
|
||||
bt_lbbai.pack()
|
||||
bt_fh.pack()
|
||||
|
||||
|
||||
# mainloop
|
||||
root.title('选择')
|
||||
root.geometry('200x200+440+600')
|
||||
root.mainloop()
|
||||
Reference in New Issue
Block a user