Beispiel #1
0
        public static List <DevComponents.AdvTree.Node> ToFaceTree(List <Maticsoft.Model.SMT_FACERECG_DEVICE> faceDevices, List <Maticsoft.Model.SMT_CONTROLLER_ZONE> areas)
        {
            var nodes    = AreaDataHelper.ToTree(areas);
            var faceDevs = faceDevices.ToList();

            foreach (var item in nodes)
            {
                DoCreateAreaDevice(item, faceDevs);
            }

            for (int i = faceDevs.Count - 1; i >= 0; i--)
            {
                var item = faceDevs[i];
                DevComponents.AdvTree.Node devNode = new DevComponents.AdvTree.Node("<font color='blue'>" + item.FACEDEV_NAME + "</font>");
                devNode.Image = Properties.Resources.editor;
                devNode.Tag   = item;
                nodes.Insert(0, devNode);
            }
            DevComponents.AdvTree.Node root = new DevComponents.AdvTree.Node("所有人脸识别设备");
            root.Image = Properties.Resources.house1818;
            root.Nodes.AddRange(nodes.ToArray());
            nodes.Clear();
            nodes.Add(root);
            return(nodes);
        }
Beispiel #2
0
        public static List <Node> ToTree(List <Maticsoft.Model.SMT_CONTROLLER_ZONE> areas, List <Maticsoft.Model.SMT_DOOR_INFO> doors)
        {
            var nodes = AreaDataHelper.ToTree(areas);

            CreateDoorTree(nodes, doors);
            return(nodes);
        }