Exemplo n.º 1
0
 public static List <TagImg> MainSlider()
 {
     return(MethodBase.GetCurrentMethod().Cache(() => {
         var gallaryFolder = Urls.MainSys("MainPageSlider/");
         var files = Directory.GetFiles(gallaryFolder, "*.jpg").OrderBy(x => x);
         return files.Select(x => Main("MainPageSlider/" + Path.GetFileName(x)))
         .ToList();
     }));
 }
Exemplo n.º 2
0
        public static TagImg Main(string name)
        {
            var size = Urls.GetSize(Urls.MainSys(name));
            var tag  = new TagImg().Src(Urls.Main(name)).Alt("");

            if (size.HasValue)
            {
                tag.Size(size.Value.Width, size.Value.Height);
            }
            return(tag);
        }