-
Notifications
You must be signed in to change notification settings - Fork 1
/
check.py
68 lines (57 loc) · 1.55 KB
/
check.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import os
import sys
import time
from PyQt5 import QtWidgets
from checkgui import Ui_MainWindow
from tools.sys_check import CheckThread
import webbrowser
class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
def __init__(self, parent=None):
super(MainWindow, self).__init__(parent=parent)
self.setupUi(self)
self.B_wechat.setEnabled(False)
self.B_firefox.setEnabled(False)
self.B_npcap.setEnabled(False)
self.B_start.setEnabled(False)
self.check = CheckThread()
self.check.uptext.connect(self.Add_Text)
self.check.enable_B.connect(self.Enable_Button)
self.check.start()
def Add_Text(self, str):
# self.textBrowser.append(str)
self.textBrowser.insertPlainText(str + '\n')
def Enable_Button(self, str):
if str == 'wechat':
self.B_wechat.setEnabled(True)
pass
elif str == 'firefox':
self.B_firefox.setEnabled(True)
pass
elif str == 'npcap':
self.B_npcap.setEnabled(True)
pass
elif str == 'start':
self.B_start.setEnabled(True)
pass
else:
pass
def wechat(self):
webbrowser.open_new('http://dldir1.qq.com/weixin/Windows/WeChatSetup.exe')
def firefox(self):
webbrowser.open_new(
'https://download-ssl.firefox.com.cn/releases-sha2/full/58.0/zh-CN/Firefox-full-latest-win64.exe')
def npcap(self):
print('npcap')
webbrowser.open_new(
'https://nmap.org/npcap/dist/npcap-0.98.exe'
)
def startdtj(self):
print('启动答题机')
os.system('main-main.exe')
w.close()
pass
if __name__ == "__main__":
app = QtWidgets.QApplication(sys.argv)
w = MainWindow()
w.show()
sys.exit(app.exec_())