Esempio n. 1
0
    public void Load()
    {
        CVSReader reader = new CVSReader();

        reader.LoadText("Data/Config/Mall_malltype.txt", 1);
        int rows = reader.GetRowCount();

        for (int r = 0; r < rows; ++r)
        {
            string[]           row = reader.GetRow(r);
            MallMalltypeConfig ac  = ConfigProcess(row) as MallMalltypeConfig;
            configs.Add(ac.id, ac);
        }
    }
Esempio n. 2
0
    public object ConfigProcess(string[] row)
    {
        if (row.Length < 3)
        {
            return(null);
        }
        RowHelper          rh  = new RowHelper(row);
        MallMalltypeConfig rec = new MallMalltypeConfig();

        rec.id = Utility.ToInt(rh.Read());       //分类ID

        rec.res = rh.Read();                     //分类名称资源

        rec.priority = Utility.ToInt(rh.Read()); //优先级


        return(rec);
    }