Пример #1
0
        /// <summary>
        /// Format: [0+2N]id [1+2N]name
        /// </summary>
        /// <returns></returns>
        public static List <string> GetMapTemplateNameList()
        {
            List <string> mapTemplateNameList = new List <string>();

            ForEachTemplateDirectory(fullName =>
            {
                var id   = System.IO.Path.GetFileName(fullName);
                var json = XYFile.LoadJson <JsonMapTemplate>(fullName + @"\" + configFileName);
                mapTemplateNameList.AddRange(new[] { id, json.name });
                return(false);
            });
            return(mapTemplateNameList);
        }
Пример #2
0
        public static JsonMapTemplate GetMapTemplateData(string name)
        {
            var path = XYPath.Dir.SourceTemplate + $@"\{name}\{configFileName}";

            return(XYFile.LoadJson <JsonMapTemplate>(path));
        }