Exemple #1
0
        //============================================================
        // <T>添加任务对象<T>
        //
        // @param camera 相机
        //============================================================
        public void TaskExport(FDrCamera camera)
        {
            FRsExportTask task = new FRsExportTask();

            task.Exporter = camera;
            task.Label    = "Camera";
            RMoCore.TaskConsole.Push(task);
        }
Exemple #2
0
        //============================================================
        // <T>扫描所有节点。</T>
        //
        // @param folder 文件夹
        // @param path 路径
        //============================================================
        protected void ScanNodes(FDrFolder folder, string path)
        {
            string fileTag = string.Empty;

            // 文件夹排序
            folder.Folders.Sort();
            // 循环取得每个文件
            foreach (FDrFolder subfloder in folder.Folders)
            {
                // 获得经过处理的名称
                string[] items = subfloder.Name.Split('-');
                if (items.Length >= 3)
                {
                    string type    = items[0];
                    string dotPath = path + "\\" + items[1];
                    if ("fd" == type)
                    {
                        subfloder.Type  = "folder";
                        subfloder.Label = items[1] + " [" + items[2] + "]";
                    }
                    else if ("tp" == type)
                    {
                        subfloder.Type = "camera";
                        FDrCamera camera = new FDrCamera();
                        subfloder.Label  = items[1] + " [" + items[2] + "]";
                        camera.Name      = dotPath;
                        camera.Label     = items[2];
                        camera.Directory = subfloder.Directory;
                        camera.Scan();
                        subfloder.Tag = camera;
                        // 存储对照表
                        _cameras.Set(camera.Code, camera);
                        _folders.Push(subfloder);
                    }
                    ScanNodes(subfloder, dotPath);
                }
            }
        }