Beispiel #1
0
 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()
Beispiel #2
0
 def OnCreateDatabase(self,evt):
     dlg=wx.TextEntryDialog(None,"input conference id you want to set up database","create database","",style=wx.OK|wx.CANCEL)
     if(dlg.ShowModal()==wx.ID_OK):
         #判断是否存在相应的数据库
         #根据用户输入的名字显示列表
         
         tempdlg=dlg.GetValue()
         print tempdlg
         if(confs.checkUpdate(tempdlg)==False):
             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(self.buildNewDb(tempdlg)):
                     print "build DB successfully!"
             else:
                  print "error"
                 
         if(confs.checkUpdate(tempdlg)==True):
             print "Database Ok!"
Beispiel #3
0
 def run(self):
     MyThread3.result=confs.checkUpdate(self.temp)