コード例 #1
0
    private void Confirm()
    {
        tableList.Clear();
        List <string> level = new List <string>();

        foreach (var item in levelTree.nodeData[0].Children)
        {
            if (item.Check)
            {
                level.Add(item.Title);
                //Debug.Log(item.Title);
            }
        }


        Dictionary <string, List <string> > resultsList = new Dictionary <string, List <string> >();
        List <string> result = new List <string>();

        foreach (UTreeNodeData node1 in compoentTree.nodeData)
        {
            foreach (UTreeNodeData node2 in node1.Children)
            {
                foreach (UTreeNodeData node3 in node2.Children)
                {
                    if (node3.Check)
                    {
                        string codeNum = node3.Title;
                        result.Add(codeNum);
                    }
                    //foreach (UTreeNodeData node4 in node3.Children)
                    //{
                    //    if (node4.Check)
                    //    {
                    //        string codeNum = node4.Title;
                    //        resultsList.Add(codeNum, new List<string>());
                    //        resultsList[codeNum].AddRange(_elementList[codeNum]);
                    //    }
                    //}
                }
            }
        }

        Debug.Log(_path);

        Debug.Log(level.Count);
        Debug.Log(result);
        //this.transform.gameObject.SetActive(false);

        countPanel.gameObject.SetActive(true);
        SelectFloorNum(level, result);
        TableControl tControl = countPanel.GetComponent <TableControl>();

        tControl.Load(tableList);
        // tControl.test(level, resultsList, _path);
        //触发事件
        //CallBack(resultsList);
    }