Exemple #1
0
 def 检查更新(self):
     increase_counter(ga_category="其余功能使用", name="检查更新")
     self.网盘检查()
     if self.网盘报错 == 1:
         box = QMessageBox(QMessageBox.Question, "提示", "无法自动检查更新,请手动前往官网下载")
         box.setWindowIcon(self.icon)
         box.exec_()
     elif self.网盘链接 == '':
         box = QMessageBox(QMessageBox.Question, "提示", "已经是最新版本计算器!")
         box.setWindowIcon(self.icon)
         box.exec_()
     else:
         box = QMessageBox(QMessageBox.Question, "提示", "检测到新的计算器版本,是否更新?")
         box.setWindowIcon(self.icon)
         box.setStandardButtons(QMessageBox.Yes | QMessageBox.No
                                | QMessageBox.Cancel)
         A = box.button(QMessageBox.Yes)
         B = box.button(QMessageBox.No)
         C = box.button(QMessageBox.Cancel)
         A.setText("首页查看更新")
         B.setText("自动更新")
         C.setText(trans("取消"))
         box.exec_()
         if box.clickedButton() == B:
             self.update()
         if box.clickedButton() == A:
             QDesktopServices.openUrl(QUrl('http://dnf.17173.com/jsq/?khd'))
Exemple #2
0
 def openSet(self):
     increase_counter(ga_category="其余功能使用", name="设置")
     self.processpid = []
     self.setWindow = SetWindows(self.worker, self)
     # self.setWindow._signal.connect(self.closeSet)
     self.win = MainWindow(self.setWindow)
     self.win.show()
Exemple #3
0
 def 打赏(self):
     self.w = QWidget()
     self.w.resize(300, 300)
     self.w.setWindowTitle('打赏-微信')
     self.w.setWindowIcon(self.icon)
     主背景 = QLabel(self.w)
     赞赏码 = QPixmap()
     赞赏码.loadFromData(base64.b64decode(img.二维码))
     主背景.setPixmap(赞赏码)
     increase_counter(ga_category="其余功能使用", name="打赏")
     self.w.show()
Exemple #4
0
 def 打开窗口(self, name):
     if self.char_window != None:
         self.char_window.close()
     if "." in name:
         className = name.split(".")[1]
     else:
         className = name
     module_name = "Characters." + name
     职业 = importlib.import_module(module_name)
     char = eval("职业." + className + '()')
     increase_counter(ga_category="职业使用", name=className)
     if get_mac_address() != '':
         increase_counter(ga_category="用户职业使用", name=get_mac_address())
     try:
         self.char_window = MainWindow(char)
         self.char_window.show()
     except Exception as e:
         print(e)
Exemple #5
0
 def 打开链接(self, url, name=''):
     if name != '':
         increase_counter(ga_category="其余功能使用", name=name)
     for i in url:
         QDesktopServices.openUrl(QUrl(i))