代码拉取完成,页面将自动刷新
#!/usr/bin/python3.7
# -*- coding: utf-8 -*-
# @Time : 2021/8/20 22:54
# @Author : kuang_zhi_cheng
# @Email : 873082057@qq.com
# @File : main_window.py
# @Software: PyCharm
import sys
from PySide2.QtWidgets import QApplication, QStyleFactory
from resources.main_window import *
from script.ui_logic import *
from script.calc_logic import *
ATTR_PATH = "D:\PythonProject\Demo01\Attr.xlsx"
class MyWindow(QMainWindow, Ui_MainWindow):
def __init__(self):
super(MyWindow, self).__init__()
self.setupUi(self)
load_xlsx(ATTR_PATH, self.Attacking)
load_xlsx(ATTR_PATH, self.Defensive)
def reset(self, event):
"""
重置hook
:param event:
"""
rest_table_value(self.Attacking)
rest_table_value(self.Defensive)
def column_change_attacking(self, row: int, column: int):
"""
单元格验证
:param row: 行
:param column:列
"""
column_change(row, column, self.Attacking)
def column_change_defensive(self, row: int, column: int):
"""
单元格验证
:param row: 行
:param column:列
"""
column_change(row, column, self.Defensive)
def hurt_calc(self, event):
"""
计算伤害
:param event:
"""
attacking = get_attr_bean(self.Attacking)
defensive = get_attr_bean(self.Defensive)
calc(attacking, defensive)
def main():
app = QApplication(sys.argv)
app.setStyle(QStyleFactory.create('Fusion'))
my_window = MyWindow()
my_window.show()
app.exec_()
if __name__ == '__main__':
main()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。