Exemple #1
0
        void _UpdateCfg2UI()
        {
            tvDevs.Nodes[0].Nodes.Clear();
            JFDevCellNameManeger mgr = JFHubCenter.Instance.MDCellNameMgr;

            string[] devIDs = mgr.AllMotionDaqDevices();
            if (null != devIDs)
            {
                foreach (string devID in devIDs)
                {
                    _AddDevNode(devID, DevNodeCategory.MotionDaqDev);
                }
            }

            string[] lightDevIDs = mgr.AllLightCtrlDevs();
            if (null != lightDevIDs)
            {
                foreach (string lightDevID in lightDevIDs)
                {
                    _AddDevNode(lightDevID, DevNodeCategory.LightCtrlTDev);
                }
            }


            string[] trigDevIDs = mgr.AllTrigCtrlDevs(); //触发控制器
            if (null != trigDevIDs)
            {
                foreach (string trigDevID in trigDevIDs)
                {
                    if (!typeof(IJFDevice_LightController).IsAssignableFrom(JFHubCenter.Instance.InitorManager.GetInitor(trigDevID).GetType())) //去除光源控制器设备
                    {
                        _AddDevNode(trigDevID, DevNodeCategory.TrigCtrlDev);
                    }
                }
            }
        }