protected override void Init() { base.Init(); List.OnItemClicked = OnItemClicked; List.Clear(); List <EKeyName> plist = this.GetPar <List <EKeyName> >(0); BindData(plist); SearchWord.onValueChanged.AddListener(delegate { OnSearchWordChanged(); }); }
private void BindTaskPriority() { List <string> pList = EnumMapping.ListAll <TaskPriority>(); pList.Insert(0, "全部"); YXJList.Clear(); YXJList.OnItemClicked = YXJItem_OnClicked; YXJList.BindData <string>("TextItem", pList, (i, e) => { i.name = "TextItem_" + e; i.transform.Find("Name").GetComponent <Text>().text = e; }, true, true); }
private void BindPlan() { PlanList.Clear(); Plan_Service.ListMyProjectID(NewSearch.ProjectID, t => { PlanList.BindData <EPlan>("PlanItemSelect", t.GetData() as List <EPlan>, (i, e) => { i.name = "PlanItem_" + e.ID; i.transform.Find("Name").GetComponent <Text>().text = e.Name; }, true, true); PlanList.OnItemClicked = OnPlanClicked; }); }
private void BindProject() { ProjectList.Clear(); Project_Service.ListTeamProject(t => { List <EProject> plist = t.GetData() as List <EProject>; ProjectList.BindData <EProject>("ProjectItemSelect", plist, (i, e) => { i.name = "ProjectItem_" + e.ID.ToString(); i.transform.Find("TIContent").GetComponent <Text>().text = e.Name; }, true, true); ProjectList.OnItemClicked = OnProjectClicked; }); }
void BindAttachment() { if (string.IsNullOrEmpty(SelectFilePath)) { AttachmentList.Clear(); return; } AttachmentList.BindData <string>("AttachmentItem", SelectFilePath.Split('|').ToList(), (i, e) => { string path = e; i.name = path; i.transform.Find("Name").GetComponent <Text>().text = System.IO.Path.GetFileName(path); i.transform.Find("Button").gameObject.SetActive(true); EventListener.Get(i.transform.Find("Button").gameObject).onClick = OnDelAttachmentClicked; }); }
void BindAttachment(string attachment) { if (string.IsNullOrEmpty(attachment)) { AttachmentList.Clear(); return; } AttachmentList.OnItemClicked = OnAttachmentItemClicked; AttachmentList.BindData <string>("AttachmentItem", attachment.Split('|').ToList(), (i, e) => { string path = e; i.name = path; i.transform.Find("Name").GetComponent <Text>().text = System.IO.Path.GetFileName(path); i.transform.Find("Button").gameObject.SetActive(false); }); }
private void BindTaskState() { ProjectTaskStep_Service.ListByProjectID(NewSearch.ProjectID, t => { ProjectStepList = t.GetData() as List <EProjectTaskStep>; ProjectStepList.Insert(0, new EProjectTaskStep() { Name = "全部", Value = 0 }); StateList.Clear(); StateList.OnItemClicked = StateItem_OnClicked; StateList.BindData <EProjectTaskStep>("TextItem", ProjectStepList, (i, e) => { i.name = "TextItem_" + e.Name; i.transform.Find("Name").GetComponent <Text>().text = e.Name; }, true, true); }); }
void OnBtnShowFriendClicked(GameObject sender) { IsShow = !IsShow; if (IsShow) { Content.gameObject.SetActive(true); Content.GetComponent <RectTransform>().DOLocalMoveX(-280, 0.25f); BindData(); } else { Tweener tweener = Content.GetComponent <RectTransform>().DOLocalMoveX(-500, 0.25f); tweener.OnComplete(() => { Content.gameObject.SetActive(false); ListView.Clear(); }); } SoundManager.Instance.PlaySound("音效/按钮"); }
protected override void Free() { ListView.Clear(); base.Free(); }