예제 #1
0
파일: Program.cs 프로젝트: shuai8023/bamboo
        public static FileFather GetFile(string fileName, string fullPath)
        {
            string     extension = Path.GetExtension(fileName);
            FileFather ff        = null;

            switch (extension)
            {
            case ".txt": ff = new TxtPath(fullPath);
                break;

            case ".jpg": ff = new JpgPath(fullPath);
                break;

            case ".wmv": ff = new WmvPath(fullPath);
                break;
            }
            return(ff);
        }
예제 #2
0
        public static FileFather GetFile(string fileName, string fullName)
        {
            FileFather ff        = null;
            string     extension = Path.GetExtension(fileName);

            switch (extension)
            {
            case ".txt": ff = new TxtPath(fullName);
                break;

            case ".jpg": ff = new JpgPath(fullName);
                break;

            case ".avi": ff = new AviPath(fullName);
                break;
            }
            return(ff);
        }