gui.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:bp5000 作者: isaiahr 项目源码 文件源码
def __init__(self, parent, match):
        self.match = match
        self.parent = parent
        wx.Dialog.__init__(self, parent)
        self.vsplit = wx.BoxSizer(wx.VERTICAL)
        self.ptop = wx.Panel(self)
        self.pbot = wx.Panel(self)
        pan = ScoresPanel(self.ptop, match, self)
        nw = wx.Button(self.pbot, label="no result", pos=(50, 15))
        rw = wx.Button(self.pbot, label="confirm", pos=(150, 15))
        self.vsplit.Add(self.ptop, 1, wx.ALIGN_TOP | wx.EXPAND)
        self.vsplit.Add(self.pbot, 1, wx.ALIGN_BOTTOM | wx.EXPAND)
        self.SetSizer(self.vsplit)

        def nowinner(e):
            self.match.settbd()
            self.parent.updatebracketimg()
            self.Close()

        def setwinner(e):
            self.match.setscore(pan.w1.GetValue(), pan.w2.GetValue())
            self.parent.updatebracketimg()
            self.Close()

        self.Bind(wx.EVT_BUTTON, nowinner, nw)
        self.Bind(wx.EVT_BUTTON, setwinner, rw)
        self.SetSize((300, 170))
        self.SetTitle("Report Scores")
        self.Show()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号