chatWEB
This commit is contained in:
43
xz_main.pyw
43
xz_main.pyw
@@ -1,43 +0,0 @@
|
|||||||
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()
|
|
||||||
25
没有使用/xjai.pyw
Normal file
25
没有使用/xjai.pyw
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
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://home.xjai.cc'))
|
||||||
|
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)
|
||||||
|
|
||||||
|
|
||||||
|
# mainloop
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
browser = Browser()
|
||||||
|
browser.showMaximized()
|
||||||
|
sys.exit(app.exec_())
|
||||||
18
没有使用/xz_login.pyw
Normal file
18
没有使用/xz_login.pyw
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
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
|
||||||
Reference in New Issue
Block a user