コード例 #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);
        }