def dlg(self): print "showdlg" #dlg=MyCreateDBDlg(frame,-1,"Create DB") threading.Event().set() dlg=wx.MessageDialog(None,"database not exist,create it?","create database",wx.YES_NO|wx.ICON_QUESTION) if(dlg.ShowModal()==wx.ID_YES): dlg.Destroy() print "creating database" if(confs.buildNewDb(MyFrame.temp)): print "build DB successfully!" else: print "error"
def OnCellLeftClick(self,evt): conf_home=self.Namelist[evt.GetRow()][1] if(confs.checkUpdate(conf_home)==True): dlg=wx.MessageDialog(None,"create database will take a long time,go on?","create database",wx.YES_NO|wx.ICON_QUESTION) if(dlg.ShowModal()==wx.ID_YES): dlg.Destroy() print "creating database" if(confs.buildNewDb(conf_home)): print "build DB successfully!" if(confs.checkUpdate(conf_home)==False): dlg=wx.MessageDialog(None,"database already exist","create database",wx.YES_NO|wx.ICON_QUESTION) if(dlg.ShowModal()==wx.ID_YES): print "creating database" dlg.Destroy()
def run(self): print "Confs.buildNewDb" confs.buildNewDb(MyFrame.temp)