コード例 #1
0
ファイル: profilewindow.py プロジェクト: webiumsk/WOT0.10.0
 def userAddToClan(self):
     self.as_showWaitingS(WAITING.CLANS_INVITES_SEND, {})
     profile = g_clanCtrl.getAccountProfile()
     context = CreateInviteCtx(profile.getClanDbID(), [self.__databaseID])
     result = yield g_clanCtrl.sendRequest(context, allowDelay=True)
     if result.isSuccess():
         SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(profile.getClanName(), profile.getClanAbbrev()))
     self.as_hideWaitingS()
コード例 #2
0
 def sendRequest(self):
     self.as_setWaitingVisibleS(True)
     context = CreateApplicationCtx([self.__selectedClan.getClanDbID()])
     result = yield g_clanCtrl.sendRequest(context, allowDelay=True)
     if result.isSuccess():
         SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(self.__selectedClan.getClanName(), self.__selectedClan.getClanAbbrev()))
     self._updateSetaledState()
     self.as_setWaitingVisibleS(False)
コード例 #3
0
 def sendRequest(self):
     self.as_setWaitingVisibleS(True)
     context = CreateApplicationCtx([self.__selectedClan.getClanDbID()])
     result = yield self.clansCtrl.sendRequest(context, allowDelay=True)
     if result.isSuccess():
         SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(self.__selectedClan.getClanName(), self.__selectedClan.getClanAbbrev()))
     self._updateSetaledState()
     self.as_setWaitingVisibleS(False)
コード例 #4
0
 def sendClanInvite(self):
     profile = g_clanCtrl.getAccountProfile()
     context = CreateInviteCtx(profile.getClanDbID(), [self.databaseID])
     result = yield g_clanCtrl.sendRequest(context, allowDelay=True)
     if result.isSuccess():
         SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(profile.getClanName(), profile.getClanAbbrev()))
     else:
         SystemMessages.pushMessage(clans_fmts.getInvitesNotSentSysMsg([self.userName or '']), type=SystemMessages.SM_TYPE.Error)
コード例 #5
0
 def _sendApplication(self):
     self.as_showWaitingS(True)
     context = CreateApplicationCtx([self._clanDossier.getDbID()])
     result = yield self.clansCtrl.sendRequest(context, allowDelay=True)
     if result.isSuccess():
         clanInfo = yield self._clanDossier.requestClanInfo()
         SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(clanInfo.getClanName(), clanInfo.getTag()))
         self._onAppSuccessfullySent()
     self.as_showWaitingS(False)
コード例 #6
0
 def _sendApplication(self):
     self.as_showWaitingS(True)
     context = CreateApplicationCtx([self._clanDossier.getDbID()])
     result = yield g_clanCtrl.sendRequest(context, allowDelay=True)
     if result.isSuccess():
         clanInfo = yield self._clanDossier.requestClanInfo()
         SystemMessages.pushMessage(clans_fmts.getAppSentSysMsg(clanInfo.getClanName(), clanInfo.getTag()))
         self._onAppSuccessfullySent()
     self.as_showWaitingS(False)