//============================================================ public void TaskExport(FDrMap map) { FDrMapExportTask task = new FDrMapExportTask(this); task.Maps.Push(map); RMoCore.TaskConsole.Push(task); }
//============================================================ // <T>存储全部</T> //============================================================ public void SaveAll() { foreach (INamePair <FDrMap> pair in _mapDictionary) { FDrMap map = pair.Value; map.Open(); map.Store(); } }
//============================================================ // <T>导出全部</T> //============================================================ public void ExportAll() { foreach (INamePair <FDrMap> pair in _mapDictionary) { FDrMap map = pair.Value; map.Open(); map.Export(); } }
//============================================================ public override void OnProcess() { int count = _maps.Count; for (int n = 0; n < count; n++) { _current = n; _map = _maps[n]; _map.Open(); _console.OnTaskProcessing(this); _map.Export(); _map.Close(); } }
//============================================================ // <T>加载。</T> //============================================================ private void ScanNodes(FCfgFolder folder, string path) { string fileTag = string.Empty; // 文件夹排序 folder.Folders.Sort(); // 循环取得每个文件 foreach (FCfgFolder subfloder in folder.Folders) { // 获得经过处理的名称 string[] items = subfloder.Name.Split('-'); if (items.Length >= 3) { string type = items[0]; string dotPath = RString.IsEmpty(path) ? items[1] : path + "." + items[1]; if ("fd" == type) { subfloder.Type = "folder"; subfloder.Label = items[1] + " [" + items[2] + "]"; } else if ("mp" == type) { subfloder.Type = "map"; FDrMap map = new FDrMap(); subfloder.Label = items[1] + " [" + items[2] + "]"; map.Name = dotPath; map.Label = items[2]; map.Path = subfloder.Directory; map.ExprotPath = _exportDirectory; subfloder.Tag = map; // 存储对照表 _mapDictionary.Set(dotPath, map); subfloder.Folders.Clear(); } ScanNodes(subfloder, dotPath); } } }
//============================================================ public override void OnBegin() { _map = _maps[0]; _console.OnTaskBegin(this); }