private void __loadGallery(string gallery) { string flickrKey = "a0232444363301974055795c8f8f2457"; string sharedSecret = "ae24c71aacfb57c9"; //string tag = "lol"; PhotoSearchOptions options = new PhotoSearchOptions(); options.PerPage = 12; options.Page = 1; //options.SortOrder = PhotoSearchSortOrder.DatePostedDescending; //options.MediaType = MediaType.Photos; //options.Extras = PhotoSearchExtras.All; //options.ga ////options.Tags = tag; options.Username = "******"; Flickr.CacheDisabled = true; Flickr flickr = new Flickr(flickrKey, sharedSecret); PhotosetPhotoCollection photos = flickr.PhotosetsGetPhotos(gallery, PhotoSearchExtras.All); // PhotoCollection photos = flickr.PhotosSearch(options); ThumbnailsList.DataSource = photos; ThumbnailsList.DataBind(); }
protected void GetPhotos(string tag) { PhotoSearchOptions options = new PhotoSearchOptions(); options.Page = 1; options.PerPage = 1000; options.SortOrder = PhotoSearchSortOrder.DatePostedDescending; options.MediaType = MediaType.Photos; options.Extras = PhotoSearchExtras.All; options.Tags = tag; string url; Flickr flickr = new Flickr(ConfigurationManager.AppSettings["apiKey"], ConfigurationManager.AppSettings["shardSecret"]); FlickrNet.Cache.CacheDisabled = true; PhotoCollection photos = flickr.PhotosSearch(options); foreach (Photo ph in photos) { url = ph.MediumUrl; } ThumbnailsList.DataSource = photos; ThumbnailsList.DataBind(); }
// Use this for initialization void Start() { globalVars = GlobalVars.Instance; dgSerializer = DelayGramSerializer.Instance; thumbnailsList = GetComponent <ThumbnailsList>(); oldFollowerCount = dgSerializer.Followers; dgSerializer.RegisterFollowersListener(this); messagesSerializer = MessagesSerializer.Instance; // oldFollowerCount = globalVars. }
// Use this for initialization void Start() { messagesController = GetComponent <MessagesController>(); thumbnailsList = GetComponent <ThumbnailsList>(); activeConversations = new List <Conversation>(); createdStubs = new List <GameObject>(); stubStartingX = -0.8f; stubStartingY = -0.7f; }
private void GetPhotos(string tag) { PhotoSearchOptions options = new PhotoSearchOptions(); options.PerPage = 12; options.Page = 1; options.SortOrder = PhotoSearchSortOrder.DatePostedDescending; options.MediaType = MediaType.Photos; options.Extras = PhotoSearchExtras.All; options.Tags = tag; Flickr flickr = new Flickr(flickrKey, sharedSecret); PhotoCollection photos = flickr.PhotosSearch(options); ThumbnailsList.DataSource = photos; ThumbnailsList.DataBind(); }
private void GetPhotos(string tag) { // get the images for the location specified PhotoSearchOptions options = new PhotoSearchOptions(); options.PerPage = 30; options.Page = 30; options.SortOrder = PhotoSearchSortOrder.Relevance; options.MediaType = MediaType.Photos; options.Extras = PhotoSearchExtras.All; options.Text = query; options.Tags = tag; Flickr flickr = new Flickr(flickrKey, sharedSecret); PhotoCollection photos = flickr.PhotosSearch(options); ThumbnailsList.DataSource = photos; ThumbnailsList.DataBind(); }
public string SearchImage() { //SQL database Connection String string constr = ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString(); try { using (SqlConnection con = new SqlConnection(constr)) { con.Open(); location = SearchTextBox.Text; //SqlCommand com = con.CreateCommand(); //com.CommandType = CommandType.Text; //com.CommandText = "SELECT ImageData FROM tblImageDetail WHERE ImageLocation =" + location; SqlCommand com = new SqlCommand("usp_GetImageById", con); com.CommandType = CommandType.StoredProcedure; com.Parameters.AddWithValue("@ImageLocation", location); DataTable dt = new DataTable(); SqlDataAdapter da = new SqlDataAdapter(com); da.Fill(dt); ThumbnailsList.DataSource = dt; ThumbnailsList.DataBind(); con.Close(); return(lblErrors.Text = "Uploaded Image"); } } catch (SqlException ex) { // display error fot duplicate images string str; str = "Source:" + ex.Source; str += "\n" + "Message:" + ex.Message; lblErrors.Text = str + "Database Exception"; return(lblErrors.Text = str + "Database Exception"); } }