Exemplo n.º 1
0
        public static string GetThumbPath(string path, ThumbSize size, string extension = null)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }
            FileInfo inf = new FileInfo(path);

            return(size.ToString().ToLower() + "\\" + inf.Name.GetBeforeLast(".") + (extension ?? inf.Extension));
        }
Exemplo n.º 2
0
        public static string GetThumbUrl(string path, ThumbSize size, string extension = null)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }
            FileInfo inf  = new FileInfo(path);
            string   name = inf.Name.GetBeforeLast(".") + (extension ?? inf.Extension);
            string   url  = inf.Directory.FullName.Replace(Shell.AppRootPath + "\\", "");

            url = url.Replace(Shell.PublicRoot + "\\", "");
            return(Utils.CombineUrl(url, size.ToString().ToLower(), name));
        }
Exemplo n.º 3
0
 public string GetThumbSize()
 {
     return(ThumbSize.ToString().ToLower());
 }