private void AfterEditChatGroup(GameWebAPI.RespData_EditChatGroupLogic data) { if (ChatTools.CheckOnFLG(data.result)) { CMD_ModalMessage cmd_ModalMessage = GUIMain.ShowCommonDialog(delegate(int i) { this.< ClosePanel > __BaseCallProxy0(true); ClassSingleton <ChatData> .Instance.CurrentChatInfo.groupName = this.groupNameInput.value; CMD_ChatWindow.instance.UpdateChatWindowTitle = ClassSingleton <ChatData> .Instance.CurrentChatInfo.groupName; CMD_ChatTop.instance.GetUserChatGroupListExec(); }, "CMD_ModalMessage", null) as CMD_ModalMessage; cmd_ModalMessage.Title = StringMaster.GetString("ChatConfirmTitle"); cmd_ModalMessage.Info = StringMaster.GetString("ChatGroupUpdateSuccess"); } }
public void OnSubmit() { if (this.groupNameInput.value.Length > 15 || this.commentInput.value.Length > 30) { this.ShowDaialogOverTheLength(); } else if (TextUtil.SurrogateCheck(this.groupNameInput.value) || TextUtil.SurrogateCheck(this.commentInput.value)) { this.ShowDaialogForbiddenChar(); } else { RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON); if (this.isConfigModify) { GameWebAPI.RespData_EditChatGroupLogic chatGroup = null; GameWebAPI.EditChatGroupLogic request = new GameWebAPI.EditChatGroupLogic { SetSendData = delegate(GameWebAPI.ReqData_EditChatGroupLogic param) { param.chatGroupId = ClassSingleton <ChatData> .Instance.CurrentChatInfo.groupId; param.categoryId = this.selectedCategoryType; param.groupName = this.groupNameInput.value; param.comment = this.commentInput.value; param.approvalType = this.selectedApprovalType; }, OnReceived = delegate(GameWebAPI.RespData_EditChatGroupLogic response) { chatGroup = response; } }; base.StartCoroutine(request.RunOneTime(delegate() { RestrictionInput.EndLoad(); this.AfterEditChatGroup(chatGroup); }, delegate(Exception noop) { RestrictionInput.EndLoad(); }, null)); } else { RequestList requestList = new RequestList(); RequestBase addRequest = new GameWebAPI.CreateChatGroupLogic { SetSendData = delegate(GameWebAPI.ReqData_CreateChatGroupLogic param) { param.categoryId = this.selectedCategoryType; param.groupName = this.groupNameInput.value; param.comment = this.commentInput.value; param.approvalType = this.selectedApprovalType; } }; requestList.AddRequest(addRequest); GameWebAPI.UserChatGroupList userChatGroupList = new GameWebAPI.UserChatGroupList(); userChatGroupList.OnReceived = delegate(GameWebAPI.RespData_UserChatGroupList response) { ClassSingleton <ChatData> .Instance.CurrentChatInfo.joinGroupData = response; }; addRequest = userChatGroupList; requestList.AddRequest(addRequest); base.StartCoroutine(requestList.RunOneTime(delegate() { RestrictionInput.EndLoad(); this.AfterCreateChatGroup(); }, delegate(Exception noop) { RestrictionInput.EndLoad(); }, null)); } } }