def load_event(self, e):
dia = wx.FileDialog(self, "Load Bracket",
"", "", "bp5000 bracket|*.bp5", wx.FD_OPEN)
if dia.ShowModal() == wx.ID_CANCEL:
return
brs = bracketio.read_bracket(dia.GetPath())
if isinstance(brs, str):
w = wx.MessageDialog(self, brs, "Error", wx.ICON_ERROR)
w.ShowModal()
w.Destroy()
return
name = dia.GetFilename().replace(".bp5", "")
pg = ManagementPage(self.nb, name, len(brs), brs)
self.nb.InsertPage(0, pg, name)
评论列表
文章目录