private static char chSpace = '\t'; ///对接excel格式 /// <summary> /// 解析配置文本 /// </summary> /// <param name="content"></param> /// <returns></returns> public static TableStore Parse(string content) { TableStore store = new TableStore(); string[] strLines = content.Split(strSplit); int iLength = strLines.Length; #if DEV int iHeaderLength = 0; #endif if (iLength > 2) { string[] strLine = strLines[0].Split(chSpace); #if DEV iHeaderLength = strLine.Length; #endif store.SetHeader(strLine); strLine = strLines[1].Split(chSpace); #if DEV if (iHeaderLength != strLine.Length) { //出错类型 LogSystem.LogWarning(strLines[1]); } #endif store.SetDesc(strLine); for (int i = 2; i < iLength; i++) { strLine = strLines[i].Split(chSpace); #if DEV if (iHeaderLength != strLine.Length) { //出错行 LogSystem.LogWarning(strLines[i]); } #endif store.SetContent(strLine); } } else { LogSystem.LogWarning("Config Parse Error"); } return(store); }