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()
评论列表
文章目录