def Open(self): self.loginFailureMsgDict={ "ALREADY" : localeInfo.LOGIN_FAILURE_ALREAY, "NOID" : localeInfo.LOGIN_FAILURE_NOT_EXIST_ID, "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "FULL" : localeInfo.LOGIN_FAILURE_TOO_MANY_USER, "SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN, "REPAIR" : localeInfo.LOGIN_FAILURE_REPAIR_ID, "BLOCK" : localeInfo.LOGIN_FAILURE_BLOCK_ID, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, "BESAMEKEY" : localeInfo.LOGIN_FAILURE_BE_SAME_KEY, "NOTAVAIL" : localeInfo.LOGIN_FAILURE_NOT_AVAIL, "NOBILL" : localeInfo.LOGIN_FAILURE_NOBILL, "BLKLOGIN" : localeInfo.LOGIN_FAILURE_BLOCK_LOGIN, "WEBBLK" : localeInfo.LOGIN_FAILURE_WEB_BLOCK, } self.loginFailureFuncDict = { "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : app.Exit, } self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("LoginWindow") self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoginWindow.py") if musicInfo.loginMusic != "": snd.SetMusicVolume(systemSetting.GetMusicVolume()) snd.FadeInMusic("BGM/" + musicInfo.loginMusic) snd.SetSoundVolume(systemSetting.GetSoundVolume()) ime.AddExceptKey(91) ime.AddExceptKey(93) self.SetChannel("CH1") self.idEditLine.SetFocus() self.pressKey() for aID in xrange(0, 4): if get_reg("%d_id" % aID): self.accountText[aID].SetText("%s" % binascii.a2b_base64("%s" % get_reg("%d_id" % aID))) self.Show() app.ShowCursor()
def Open(self): ServerStateChecker.Create(self) print "LOGIN WINDOW OPEN ----------------------------------------------------------------------------" self.loginFailureMsgDict={ #"DEFAULT" : localeInfo.LOGIN_FAILURE_UNKNOWN, "ALREADY" : localeInfo.LOGIN_FAILURE_ALREAY, "NOID" : localeInfo.LOGIN_FAILURE_NOT_EXIST_ID, "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "FULL" : localeInfo.LOGIN_FAILURE_TOO_MANY_USER, "SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN, "REPAIR" : localeInfo.LOGIN_FAILURE_REPAIR_ID, "BLOCK" : localeInfo.LOGIN_FAILURE_BLOCK_ID, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, "BESAMEKEY" : localeInfo.LOGIN_FAILURE_BE_SAME_KEY, "NOTAVAIL" : localeInfo.LOGIN_FAILURE_NOT_AVAIL, "NOBILL" : localeInfo.LOGIN_FAILURE_NOBILL, "BLKLOGIN" : localeInfo.LOGIN_FAILURE_BLOCK_LOGIN, "WEBBLK" : localeInfo.LOGIN_FAILURE_WEB_BLOCK, "BADSCLID" : localeInfo.LOGIN_FAILURE_WRONG_SOCIALID, "AGELIMIT" : localeInfo.LOGIN_FAILURE_SHUTDOWN_TIME, } self.loginFailureFuncDict = { "WRONGPWD" : self.__DisconnectAndInputPassword, "WRONGMAT" : self.__DisconnectAndInputMatrix, "QUIT" : app.Exit, } self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("LoginWindow") if not self.__LoadScript(uiScriptLocale.LOCALE_UISCRIPT_PATH + "LoginWindow.py"): dbg.TraceError("LoginWindow.Open - __LoadScript Error") return self.__LoadLoginInfo("loginInfo.xml") if app.loggined: self.loginFailureFuncDict = { "WRONGPWD" : app.Exit, "WRONGMAT" : app.Exit, "QUIT" : app.Exit, } if musicInfo.loginMusic != "": snd.SetMusicVolume(systemSetting.GetMusicVolume()) snd.FadeInMusic("BGM/"+musicInfo.loginMusic) snd.SetSoundVolume(systemSetting.GetSoundVolume()) # pevent key "[" "]" ime.AddExceptKey(91) ime.AddExceptKey(93) self.Show() global SKIP_LOGIN_PHASE if SKIP_LOGIN_PHASE: if self.isStartError: self.connectBoard.Hide() self.loginBoard.Hide() self.serverBoard.Hide() self.PopupNotifyMessage(localeInfo.LOGIN_CONNECT_FAILURE, self.__ExitGame) return if self.loginInfo: self.serverBoard.Hide() else: self.__RefreshServerList() self.__OpenServerBoard() else: connectingIP = self.stream.GetConnectAddr() if connectingIP: if app.USE_OPENID and not app.OPENID_TEST : self.__RefreshServerList() self.__OpenServerBoard() else: self.__OpenLoginBoard() if IsFullBackImage(): self.GetChild("bg1").Hide() self.GetChild("bg2").Show() else: self.__RefreshServerList() self.__OpenServerBoard() app.ShowCursor()
def Open(self): ServerStateChecker.Create(self) print "LOGIN WINDOW OPEN ----------------------------------------------------------------------------" self.loginFailureMsgDict={ "ALREADY" : localeInfo.LOGIN_FAILURE_ALREAY, "NOID" : localeInfo.LOGIN_FAILURE_NOT_EXIST_ID, "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "FULL" : localeInfo.LOGIN_FAILURE_TOO_MANY_USER, "SHUTDOWN" : localeInfo.LOGIN_FAILURE_SHUTDOWN, "REPAIR" : localeInfo.LOGIN_FAILURE_REPAIR_ID, "BLOCK" : localeInfo.LOGIN_FAILURE_BLOCK_ID, "REBOOT" : localeInfo.LOGIN_CONNECT_REBOOT, "PWCHANGE" : localeInfo.LOGIN_CONNECT_PWCHANGE, "SBLOCK" : localeInfo.LOGIN_CONNECT_UBLOCK, "BOT" : localeInfo.LOGIN_CONNECT_BOT, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER_TRIPLE, "BESAMEKEY" : localeInfo.LOGIN_FAILURE_BE_SAME_KEY, "NOTAVAIL" : localeInfo.LOGIN_FAILURE_NOT_AVAIL, "NOBILL" : localeInfo.LOGIN_FAILURE_NOBILL, "BLKLOGIN" : localeInfo.LOGIN_FAILURE_BLOCK_LOGIN, "WEBBLK" : localeInfo.LOGIN_FAILURE_WEB_BLOCK, "HWID" : localeInfo.LOGIN_FAILURE_HWID_BLOCK, } self.loginFailureFuncDict = { "WRONGPWD" : localeInfo.LOGIN_FAILURE_WRONG_PASSWORD, "WRONGMAT" : localeInfo.LOGIN_FAILURE_WRONG_MATRIX_CARD_NUMBER, "QUIT" : app.Exit, } if app.NEW_CLIENT_VERSION_CHECK: self.loginFailureMsgDict["WRONGVER"] = localeInfo.LOGIN_FAILURE_WRONG_VERSION self.loginFailureFuncDict["WRONGVER"] = app.Exit self.__RequestServerStateList() self.SetSize(wndMgr.GetScreenWidth(), wndMgr.GetScreenHeight()) self.SetWindowName("LoginWindow") self.__LoadScript("tbx/ui/loginwindow.py") for i in xrange(4): self.CreateChannel(i) self.CheckAccount() if systemSetting.IsForcedRules() != RULES_VALUE: self.OpenRulesBoard() if musicInfo.loginMusic != "": snd.SetMusicVolume(systemSetting.GetMusicVolume()) snd.FadeInMusic("BGM/" + musicInfo.loginMusic) snd.SetSoundVolume(systemSetting.GetSoundVolume()) ime.AddExceptKey(91) ime.AddExceptKey(93) self.SetChannel(0) self.InitWithCMD() self.Show() app.ShowCursor()