private List <Photo> GetPhotos() { FlickrContext fc = new FlickrContext(); var photoStream = (from p in fc.Photos where p.User == FlickrPhotoStreamSetting.Trim() && p.ViewMode == ViewMode.Public && p.PhotoSize == PhotoSize.Square && p.Extras == (ExtrasOption.Media) select p).Take(int.Parse(PhotoCountSetting)); return(photoStream.ToList()); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { smpScripts.Scripts.Add(new ScriptReference(string.Format("~/{0}", BasePage.JQUERY_INCLUDE))); smpScripts.Scripts.Add(new ScriptReference("~/Templates/Cccev/liger/js/jquery.galleryScroll.1.4.5.pack.js")); smpScripts.Scripts.Add(new ScriptReference("~/Templates/Cccev/liger/js/main.js")); } if (FlickrPhotoStreamSetting.Trim() != string.Empty) { photos = GetPhotos(); BuildAlbum(); } }