MineMainWindow.py 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. from PySide6.QtWidgets import *
  2. from PySide6.QtCore import *
  3. from PySide6.QtGui import *
  4. import settings
  5. class MineMainWindow(QMainWindow):
  6. def checkLogin(self):
  7. """检查是否登录"""
  8. if not settings.IsLogin:
  9. # self.PlayErrorAudio()
  10. QMessageBox.critical(self, "警告", "请先登录账号", QMessageBox.Ok)
  11. return False
  12. return True
  13. def checkMods(self,mods):
  14. """检查是否有权限"""
  15. if not mods:
  16. a = QMessageBox.question(self, '确认', '无抠图软件权限,请联系管理员',
  17. QMessageBox.Yes)
  18. return False
  19. return True
  20. def WaringMessage(self, message):
  21. """警告弹窗"""
  22. # self.PlayErrorAudio()
  23. return QMessageBox.critical(self, "警告", message, QMessageBox.Ok)
  24. def comfirmMessage(self, message):
  25. questResult = QMessageBox.question(
  26. self, "确认", message, QMessageBox.Yes | QMessageBox.No
  27. )
  28. return questResult