private void ShowListBox() { this.m_ListBox.Clear(); WhisperRoom room = NrTSingleton <WhisperManager> .Instance.GetRoom(this.m_RoomUnique); List <WhisperUser> users = room.GetUsers(); List <long> list = new List <long>(); foreach (WhisperUser current in users) { list.Add(current.PersonID); } for (int i = 0; i < this.m_CommunityUserList.Count; i++) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = this.m_CommunityUserList[i]; if (cOMMUNITY_USER_INFO != null && !list.Contains(cOMMUNITY_USER_INFO.i64PersonID) && cOMMUNITY_USER_INFO.bConnect) { NewListItem newListItem = new NewListItem(this.m_ListBox.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, cOMMUNITY_USER_INFO.strName, null, null, null); newListItem.SetListItemData(1, NrTSingleton <UIDataManager> .Instance.GetString("Lv ", cOMMUNITY_USER_INFO.i16Level.ToString()), null, null, null); newListItem.SetListItemData(2, CommunityUI_DLG.CommunityIcon(cOMMUNITY_USER_INFO), null, null, null); newListItem.Data = cOMMUNITY_USER_INFO; this.m_ListBox.Add(newListItem); } } this.m_ListBox.RepositionItems(); }
public override void ExcuteGameGuide() { CommunityUI_DLG communityUI_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COMMUNITY_DLG) as CommunityUI_DLG; if (communityUI_DLG != null) { communityUI_DLG.RequestCommunityData(eCOMMUNITYDLG_SHOWTYPE.eSHOWTYPE_HELPSOLSET); } this.Init(); }
private void ClickConfirm_Community(NkSoldierInfo pkSolinfo) { CommunityUI_DLG communityUI_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.COMMUNITY_DLG) as CommunityUI_DLG; if (communityUI_DLG != null && communityUI_DLG.Visible) { communityUI_DLG.SetSelectHelpSol(pkSolinfo); TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "MERCENARY", "SUPPORT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); this.CloseForm(null); } }
private void ClickCommunity(IUIObject obj) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.COMMUNITY_DLG)) { CommunityUI_DLG communityUI_DLG = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.COMMUNITY_DLG) as CommunityUI_DLG; if (communityUI_DLG != null) { communityUI_DLG.RequestCommunityData(eCOMMUNITYDLG_SHOWTYPE.eSHOWTYPE_HELPSOLSET); } } else { NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.COMMUNITY_DLG); } }
private void ReqWebUserImageCallback(Texture2D txtr, object _param) { if (txtr != null) { this.UserPortrait = txtr; } else { this.UserPortrait = null; } if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.COMMUNITY_DLG)) { CommunityUI_DLG communityUI_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.COMMUNITY_DLG) as CommunityUI_DLG; if (communityUI_DLG != null) { communityUI_DLG.UpdateCommunity_Friend(this); } if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.DLG_OTHER_CHAR_DETAIL)) { DLG_OtherCharDetailInfo dLG_OtherCharDetailInfo = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.DLG_OTHER_CHAR_DETAIL) as DLG_OtherCharDetailInfo; if (dLG_OtherCharDetailInfo != null) { dLG_OtherCharDetailInfo.UpsateSoldierList(); } } } if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.STORYCHAT_DLG)) { StoryChatDlg storyChatDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.STORYCHAT_DLG) as StoryChatDlg; if (storyChatDlg != null) { storyChatDlg.UpdateUserCommunity(this.i64PersonID); } } }
public void UpdateList() { this.m_lxList.Clear(); string empty = string.Empty; string empty2 = string.Empty; int num = (this.m_Page.CURRENT_PAGE - 1) * 14; int num2 = Mathf.Min(num + 14, this.m_CommunityUserList.Count); for (int i = num; i < num2; i++) { COMMUNITY_USER_INFO cOMMUNITY_USER_INFO = this.m_CommunityUserList[i]; NewListItem newListItem = new NewListItem(this.m_lxList.ColumnNum, true, string.Empty); CommunityUI_DLG.CurrentLocationName(cOMMUNITY_USER_INFO, ref empty, ref empty2); newListItem.SetListItemData(0, this.GetLoaderImg(CommunityUI_DLG.CommunityIcon(cOMMUNITY_USER_INFO)), null, null, null); newListItem.SetListItemData(1, cOMMUNITY_USER_INFO.strName, null, null, null); newListItem.SetListItemData(2, cOMMUNITY_USER_INFO.i16Level.ToString(), null, null, null); newListItem.SetListItemData(3, NrTSingleton <CTextParser> .Instance.GetTextColor(empty2) + empty, null, null, null); newListItem.Data = cOMMUNITY_USER_INFO; this.m_lxList.Add(newListItem); } this.m_lxList.RepositionItems(); this.m_bxCurrentPage.Text = string.Format("{0}/{1}", this.m_Page.CURRENT_PAGE, this.m_Page.MAX_PAGE); }
public void UpsateSoldierList() { if (this.m_SolList != null) { for (int i = 0; i < 6; i++) { NkSoldierInfo soldierInfo = this.m_SolList.GetSoldierInfo(i); if (soldierInfo != null && soldierInfo.IsValid()) { EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(soldierInfo.GetCharKind(), soldierInfo.GetGrade()); if (i == 0) { CommunityUI_DLG communityUI_DLG = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.COMMUNITY_DLG) as CommunityUI_DLG; if (communityUI_DLG != null) { COMMUNITY_USER_INFO community_User = communityUI_DLG.GetCommunity_User(this.m_PersonID); if (community_User != null && community_User.UserPortrait != null) { this.m_dtSlot[this.Info_mode][i].SetTexture(community_User.UserPortrait); } else { this.SetSolierTexutre(eventHeroCharCode, i, soldierInfo); } } else { this.SetSolierTexutre(eventHeroCharCode, i, soldierInfo); } } else { this.SetSolierTexutre(eventHeroCharCode, i, soldierInfo); } string empty = string.Empty; string charNameBySoldierInfo = this.GetCharNameBySoldierInfo(soldierInfo); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1639"), "count", soldierInfo.GetLevel(), "targetname", charNameBySoldierInfo }); this.m_btSlot[this.Info_mode][i].ToolTip = empty; Button expr_153 = this.m_btSlot[this.Info_mode][i]; expr_153.Click = (EZValueChangedDelegate)Delegate.Combine(expr_153.Click, new EZValueChangedDelegate(this.OnClickSol)); this.SOLDIER_EQUIPINFO_REQ(this.m_PersonID, soldierInfo.GetSolID()); } else { this.m_dtSlot[this.Info_mode][i].SetTexture("NULL"); this.m_btSlot[this.Info_mode][i].ShowToolTip = false; } } NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo; if (kMyCharInfo.m_PersonID == this.m_PersonID || kMyCharInfo.m_kFriendInfo.IsFriend(kMyCharInfo.m_PersonID)) { this.m_btAddFriend.Visible = false; } } }