public void Load() { CVSReader reader = new CVSReader(); reader.LoadText("Data/Config/Constant_constant.txt", 1); int rows = reader.GetRowCount(); for (int r = 0; r < rows; ++r) { string[] row = reader.GetRow(r); ConstantConstantConfig ac = ConfigProcess(row) as ConstantConstantConfig; configs.Add(ac.constantid, ac); } }
public object ConfigProcess(string[] row) { if (row.Length < 2) { return(null); } RowHelper rh = new RowHelper(row); ConstantConstantConfig rec = new ConstantConstantConfig(); rec.constantid = Utility.ToInt(rh.Read()); //配置id rec.constantdata = Utility.ToInt(rh.Read()); //数据 return(rec); }