def OnNewCon(self, event): flag = True # namecon = self.connections_choice.GetStringSelection() namecon = None editcon = db_info.dbinfo(flag, namecon, self.main) editcon.Show() logging.info(u"creating new connection")
def OnEditCon(self, event): flag = False namecon = self.connections_choice.GetStringSelection() if not namecon: wx.MessageBox(u"Создайте новое соединение!") event.Skip() return editcon = db_info.dbinfo(flag, namecon, self.main) editcon.Show() logging.info(u"editing connection: %s" % (namecon))