Compare commits
47 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
638c4493aa | ||
|
|
67d9b8d6c5 | ||
|
|
73b62403ef | ||
|
|
cc39e4ed36 | ||
|
|
28125d6c0b | ||
|
|
84cf0deead | ||
|
|
9f10488060 | ||
|
|
a7ec640e94 | ||
|
|
a48ec6b123 | ||
|
|
2e8e6ae11b | ||
|
|
7b82a4c4e9 | ||
|
|
fbb86371cf | ||
|
|
299311b38e | ||
|
|
976d27a54f | ||
|
|
bcabdf35cc | ||
|
|
f96261f4fe | ||
|
|
a7dca412ce | ||
|
|
7ff7233b80 | ||
|
|
c53177b0cf | ||
|
|
ed2b05a109 | ||
|
|
bd25fbb98e | ||
|
|
745718e7a9 | ||
|
|
ec957960f2 | ||
|
|
61d2f576c5 | ||
|
|
cfeded07de | ||
|
|
47313547c7 | ||
|
|
570b6d251b | ||
|
|
ba52e468de | ||
|
|
b40d244ed5 | ||
|
|
1e081209d3 | ||
|
|
4a864608d4 | ||
|
|
60a2246e57 | ||
|
|
272579e83e | ||
|
|
bbb57c87c0 | ||
|
|
4c22809fcb | ||
|
|
c62ab42d35 | ||
|
|
f56f42af9f | ||
|
|
9e30b814f9 | ||
|
|
b94c0105e7 | ||
|
|
bdb783bc1d | ||
|
|
a3a8cda57b | ||
|
|
3e7bfb617a | ||
|
|
b4c20606e6 | ||
|
|
05d66211a3 | ||
|
|
2ea30091f7 | ||
|
|
eb9be60dc6 | ||
|
|
ac7f1a0a29 |
@@ -5,12 +5,12 @@ from PyQt5.QtWebEngineWidgets import QWebEngineView
|
|||||||
class BrowserWindow(QMainWindow):
|
class BrowserWindow(QMainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setWindowTitle("AI Browser")
|
self.setWindowTitle("Chat Browser")
|
||||||
self.setGeometry(100, 100, 800, 600)
|
self.setGeometry(100, 100, 800, 600)
|
||||||
|
|
||||||
# Create the QWebEngineView widget and set the URL to "https://chat.aiyunos.top"
|
# Create the QWebEngineView widget and set the URL to "https://chat.extkj.cn"
|
||||||
self.web_view = QWebEngineView(self)
|
self.web_view = QWebEngineView(self)
|
||||||
self.web_view.load(QUrl("https://chat.aiyunos.top"))
|
self.web_view.load(QUrl("https://chat.1.bnu120.space"))
|
||||||
self.setCentralWidget(self.web_view)
|
self.setCentralWidget(self.web_view)
|
||||||
|
|
||||||
# Create the QToolBar widget and add a QAction for the refresh button
|
# Create the QToolBar widget and add a QAction for the refresh button
|
||||||
77
client.pyw
77
client.pyw
@@ -2,6 +2,8 @@ import os
|
|||||||
import platform
|
import platform
|
||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import messagebox
|
from tkinter import messagebox
|
||||||
|
from time import sleep
|
||||||
|
import sys
|
||||||
|
|
||||||
# Define constants
|
# Define constants
|
||||||
CURRENT_DIR = os.getcwd()
|
CURRENT_DIR = os.getcwd()
|
||||||
@@ -14,35 +16,48 @@ def open_exe(exe_name):
|
|||||||
os.system(f"start {exe_name}.exe")
|
os.system(f"start {exe_name}.exe")
|
||||||
else:
|
else:
|
||||||
messagebox.showerror('system', FILE_ERROR)
|
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():
|
def web_xz():
|
||||||
open_exe("extkj")
|
open_exe("xz_main")
|
||||||
|
|
||||||
def wuguokai():
|
|
||||||
open_exe("wuguokai")
|
|
||||||
|
|
||||||
def f1():
|
|
||||||
open_exe("f1")
|
|
||||||
|
|
||||||
def lbb():
|
|
||||||
open_exe("lbb")
|
|
||||||
|
|
||||||
def update():
|
def update():
|
||||||
if os.path.exists(os.path.join(CURRENT_DIR, "update.exe")):
|
open_exe("update")
|
||||||
os.system("start update.exe")
|
|
||||||
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():
|
def quit_exe():
|
||||||
root.destroy()
|
os.system('taskkill -f -t -im aiyunos.exe')
|
||||||
|
os.system('taskkill -f -t -im wuguokai.exe')
|
||||||
|
os.system('taskkill -f -t -im extkj.exe')
|
||||||
|
os.system('taskkill -f -t -im python.exe')
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
def jc():
|
||||||
|
messagebox.showerror('system', '检测程序暂时无法使用!!!(应该以后都不会写完了......)')
|
||||||
|
pass
|
||||||
|
|
||||||
|
def gk():
|
||||||
|
open_exe("gk")
|
||||||
|
|
||||||
|
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(st, text='检测文件完整度', command=jc)
|
||||||
|
# pack
|
||||||
|
bt_jc.pack()
|
||||||
|
bt_update.pack()
|
||||||
|
bt_gk.pack()
|
||||||
|
# mainloop
|
||||||
|
st.title('设置')
|
||||||
|
st.geometry("200x200+400+600")
|
||||||
|
st.mainloop()
|
||||||
|
|
||||||
|
|
||||||
# Create GUI
|
# Create GUI
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
@@ -50,18 +65,12 @@ root.title('chatGPT')
|
|||||||
root.geometry('200x200+400+400')
|
root.geometry('200x200+400+400')
|
||||||
tk.Label(root, text='chatGPT').pack()
|
tk.Label(root, text='chatGPT').pack()
|
||||||
|
|
||||||
bt_w = tk.Button(root, text='wuguokai网站', command=wuguokai)
|
bt_web_xz = tk.Button(root, text='网站选择', command=web_xz)
|
||||||
bt_e = tk.Button(root, text='extkj网站', command=extkj)
|
bt_st = tk.Button(root, text='其他内容', command=sittings)
|
||||||
bt_f1 = tk.Button(root, text='f1网站', command=f1)
|
|
||||||
bt_xy = tk.Button(root, text='使用协议(使用前必看)', command=user_xy)
|
|
||||||
bt_update = tk.Button(root, text='更新日志', command=update)
|
|
||||||
quit_bt = tk.Button(root, text='退出', command=quit_exe)
|
quit_bt = tk.Button(root, text='退出', command=quit_exe)
|
||||||
|
|
||||||
bt_w.pack()
|
bt_web_xz.pack()
|
||||||
bt_e.pack()
|
bt_st.pack()
|
||||||
bt_f1.pack()
|
|
||||||
bt_xy.pack()
|
|
||||||
bt_update.pack()
|
|
||||||
quit_bt.pack()
|
quit_bt.pack()
|
||||||
|
|
||||||
# mainloop
|
# mainloop
|
||||||
|
|||||||
13
command.py
Normal file
13
command.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
import os
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
def run_cmd():
|
||||||
|
print("正在启动")
|
||||||
|
sleep(0.5)
|
||||||
|
for i in range(4):
|
||||||
|
os.system("start powershell")
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
|
||||||
|
sleep(0.2)
|
||||||
|
run_cmd()
|
||||||
16
lbb.pyw
16
lbb.pyw
@@ -1,16 +0,0 @@
|
|||||||
import tkinter as tk
|
|
||||||
from tkinter import messagebox
|
|
||||||
|
|
||||||
def quit_exe():
|
|
||||||
root.destroy()
|
|
||||||
|
|
||||||
root = tk.Tk()
|
|
||||||
root.title('Error 422')
|
|
||||||
root.geometry('100x100')
|
|
||||||
|
|
||||||
messagebox.showerror('System', '别看了,已经废弃了')
|
|
||||||
|
|
||||||
btn_quit = tk.Button(root, text='退出', command=quit_exe)
|
|
||||||
btn_quit.pack()
|
|
||||||
|
|
||||||
root.mainloop()
|
|
||||||
23
lbbai.pyw
Normal file
23
lbbai.pyw
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import sys
|
||||||
|
from PyQt5.QtCore import QUrl
|
||||||
|
from PyQt5.QtWidgets import QApplication, QMainWindow, QAction
|
||||||
|
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
||||||
|
|
||||||
|
class Browser(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.setWindowTitle('浏览器')
|
||||||
|
|
||||||
|
self.browser = QWebEngineView()
|
||||||
|
self.browser.setUrl(QUrl('https://link.lbbai.com'))
|
||||||
|
self.setCentralWidget(self.browser)
|
||||||
|
|
||||||
|
refresh_button = QAction('刷新', self)
|
||||||
|
refresh_button.triggered.connect(self.browser.reload)
|
||||||
|
self.toolbar = self.addToolBar('Refresh')
|
||||||
|
self.toolbar.addAction(refresh_button)
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
browser = Browser()
|
||||||
|
browser.showMaximized()
|
||||||
|
sys.exit(app.exec_())
|
||||||
62
old/jc.py
Normal file
62
old/jc.py
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
import os
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
|
||||||
|
file_error = '文件丢失,请检查目录文件完整度'
|
||||||
|
ml = os.getcwd
|
||||||
|
maths = 0
|
||||||
|
error = 0
|
||||||
|
|
||||||
|
|
||||||
|
def file_jx(exe_name):
|
||||||
|
maths += 1
|
||||||
|
if os.path.exists(os.path.join(ml, f"{exe_name}")):
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
error += 1
|
||||||
|
pass
|
||||||
|
|
||||||
|
def extkj():
|
||||||
|
file_jx("extkj")
|
||||||
|
|
||||||
|
def wuguokai():
|
||||||
|
file_jx("wuguokai")
|
||||||
|
|
||||||
|
def f1():
|
||||||
|
file_jx("aiyunos")
|
||||||
|
|
||||||
|
def update():
|
||||||
|
if os.path.exists(os.path.join(ml, "update.exe")):
|
||||||
|
maths += 1
|
||||||
|
print(f'文件{maths}正常存在')
|
||||||
|
else:
|
||||||
|
error += 1
|
||||||
|
print(f"丢失{error}文件")
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
|
||||||
|
def gk():
|
||||||
|
file_jx("gk")
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
print('检查中')
|
||||||
|
sleep(0.85555)
|
||||||
|
|
||||||
|
extkj()
|
||||||
|
wuguokai()
|
||||||
|
f1()
|
||||||
|
update()
|
||||||
|
gk()
|
||||||
|
|
||||||
|
sleep(0.5)
|
||||||
|
print('检查完成,共有{maths}个文件正常,{error}个文件丢失')
|
||||||
|
|
||||||
|
if str(input('是否退出?(Y.是 B.不是')) == "Y" or 'y' or '1':
|
||||||
|
exit()
|
||||||
|
else:
|
||||||
|
print('请手动退出')
|
||||||
|
while True:
|
||||||
|
sleep(1)
|
||||||
|
pass
|
||||||
|
|
||||||
8
old/taskkill.pyw
Normal file
8
old/taskkill.pyw
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
os.system('taskkill -f -t -im aiyunos.exe')
|
||||||
|
os.system('taskkill -f -t -im wuguokai.exe')
|
||||||
|
os.system('taskkill -f -t -im extkj.exe')
|
||||||
|
os.system('taskkill -f -t -im python.exe')
|
||||||
|
|
||||||
|
exit()
|
||||||
27
qdymys.pyw
Normal file
27
qdymys.pyw
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
from PyQt5.QtCore import QUrl
|
||||||
|
from PyQt5.QtWidgets import QApplication, QMainWindow, QToolBar, QAction
|
||||||
|
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
||||||
|
|
||||||
|
class BrowserWindow(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.setWindowTitle("AI Browser")
|
||||||
|
self.setGeometry(100, 100, 800, 600)
|
||||||
|
|
||||||
|
# Create the QWebEngineView widget
|
||||||
|
self.web_view = QWebEngineView(self)
|
||||||
|
self.web_view.load(QUrl("https://chatgpt.qdymys.cn/"))
|
||||||
|
self.setCentralWidget(self.web_view)
|
||||||
|
|
||||||
|
# Create the QToolBar widget and add a QAction for the refresh button
|
||||||
|
toolbar = QToolBar(self)
|
||||||
|
self.addToolBar(toolbar)
|
||||||
|
refresh_action = QAction("Refresh", self)
|
||||||
|
refresh_action.triggered.connect(self.web_view.reload)
|
||||||
|
toolbar.addAction(refresh_action)
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
app = QApplication([])
|
||||||
|
window = BrowserWindow()
|
||||||
|
window.show()
|
||||||
|
app.exec_()
|
||||||
1
setup_readme.txt
Normal file
1
setup_readme.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
1.2 增加lbbai网站;修复BUG;完全移除“关于”模块......
|
||||||
39
sittings.pyw
Normal file
39
sittings.pyw
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
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()
|
||||||
|
bt_fh = Button(root, text='返回', command=fh).pack()
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
root.title("其他")
|
||||||
|
root.geometry("200x200+400+400")
|
||||||
|
root.mainloop()
|
||||||
38
update.pyw
38
update.pyw
@@ -1,28 +1,48 @@
|
|||||||
from tkinter import *
|
"""基本上,这个文件都是已经提前写好了下一个版本的内容的
|
||||||
|
之后几天基本上都会发布最新版本的内容的"""
|
||||||
|
|
||||||
|
from tkinter import *
|
||||||
|
from tkinter.scrolledtext import ScrolledText
|
||||||
|
import webbrowser
|
||||||
|
from tkinter import messagebox
|
||||||
|
|
||||||
root = Tk()
|
root = Tk()
|
||||||
|
|
||||||
|
|
||||||
def quit_exe():
|
def quit_exe():
|
||||||
root.destroy()
|
root.destroy()
|
||||||
pass
|
def update_now():
|
||||||
|
webbrowser.open("https://kgithub.com/dengrb1/chatgpt/releases/")
|
||||||
|
messagebox.showinfo('update', '请选择最新版本并下载运行安装程序,然后就可以更新了!')
|
||||||
|
|
||||||
# Label
|
# Label
|
||||||
|
update_now_bt = Button(root ,text='在线更新', command=update_now).pack(side=RIGHT)
|
||||||
|
quit_bt = Button(root, text='返回', command=quit_exe).pack(side=RIGHT)
|
||||||
Label(root, text='更新日志').pack()
|
Label(root, text='更新日志').pack()
|
||||||
Label(root, text='''0.1.0 DEMO制作完成
|
text = '''0.1.0 DEMO制作完成
|
||||||
0.1.1 demo版本增加lbbAI网站
|
0.1.1 demo版本增加lbbAI网站
|
||||||
0.1.2 demo版本删除lbbAI网站,因为无法使用
|
0.1.2 demo版本删除lbbAI网站,因为无法使用
|
||||||
0.1.3 修复BUG''').pack()
|
0.1.3 修复BUG
|
||||||
|
1.0 加入关于模块,更新网站aitianhu.top;修复“退出”按钮
|
||||||
|
的问题
|
||||||
|
1.0.1 修复BUG:移除“检查文件完整度”程序使用
|
||||||
|
(可以在github仓库的old文件夹里面看;修复其他BUG......
|
||||||
|
1.1 修复BUG;紧急修复Windows7无法使用情况!;重新修正UI界面
|
||||||
|
1.1.1 更新chatGPT网站;修改update文本显示设置。新增bnu120聊天网站
|
||||||
|
移除lbbai网站入口
|
||||||
|
1.2 增加lbbai网站;修复BUG;完全移除“关于”模块......
|
||||||
|
|
||||||
|
当前版本:1.2 (Not beta or demo)'''
|
||||||
|
|
||||||
|
text_box = ScrolledText(root)
|
||||||
|
text_box.pack(fill=BOTH, expand=1)
|
||||||
|
text_box.insert(END, text)
|
||||||
|
text_box.configure(state='disabled')
|
||||||
|
|
||||||
Label(root, text='当前版本:0.1.3 beta_demo').pack()
|
|
||||||
|
|
||||||
# Button
|
# Button
|
||||||
quit_bt = Button(root, text='返回', command=quit_exe).pack()
|
quit_bt = Button(root, text='返回', command=quit_exe).pack()
|
||||||
|
|
||||||
|
|
||||||
# mainloop
|
# mainloop
|
||||||
root.title('更新日志')
|
root.title('更新日志')
|
||||||
root.geometry('260x250+400+400')
|
root.geometry('355x250+400+400')
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
73
xz_chat.pyw
Normal file
73
xz_chat.pyw
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
from tkinter import *
|
||||||
|
from tkinter import messagebox
|
||||||
|
import os
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
# 定义内容和创建主窗口
|
||||||
|
root = Tk()
|
||||||
|
ml = os.getcwd()
|
||||||
|
ok = '安装成功'
|
||||||
|
install = 'pip install'
|
||||||
|
file_error = '文件丢失,请重新安装'
|
||||||
|
|
||||||
|
|
||||||
|
# 创建滚动区域的Canvas对象
|
||||||
|
canvas = Canvas(root, width=280, height=280, scrollregion=(0, 0, 500, 500))
|
||||||
|
|
||||||
|
# 创建可滚动区域的Frame对象,并将其添加到Canvas中
|
||||||
|
frame = Frame(canvas)
|
||||||
|
frame.bind("<Configure>", lambda e: canvas.configure(scrollregion=canvas.bbox("all")))
|
||||||
|
canvas.create_window((0, 0), window=frame, anchor="nw")
|
||||||
|
|
||||||
|
# 创建Scrollbar对象,并将其绑定到Canvas上
|
||||||
|
scrollbar = Scrollbar(root, orient="vertical", command=canvas.yview)
|
||||||
|
canvas.configure(yscrollcommand=scrollbar.set)
|
||||||
|
scrollbar.pack(side="right", fill="y")
|
||||||
|
|
||||||
|
# 显示Canvas和Scrollbar
|
||||||
|
canvas.pack(side="left", fill="both", expand=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# 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 qdymys():
|
||||||
|
open_exe("qdymys")
|
||||||
|
def bnu120():
|
||||||
|
open_exe('bnu120')
|
||||||
|
def lbbai():
|
||||||
|
open_exe('lbbai')
|
||||||
|
def fh():
|
||||||
|
root.destroy()
|
||||||
|
|
||||||
|
|
||||||
|
# Button
|
||||||
|
bt_wuguokai = Button(frame, text='wuguokai网站', command=wuguokai)
|
||||||
|
bt_extkj = Button(frame, text='extkj网站', command=extkj)
|
||||||
|
bt_qdymys = Button(frame, text='qdymys网站', command=qdymys)
|
||||||
|
bt_lbbai = Button(frame, text='lbbai网站', command=lbbai)
|
||||||
|
bt_bnu120 = Button(frame, text='bnu120网站', command=bnu120)
|
||||||
|
bt_fh = Button(frame, text='返回', command=fh)
|
||||||
|
|
||||||
|
# pack and Label
|
||||||
|
Label(root, text='选择界面').pack()
|
||||||
|
bt_wuguokai.pack()
|
||||||
|
bt_extkj.pack()
|
||||||
|
bt_lbbai.pack()
|
||||||
|
bt_qdymys.pack()
|
||||||
|
bt_bnu120.pack()
|
||||||
|
bt_fh.pack()
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
root.title('选择')
|
||||||
|
root.geometry('200x220+440+600')
|
||||||
|
root.mainloop()
|
||||||
43
xz_main.pyw
Normal file
43
xz_main.pyw
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
from tkinter import *
|
||||||
|
from tkinter import messagebox
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
|
root = Tk()
|
||||||
|
ml = os.getcwd()
|
||||||
|
|
||||||
|
|
||||||
|
def open_exe(exe_name):
|
||||||
|
if exe_name == None:
|
||||||
|
messagebox.showerror('程序错误:没有参数')
|
||||||
|
pass
|
||||||
|
if os.path.exists(os.path.join(ml, f"{exe_name}.exe")):
|
||||||
|
os.system(f"start {exe_name}.exe")
|
||||||
|
else:
|
||||||
|
messagebox.showerror('chatWEB', '重要文件丢失,请重新安装')
|
||||||
|
pass
|
||||||
|
|
||||||
|
def chat():
|
||||||
|
open_exe('xz_chat')
|
||||||
|
def doc():
|
||||||
|
messagebox.showerror('ChatWEB', '暂时无法使用,请耐心等待......')
|
||||||
|
def fh():
|
||||||
|
root.destroy()
|
||||||
|
|
||||||
|
|
||||||
|
# Button
|
||||||
|
chat_bt = Button(root, text='Chat网站', command=chat)
|
||||||
|
doc_bt = Button(root, text='doc和pdf网站', command=doc)
|
||||||
|
fh_bt = Button(root, text='返回', command=fh)
|
||||||
|
|
||||||
|
# pack
|
||||||
|
Label(root, text='选择界面').pack()
|
||||||
|
chat_bt.pack()
|
||||||
|
doc_bt.pack()
|
||||||
|
fh_bt.pack()
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
root.title('选择')
|
||||||
|
root.geometry('200x200+400+600')
|
||||||
|
root.mainloop()
|
||||||
60
没有使用/wifi.py
Normal file
60
没有使用/wifi.py
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
import socket
|
||||||
|
from time import sleep
|
||||||
|
import os
|
||||||
|
import platform
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
ml = os.getcwd()
|
||||||
|
s = platform.system()
|
||||||
|
|
||||||
|
|
||||||
|
def is_connected():
|
||||||
|
try:
|
||||||
|
# 使用百度的IP地址进行连接测试
|
||||||
|
socket.create_connection(("www.baidu.com", 80))
|
||||||
|
return True
|
||||||
|
except OSError:
|
||||||
|
pass
|
||||||
|
return False
|
||||||
|
def open_exe():
|
||||||
|
if os.path.exists(os.path.join(ml, f"client.exe")):
|
||||||
|
os.system(f"start client.exe")
|
||||||
|
else:
|
||||||
|
print('文件丢失,请重新安装')
|
||||||
|
sleep(1)
|
||||||
|
pass
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
print('正在启动检测程序...')
|
||||||
|
sleep(0.22222)
|
||||||
|
if s == "Windows":
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
print("无法启动,不是Windows系统!!")
|
||||||
|
sleep(1)
|
||||||
|
sys.exit()
|
||||||
|
if is_connected():
|
||||||
|
print("网络已连接,正在启动主程序!!")
|
||||||
|
sleep(0.33)
|
||||||
|
open_exe()
|
||||||
|
else:
|
||||||
|
print("网络未连接,是否继续使用?")
|
||||||
|
input_xz = str(input("选择:1.是 2.不是(必须选择数字)"))
|
||||||
|
if input_xz == None:
|
||||||
|
print("没有输入")
|
||||||
|
sleep(0.5)
|
||||||
|
print("默认退出")
|
||||||
|
sleep(0.6)
|
||||||
|
sys.exit()
|
||||||
|
pass
|
||||||
|
elif input_xz != '1' or '2':
|
||||||
|
print("请输入数字!!")
|
||||||
|
pass
|
||||||
|
elif input_xz == '1':
|
||||||
|
open_exe('client')
|
||||||
|
elif input_xz == '2':
|
||||||
|
sleep(0.4)
|
||||||
|
sys.exit()
|
||||||
39
没有使用/xz_doc.pyw
Normal file
39
没有使用/xz_doc.pyw
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
from tkinter import *
|
||||||
|
from tkinter import messagebox
|
||||||
|
import os
|
||||||
|
import webbrowser
|
||||||
|
|
||||||
|
|
||||||
|
root = Tk()
|
||||||
|
ml = os.getcwd()
|
||||||
|
|
||||||
|
|
||||||
|
def open_exe(exe_name):
|
||||||
|
if exe_name == None:
|
||||||
|
messagebox.showerror('chatWEB', '程序错误:没有参数')
|
||||||
|
if os.path.exists(ml, f"{exe_name}.exe"):
|
||||||
|
os.system(f"start {exe_name}.exe")
|
||||||
|
else:
|
||||||
|
messagebox.showerror("ChatWEB", '重要文件丢失,请重新安装')
|
||||||
|
pass
|
||||||
|
def chat2doc():
|
||||||
|
webbrowser.open("https://chat2doc.cn")
|
||||||
|
pass
|
||||||
|
def fh():
|
||||||
|
root.destroy()
|
||||||
|
|
||||||
|
|
||||||
|
# Button
|
||||||
|
chat2doc_bt = Button(root, text='chat2doc网站', command=chat2doc)
|
||||||
|
fh_bt = Button(root, text='返回', command=fh)
|
||||||
|
|
||||||
|
# pack
|
||||||
|
Label(root, text='选择').pack()
|
||||||
|
chat2doc_bt.pack()
|
||||||
|
fh_bt.pack()
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
root.title('选择')
|
||||||
|
root.geometry('200x200+700+400')
|
||||||
|
root.mainloop()
|
||||||
Reference in New Issue
Block a user