private void ClickSend(IUIObject obj) { if (0 >= this.m_InputText.Text.Length) { return; } if (string.Empty == this.m_InputText.Text) { return; } NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); if (myCharInfo == null) { return; } NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char == null) { return; } string text = this.m_InputText.Text; if ("true" == MsgHandler.HandleReturn <string>("ReservedWordManagerIsUse", new object[0])) { text = MsgHandler.HandleReturn <string>("ReservedWordManagerReplaceWord", new object[] { text }); } if (text.Contains("*")) { Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("797"), SYSTEM_MESSAGE_TYPE.NAGATIVE_MESSAGE); } if (this.m_DetailList.ChangeLineHeight) { this.m_DetailList.ChangeLineHeight = false; this.m_DetailList.LineHeight = 114f; this.m_DetailList.SetColumnData("Mobile/DLG/StoryChat/NLB_News01_ColumnData" + NrTSingleton <UIDataManager> .Instance.AddFilePath); } this.m_CurrentCommentInfo = new StoryComment_Info(); this.m_CurrentCommentInfo.nPersonID = myCharInfo.m_PersonID; this.m_CurrentCommentInfo.nCharKind = myCharInfo.GetImgFaceCharKind(); this.m_CurrentCommentInfo.szName = TKString.StringChar(@char.GetCharName()); this.m_CurrentCommentInfo.szMessage = TKString.StringChar(text); this.m_CurrentCommentInfo.nLevel = (short)myCharInfo.GetLevel(); GS_STORYCOMMENT_SET_REQ gS_STORYCOMMENT_SET_REQ = new GS_STORYCOMMENT_SET_REQ(); gS_STORYCOMMENT_SET_REQ.m_nStoryCommentID = 0L; gS_STORYCOMMENT_SET_REQ.nStoryChatID = this.m_CurrentStoryChat.nStoryChatID; TKString.StringChar(text, ref gS_STORYCOMMENT_SET_REQ.szMessage); SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_STORYCOMMENT_SET_REQ, gS_STORYCOMMENT_SET_REQ); }
public void SetCommentList(long _CommentID) { if (this.m_CurrentCommentInfo == null) { return; } NewListItem newListItem = new NewListItem(this.m_DetailList.ColumnNum, true, string.Empty); Texture2D texture2D = null; if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG)) { StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg; if (storyChatDlg != null) { texture2D = storyChatDlg.GetFriendPortraitPersonID(this.m_CurrentCommentInfo.nPersonID); } } if (texture2D != null) { newListItem.SetListItemData(1, texture2D, null, null, null, null); } else { EVENT_HERODATA eventHeroCharFriendCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharFriendCode(this.m_CurrentCommentInfo.nCharKind); if (eventHeroCharFriendCode != null) { newListItem.SetListItemData(0, "Win_I_EventSol", null, null, null); newListItem.EventMark = true; } newListItem.SetListItemData(1, new CostumeDrawTextureInfo { charKind = this.m_CurrentCommentInfo.nCharKind, grade = -1, costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_CurrentCommentInfo.nFaceCharCostumeUnique) }, null, null, null); } string text = TKString.NEWString(this.m_CurrentCommentInfo.szName); newListItem.SetListItemData(2, NrTSingleton <UIDataManager> .Instance.GetString(text, "(", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("152"), this.m_CurrentCommentInfo.nLevel.ToString(), ")"), null, null, null); DateTime nowTime = PublicMethod.GetNowTime(); string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("301"); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "month", nowTime.Month, "day", nowTime.Day, "hour", nowTime.Hour, "min", nowTime.Minute }); newListItem.SetListItemData(3, empty, null, null, null); newListItem.SetListItemData(4, TKString.NEWString(this.m_CurrentCommentInfo.szMessage), null, null, null); newListItem.SetListItemData(5, string.Empty, text, new EZValueChangedDelegate(this.ClickUser), null); NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1); if (@char != null) { if (text == @char.GetCharName()) { newListItem.SetListItemData(6, string.Empty, _CommentID, new EZValueChangedDelegate(this.DeleteStoryComment), null); } else { newListItem.SetListItemData(6, false); } } else { newListItem.SetListItemData(6, false); } newListItem.Data = _CommentID; this.m_nCommentCount++; this.m_DetailList.InsertAdd(this.m_DetailList.Count, newListItem); this.m_DetailList.RepositionItems(); this.m_DetailList.ScrollPosition = 1f; this.m_CurrentCommentInfo = null; }