Ejemplo n.º 1
0
        public static ObservableCollection <ObservableCollection <AttrModel> > ProcessAttr()
        {
            string attrDicPath    = @"Data\AttributeDictionary.csv";
            string deValueDicPath = @"Data\DefaultDictionary.csv";

            string[] attrDicData    = File.ReadAllLines(attrDicPath);
            string[] deValueDicData = File.ReadAllLines(deValueDicPath);
            // Every dic's line should be a collection,and should have a bundle to contain these collections.So here I used doulbe layers of collection.
            ObservableCollection <ObservableCollection <AttrModel> > attributes = new ObservableCollection <ObservableCollection <AttrModel> >();

            DataProcessMethod.InitializeDicForAttr(attrDicData, attributes);
            DataProcessMethod.ReadDataAndSetForAttr(attrDicData, deValueDicData, attributes);
            return(attributes);
        }
Ejemplo n.º 2
0
        public static ObservableCollection <DicModel> ProcessDic()
        {
            string fNameDicPath = @"Data\FileNameDictionary.csv";
            string idDicPath    = @"Data\IdDictionary.csv";

            string[] fNameDicData = File.ReadAllLines(fNameDicPath);
            string[] idDicData    = File.ReadAllLines(idDicPath);
            ObservableCollection <DicModel> dics = new ObservableCollection <DicModel>();

            DataProcessMethod.InitializeDicForDic(idDicData, dics);
            DataProcessMethod.ReadDataAndSetForDic(idDicData, fNameDicData, dics);
            DataProcessMethod.CombineString(dics);
            return(dics);
        }