private void SetPanelVisible(bool isHave = false) { if (!isHave) { this.UpdateWorldRecruitDownCount(-1); } base.FindTransform("NoMemberRoot").get_gameObject().SetActive(!isHave); base.FindTransform("HaveMemberRoot").get_gameObject().SetActive(isHave); if (isHave) { int i = 0; int num = 0; while (i < TeamBasicManager.Instance.MyTeamData.TeamRoleList.get_Count()) { MemberResume memberResume = TeamBasicManager.Instance.MyTeamData.TeamRoleList.get_Item(i); if (memberResume.roleId != EntityWorld.Instance.EntSelf.ID) { if (num < this.teamMemberTransList.get_Count()) { this.teamMemberTransList.get_Item(num).get_gameObject().SetActive(true); this.teamMemberTransList.get_Item(num).GetComponent <TeamTownMemberItem>().RefreshUI(memberResume); } num++; } i++; } for (int j = num; j < this.teamMemberTransList.get_Count(); j++) { this.teamMemberTransList.get_Item(j).get_gameObject().SetActive(false); } } }
public void RefreshUI(MemberResume member) { if (!this.isInit) { this.InitUI(); } this.UpdateTeamChatTip(null); this.m_memberResume = member; if (this.m_headIcon != null) { AvatarModel avatarModel = DataReader <AvatarModel> .Get(DataReader <RoleCreate> .Get((int)member.career).modle); ResourceManager.SetSprite(this.m_headIcon, GameDataUtils.GetIcon(avatarModel.icon)); } base.FindTransform("num").GetComponent <Text>().set_text(member.hp + string.Empty); base.FindTransform("NameLab").GetComponent <Text>().set_text(member.name); base.FindTransform("LevelLab").GetComponent <Text>().set_text("Lv." + member.level.ToString()); ResourceManager.SetSprite(this.m_spVIPLevel1, GameDataUtils.GetNumIcon10(member.vipLv, NumType.Yellow_light)); ResourceManager.SetSprite(this.m_spVIPLevel2, GameDataUtils.GetNumIcon1(member.vipLv, NumType.Yellow_light)); if (member.roleId == TeamBasicManager.Instance.MyTeamData.LeaderID) { this.m_leaderIcon.get_gameObject().SetActive(true); } else { this.m_leaderIcon.get_gameObject().SetActive(false); } base.FindTransform("InFightingStatusIcon").get_gameObject().SetActive(member.inFighting); }
public int SaveMemberResume(dynamic requestData) { string query = JsonConvert.SerializeObject(requestData); MemberResume model = JsonConvert.DeserializeObject <MemberResume>(query); db.MemberResume.Add(model); db.SaveChanges(); return(model.ResumeId); }
public int UpdateMemberResume(dynamic requestData) { string query = JsonConvert.SerializeObject(requestData); MemberResume model = JsonConvert.DeserializeObject <MemberResume>(query); EntityState statebefore = db.Entry(model).State; db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return(model.ResumeId); }
public void PutTeamLeaderToFirst() { if (this.teamRoleList != null) { int num = this.teamRoleList.FindIndex((MemberResume a) => a.roleId == this.LeaderID); if (num > 0) { MemberResume memberResume = this.teamRoleList.get_Item(num); this.teamRoleList.set_Item(num, this.teamRoleList.get_Item(0)); this.teamRoleList.set_Item(0, memberResume); } } }
public void Update2RoleMemberList(MemberResume memberResume) { if (this.teamRoleList == null) { return; } int num = this.teamRoleList.FindIndex((MemberResume a) => a.roleId == memberResume.roleId); if (num >= 0) { this.teamRoleList.set_Item(num, memberResume); } this.PutTeamLeaderToFirst(); }
public void Add2RoleMemberList(MemberResume memberResume) { if (this.teamRoleList == null) { this.teamRoleList = new List <MemberResume>(); } int num = this.teamRoleList.FindIndex((MemberResume a) => a.roleId == memberResume.roleId); if (num < 0) { this.teamRoleList.Add(memberResume); } this.PutTeamLeaderToFirst(); }
public void RefreshUI(MemberResume memberInfo) { this.memberInfo = memberInfo; if (memberInfo == null) { return; } int vipLv = memberInfo.vipLv; long fighting = memberInfo.fighting; int level = memberInfo.level; base.FindTransform("level").GetComponent <Text>().set_text(level.ToString()); base.FindTransform("name").GetComponent <Text>().set_text(memberInfo.name.ToString()); base.FindTransform("fighting").GetComponent <Text>().set_text(fighting.ToString()); Image component = base.FindTransform("VIPLevel1").GetComponent <Image>(); Image component2 = base.FindTransform("VIPLevel2").GetComponent <Image>(); ResourceManager.SetSprite(component, GameDataUtils.GetNumIcon10(memberInfo.vipLv, NumType.Yellow_light)); ResourceManager.SetSprite(component2, GameDataUtils.GetNumIcon1(memberInfo.vipLv, NumType.Yellow_light)); ResourceManager.SetSprite(this.m_headIcon, UIUtils.GetRoleSmallIcon((int)memberInfo.career)); }
public void ShowRoleMemberListState() { List <TeamMemberStartFightReplyState> teamMemberStartFightReplyStateList = TeamBasicManager.Instance.teamMemberStartFightReplyStateList; int i = 0; if (TeamBasicManager.Instance.MyTeamData != null && TeamBasicManager.Instance.MyTeamData.TeamRoleList != null) { while (i < TeamBasicManager.Instance.MyTeamData.TeamRoleList.get_Count()) { MemberResume member = TeamBasicManager.Instance.MyTeamData.TeamRoleList.get_Item(i); bool flag = member.roleId == TeamBasicManager.Instance.MyTeamData.LeaderID; bool isAgree = false; if (teamMemberStartFightReplyStateList != null) { int num = teamMemberStartFightReplyStateList.FindIndex((TeamMemberStartFightReplyState a) => a.RoleID == member.roleId); if (num >= 0) { isAgree = true; } } if (flag) { isAgree = true; } this.SetMemebrItem(i, (int)member.career, member.name, member.level, isAgree, flag); i++; } } int num2 = i; while ((long)num2 < 3L) { if (num2 >= this.teamMemberTransList.get_Count()) { return; } this.teamMemberTransList.get_Item(num2).get_gameObject().SetActive(false); num2++; } }
public void RefreshUI(MemberResume memberResume) { this.m_memberResume = memberResume; if (!this.isInit) { this.InitUI(); } bool flag = memberResume != null; if (this.noMemberObj.get_activeSelf() == flag) { this.noMemberObj.SetActive(!flag); } if (this.haveMemberObj.get_activeSelf() != flag) { this.haveMemberObj.SetActive(flag); } if (this.m_memberResume != null) { ResourceManager.SetSprite(this.headIconImg, UIUtils.GetRoleSmallIcon((int)memberResume.career)); this.roleNameText.set_text(memberResume.name); this.roleLvText.set_text("Lv." + memberResume.level + string.Empty); this.roleFightingText.set_text(memberResume.fighting + string.Empty); if (TeamBasicManager.Instance.MyTeamData != null && TeamBasicManager.Instance.MyTeamData.LeaderID == memberResume.roleId) { this.leadIconImg.set_enabled(true); } else { this.leadIconImg.set_enabled(false); } ResourceManager.SetSprite(this.m_spVIPLevel1Img, GameDataUtils.GetNumIcon10(memberResume.vipLv, NumType.Yellow_light)); ResourceManager.SetSprite(this.m_spVIPLevel2Img, GameDataUtils.GetNumIcon10(memberResume.vipLv, NumType.Yellow_light)); } this.SetButtonVisible(); }