Ejemplo n.º 1
0
    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(); });
    }
Ejemplo n.º 2
0
    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);
    }
Ejemplo n.º 3
0
 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;
     });
 }
Ejemplo n.º 4
0
 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;
     });
 }
Ejemplo n.º 5
0
 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;
     });
 }
Ejemplo n.º 6
0
 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);
     });
 }
Ejemplo n.º 7
0
    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);
        });
    }
Ejemplo n.º 8
0
 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("音效/按钮");
 }
Ejemplo n.º 9
0
 protected override void Free()
 {
     ListView.Clear();
     base.Free();
 }