コード例 #1
0
 public void createChat(final String userName, final long sourceId, final String firstMessage) {
   if (!WakfuGameEntity.getInstance().hasFrame(this)) {
     this.m_remoteUser = userName;
     this.m_sourceId = sourceId;
     this.m_firstMessage = firstMessage;
     WakfuGameEntity.getInstance().pushFrame(this);
   }
 }
コード例 #2
0
 @Override
 public void onFrameRemove(final FrameHandler frameHandler, final boolean isAboutToBeRemoved) {
   if (!isAboutToBeRemoved) {
     Xulor.getInstance().removeDialogUnloadListener(this.m_dialogUnloadListener);
     UIChatFrameHelper.closeModeratorChatWindow();
     Xulor.getInstance().unload("moderatorChatDialog");
     Xulor.getInstance().removeActionClass("wakfu.moderatorChat");
     if (this.m_isRunning) {
       final Message notifyToOtherSide = new CloseModeratorRequestMessage();
       WakfuGameEntity.getInstance().getNetworkEntity().sendMessage(notifyToOtherSide);
       this.m_isRunning = false;
     }
   }
 }
コード例 #3
0
 private void askToCloseRequest() {
   if (this.m_isRunning) {
     final MessageBoxData data =
         new MessageBoxData(
             102, 0, WakfuTranslator.getInstance().getString("contactModerator.suretoclose"), 24L);
     final MessageBoxControler controler = Xulor.getInstance().msgBox(data);
     controler.addEventListener(
         new MessageBoxEventListener() {
           @Override
           public void messageBoxClosed(final int type, final String userEntry) {
             if (type == 8) {
               WakfuGameEntity.getInstance().removeFrame(UIModeratorChatFrame.this);
             }
           }
         });
   } else {
     WakfuGameEntity.getInstance().removeFrame(this);
   }
 }