コード例 #1
0
        //============================================================
        // <T>添加任务集合<T>
        //
        // @param textures 任务集合
        //============================================================
        public void TaskImprotExport(FDrTemplate template)
        {
            FDrTemplateImportTask task = new FDrTemplateImportTask();

            task.Template = template;
            RMoCore.TaskConsole.Push(task);
        }
コード例 #2
0
        //============================================================
        // <T>添加任务对象<T>
        //
        // @param template 模板
        //============================================================
        public void TaskExport(FDrTemplate template)
        {
            FRsExportTask task = new FRsExportTask();

            task.Exporter = template;
            RMoCore.TaskConsole.Push(task);
        }
コード例 #3
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 = "template";
                        FDrTemplate template = new FDrTemplate();
                        subfloder.Label    = items[1] + " [" + items[2] + "]";
                        template.Name      = dotPath;
                        template.Label     = items[2];
                        template.Directory = subfloder.Directory;
                        // template.ExportPath = _exportDirectory;
                        template.Scan();
                        subfloder.Tag = template;
                        // 存储对照表
                        _templates.Set(template.Code, template);
                        _folders.Push(subfloder);
                    }
                    ScanNodes(subfloder, dotPath);
                }
            }
        }