chatWEB
This commit is contained in:
@@ -25,7 +25,7 @@ def open_cmd(cmd_name):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def web_xz():
|
def web_xz():
|
||||||
open_exe("xz")
|
open_exe("xz_main")
|
||||||
|
|
||||||
def update():
|
def update():
|
||||||
open_exe("update")
|
open_exe("update")
|
||||||
|
|||||||
10
wifi.py
10
wifi.py
@@ -1,6 +1,8 @@
|
|||||||
import socket
|
import socket
|
||||||
from time import sleep
|
from time import sleep
|
||||||
import os
|
import os
|
||||||
|
import platform
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def is_connected():
|
def is_connected():
|
||||||
@@ -22,8 +24,14 @@ def open_exe(exe_name):
|
|||||||
|
|
||||||
# mainloop
|
# mainloop
|
||||||
print('正在启动检测程序...')
|
print('正在启动检测程序...')
|
||||||
|
s = platform.system()
|
||||||
sleep(0.22222)
|
sleep(0.22222)
|
||||||
|
if s == "Windows":
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
print("无法启动,不是Windows系统!!")
|
||||||
|
sleep(1)
|
||||||
|
sys.exit()
|
||||||
if is_connected():
|
if is_connected():
|
||||||
print("网络已连接,正在启动主程序!!")
|
print("网络已连接,正在启动主程序!!")
|
||||||
sleep(0.33)
|
sleep(0.33)
|
||||||
|
|||||||
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()
|
||||||
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(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():
|
||||||
|
open_exe('xz_doc')
|
||||||
|
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()
|
||||||
Reference in New Issue
Block a user