Пример #1
0
        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);
        }