void Start() { if (AuthorityHelper.NotAuthority(AuthorityHelper.USER_GROUP_MANAGEMENT)) { BtnNewGroup.SetActive(false); } Instance = this; groupUI = gameObject.GetComponent <GroupManageUIPanelControl>(); if (groupUI == null) { Debug.LogError("当前对象缺失 GroupManageUIPanelControl 脚本;对象名:" + gameObject.name); } LoadGroupRecord(); }
/// <summary> /// 把指定的值显示在相关的组件上 /// </summary> /// <param name="Record">Record.</param> public void SetValue(GroupInfoRecord Record, GroupManageUIPanelControl group, int type) { Logger.Instance.WriteLog("初始化用户组记录项目"); UIEventListener.Get(gameObject).onClick = ShowGroupModifyWindow; GIRecord = Record; groupUI = group; LBLNo.text = GIRecord.No; LBLName.text = GIRecord.GInfo.Name; if (type == -1) { //新建对象的输入功能打开 LBLInput.gameObject.GetComponent <BoxCollider>().enabled = true; LBLStatus.gameObject.GetComponent <BoxCollider>().enabled = true; } if (GIRecord.GInfo.Status == "正常") { LBLStatus.value = true; } else { LBLStatus.value = false; } }
void Awake() { groupUI = gameObject.GetComponent <GroupManageUIPanelControl> (); }