Example #1
0
        public static My_List StructFiles(string[] splitStr, My_List textList, My_List imageList, My_List movieList, My_List size)
        {
            for (int i = 0; i < splitStr.Length; i++)
            {
                string[] fileName = splitStr[i].Split(':');
                string   typeFile = fileName[0].Trim();
                switch (typeFile)
                {
                case "Text":
                    TextFile textFiles = new TextFile();
                    textFiles.SplitStr(fileName[1], ref size);
                    textList.Add(textFiles);
                    break;

                case "Image":
                    Image images = new Image();
                    images.SplitStr(fileName[1]);
                    imageList.Add(images);
                    break;

                case "Movie":
                    Movie movies = new Movie();
                    movies.SplitStr(fileName[1]);
                    movieList.Add(movies);
                    break;
                }
            }
            return(size);
        }
Example #2
0
 public My_List SplitStr(string textStr, ref My_List size)
 {
     string[] nameSizeContent = textStr.Split(';');
     base.SplitStr(nameSizeContent[0]);
     Extension = nameSizeContent[0].Split('.')[1].Split('(')[0];
     Content   = nameSizeContent[1];
     size.Add(Size);
     return(size);
 }