Skip to content

Commit

Permalink
更新v3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
LYXOfficial committed Jan 2, 2024
1 parent a8e5aec commit d975135
Show file tree
Hide file tree
Showing 7 changed files with 317 additions and 19 deletions.
292 changes: 292 additions & 0 deletions 1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,292 @@
import base64
print(base64.b64encode("""QMainWindow *{
font-family:"Microsoft YaHei","Microsoft YaHei";
}
#centralwidget{
margin-top:0;
background-color: aliceblue;
}
QPushButton,QToolButton{
padding-left: 7px;
padding-right:7px;
padding-top:5px;
padding-bottom:5px;
height:1em;
border:none;
background-color: #eeebeb;
border: 1px solid #c0c0c0;
border-radius:5px;
}
QToolButton{
padding:3px;
}
QPushButton:hover,QToolButton:hover{
background-color:rgb(228, 228, 228);
}
QPushButton:pressed,QToolButton:pressed{
background-color:rgb(208, 208, 208);
}
QLineEdit{
height:1.3em;
}
QCheckBox{
margin:1px;
}
QTabBar::tab{
background:transparent;
border:none;
padding:5px;
margin:4px;
height:1.1em;
}
QTabBar::tab:hover{
color:#555555;
}
QTabBar::tab:selected{
border-bottom:2px solid #70bfed;
}
QTabWidget::pane{
border-radius:10px;
background-color:#ffffff;
border: 1px solid #ddd;
padding:2px;
margin:0 2px 2px 2px;
}
/* QCheckBox::indicator{
border-radius:2px;
border:0.5px solid gray;
padding:2px;
}
QCheckBox::indicator:checked{
background-color:#0460da;
border-color:#ccc;
position:relative;
} */
QLineEdit,QTextEdit,QPlainTextEdit{
border-radius:5px;
border:1px solid #bbb;
selection-background-color:#70bfed;
}
QGroupBox{
border-radius:10px;
border:1px solid #ccc;
color:#5b7372;
font-size:15px;
/* padding-top:15px; */
font-family:"Microsoft YaHei";
background-color: white;
}
#groupBox,#groupBox_13,#groupBox_12,#groupBox_8,#groupBox_2,#groupBox_4,#groupBox_3,#groupBox_5,#groupBox_6,#groupBox_9{
padding-top:25px;
}
QGroupBox::title{
subcontrol-origin:margin;
padding:10px 10px;
background:transparent;
}
QMenuBar::item{
border-radius:5px;
padding:2px 8px;
background-color:white;
}
QMenuBar::item:selected{
background-color:#ddd;
}
QMenuBar{
background-color:white;
}
QLineEdit:focus,QTextEdit:focus,QPlainTextEdit:focus{
border-color:#70bfed;
}
#widget_2{
background-color: rgb(46, 161, 255);
}
#label_21,#ver{
color:white
}
#widget_4 QRadioButton{
margin:5px;
padding-left:-2px;
font-size:17px;
}
#widget_4 QRadioButton:!checked:hover{
color:rgb(231, 231, 231);
}
#widget_4 QRadioButton:!checked{
color:white;
border-left: 4px solid transparent;
}
#widget_4 QRadioButton:checked:hover{
color:rgb(213, 178, 142);
}
#widget_4 QRadioButton:checked{
color:rgb(255, 206, 171);
border-left: 4px solid rgb(255, 206, 171);
}
#widget_4 QRadioButton::indicator{
width: 0px;
height: 0px;
}
#closeWin{
height:30px;
width:24px;
font-size:35px;
padding-top:-3px;
border-radius: 16px;
margin:0;
color: white;
background: transparent;
border:none;
}
#closeWin:hover{
background-color: rgba(255, 0, 0, 0.8);
}
#closeWin:pressed{
background-color: rgba(147, 84, 84, 0.8);
}
#minWin{
height:30px;
width:24px;
font-size:35px;
padding-top:-3px;
border-radius: 16px;
margin:0;
color: white;
background: transparent;
border:none;
}
#ExitProcess{
margin: 0;
color: white;
background: transparent;
border:none;
max-height:24px;
width:24px;
padding:8px 6px;
border-radius: 16px;
}
#minWin:hover,#ExitProcess:hover{
background-color: rgba(128, 128, 128, 0.6);
}
#minWin:pressed,#ExitProcess:hover{
background-color: rgba(93, 93, 93, 0.7);
}
#startButton:!hover,#Reset:!hover{
background-color: white;
}
#KillTD,#HangUpTD,#GBWindowed,#CloseGB{
margin:6px;
border-radius:28px;
font-size:15px;
background-color:transparent;
border:1px solid #d8d8d8;
}
#KillTD:hover,#HangUpTD:hover,#GBWindowed:hover,#CloseGB:hover{
background-color: #d8d8d8;
}
#KillTD:pressed,#HangUpTD:pressed,#GBWindowed:pressed,#CloseGB:pressed{
background-color: #cacaca;
}
#lineEdit_2{
margin:0 5px;
}
QLineEdit{
padding:0 10px;
}
#stTSK,#UninstallTopDomain{
padding:6px 5px;
font-size:14px;
}
#KillTD:enabled{
color:#8f0000;
}
#HangUpTD:enabled{
color:#395a86;
}
#GBWindowed:enabled{
color:#73833b;
}
#CloseGB:enabled{
color:#af991f;
}
#groupBox_4 QLineEdit{
height:30px;
font-size:14px;
margin:0 20px;
}
#groupBox_4 QLabel{
height:30px;
font-size:15px;
margin:0 20px;
}
#groupBox_3 QLabel{
font-size:15px;
}
#GBBB QLabel,#jhhhh QLabel{
font-size:15px;
}
#stTSK,#UninstallTopDomain{
font-size:15px;
}
#widget{
background-color: #BBADA0;
border:none;
}
#buttonbox{
background-color: #BBADA0;
border:none;
}
#Reset,#startButton{
border: none;
}
#helpButton{
color:white;
background-color:rgb(46, 161, 255);
border:none;
border-radius:30px;
font-size:35px;
}
#helpButton:hover{
background-color:rgb(41, 133, 209);
}
QTextEdit,QPlainTextEdit,QTextBrowser{
border-radius:10px;
background-color:transparent;
padding:10px;
}
#helpMd{
background-color:white;
}
#capWindow{
font-size:18px;
}
#groupBox_6 QPushButton{
padding:7px;
}
#pushButton_2,#reStart{
padding:8px;
font-size:17px;
}
#logLabel{
padding:10px 20px;
background-color:#000000;
color:white;
background:#88000000;
border-radius:19px;
}
#logpro::groove{
background:transparent;
border:none;
}
#logpro::sub-page{
border-radius:1px;
background:white;
}
#logpro::handle{
width:0;
height:0;
background:transparent;
}
#groupBox{
min-height:180px;
}""".encode()))
13 changes: 7 additions & 6 deletions NoTopDomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'''
QwQ (。・ω・。)
NoTopDomain v3.0b3
NoTopDomain v3.0
很多屎山的awa 新的大改版之后更多了
Expand Down Expand Up @@ -56,7 +56,7 @@



VERSION="v3.0b3"
VERSION="v3.0"
DEBUG=FALSE
class NoTopDomain(QMainWindow,Ui_NoTopDomain,QObject):
sw=pyqtSignal()
Expand Down Expand Up @@ -257,7 +257,7 @@ def setup(self):
self.setStyleSheet(open(bl+"/libs/NTD.qss",encoding="utf-8").read())
else:
self.setStyleSheet(base64.b64decode(qss).decode())
self.WebsiteYes.clicked.connect(lambda:Thread(target=self.websiteYes).start())
self.WebsiteYes.clicked.connect(self.websiteYes)
self.hk=SystemHotkey()
try:
self.hk.register(['control' if i=='ctrl' else i for i in self.config.get("AcWindow").split("+")],callback=lambda _:self.sw.emit())
Expand Down Expand Up @@ -430,7 +430,7 @@ def setup(self):
SendMessage(self.nowhwnd,WM_SETICON,ICON_SMALL,self.oldiconsmall),
SendMessage(self.nowhwnd,WM_SETICON,ICON_BIG,self.oldiconbig),
self.log("恢复图标成功")) if IsWindow(self.nowhwnd) else self.log("窗口句柄无效"))
self.USBYes.clicked.connect(lambda:Thread(target=self.usbYes).start())
self.USBYes.clicked.connect(self.usbYes)
self.tray.activated.connect(self.activate)
SetWindowPos(self.winId(),HWND_TOPMOST,self.x(),self.y(),self.width(),self.height(),SWP_NOSIZE|SWP_NOZORDER)
pids=process_iter()
Expand Down Expand Up @@ -816,7 +816,7 @@ def log(self,ls):
self.logLabel.adjustSize()
self.logLabel.setAlignment(Qt.AlignHCenter|Qt.AlignVCenter)
self.logLabel.setGeometry(self.width()/2-self.logLabel.width()/2,self.height()-150,self.logLabel.width(),self.logLabel.height())
self.logpro.setGeometry(self.logLabel.x()+18,self.logLabel.y()+self.logLabel.height()-3,self.logLabel.width()-36,3)
self.logpro.setGeometry(self.logLabel.x()+18,self.logLabel.y()+self.logLabel.height()-2,self.logLabel.width()-36,2)
self.logLabel.show()
self.logpro.show()
self.logtim=0
Expand Down Expand Up @@ -1462,7 +1462,8 @@ def websiteYes(self):
run("sc stop TDNetworkFilter",shell=True,stdout=PIPE)
except: pass
self.log("解禁网站成功")
except:
except Exception as e:
print(e)
self.log("解禁网站失败")
else:
try:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# NoTopDomain

极域,就你也敢创掉无数无辜学生?
极域,就你也敢创死无数无辜学生?

此乃极域终末之神,机房摸鱼之柱。

你还在为极域控制,老师禁用,上课效率太低而烦恼吗?这个软件将帮你解决问题!

Expand Down
5 changes: 4 additions & 1 deletion libs/NTD.qss
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ QTextEdit,QPlainTextEdit,QTextBrowser{
background-color:#000000;
color:white;
background:#88000000;
border-radius:20px;
border-radius:19px;
}
#logpro::groove{
background:transparent;
Expand All @@ -285,4 +285,7 @@ QTextEdit,QPlainTextEdit,QTextBrowser{
width:0;
height:0;
background:transparent;
}
#groupBox{
min-height:180px;
}
Loading

0 comments on commit d975135

Please sign in to comment.