Exemplo n.º 1
0
 def _setUser(self, name):
     from user import UserDialog
     g_userInfo = GetUserInfo()
     g_userInfo.setUser(name)
     self.textUser.SetLabel(name)
     
     util.config.set('APP', 'user', name)
Exemplo n.º 2
0
 def showRecord(self,evt):
     from user import GetUserInfo, RecordListDialog
     userInfo = GetUserInfo()
     if not userInfo.getCurUser():
         return
     dlg = RecordListDialog(self, -1, _("Record List"), size=(350, 200))
     dlg.CenterOnScreen()
     dlg.ShowModal()
     dlg.Destroy()
Exemplo n.º 3
0
 def finish(self, evt):
     res = self.board.checkValid()
     if res:
         msg = _('Congratulations! You had finish this Sudoku!')
         self.spendTimer.Stop()
         
         g_userInfo = GetUserInfo()
         g_userInfo.setRecord(self.puzzleID, self.spendTime)
     else:
         msg = _('Hey man! Your answer is wrong... try again!')
     dlg = wx.MessageDialog(None, msg, _('Information'), style=wx.OK)
     dlg.ShowModal()
     dlg.Destroy()