public static void LoadAllConfig(Action completeFunc) { reader("newbie_guide_define.csv", (content) => { var lines = ReadTextToLines(content); NewbieGuideDefine.LoadFromLines(lines); if (completeFunc != null) { completeFunc(); } }); }
public static void LoadFromLines(List <string> lines) { var list = new NewbieGuideDefine[lines.Count]; for (int i = 0; i < lines.Count; i++) { string line = lines[i]; var row = line.Split(','); var obj = new NewbieGuideDefine(); obj.ParseFromRow(row); list[i] = obj; } Data = list; }