protected void Page_Load(object sender, EventArgs e) { // load settings Settings = ExtensionManager.GetSettings("AudioStream"); if (!Page.IsPostBack) { TxbHighStream.Text = Settings.GetSingleValue("HighStream"); TxbLowStream.Text = Settings.GetSingleValue("LowStream"); BindForm(); } }
protected void Page_Load(object sender, EventArgs e) { // load settings Settings = ExtensionManager.GetSettings("Bovenhoek"); if (!Page.IsPostBack) { TxtUrl.Text = Settings.GetSingleValue("PeelUrl"); TxtImageUrl.Text = Settings.GetSingleValue("PeelImage"); TxtTarget.Text = Settings.GetSingleValue("PeelTarget"); BindForm(); } }
public static List<PicasaAlbum> GetAlbums() { Settings = ExtensionManager.GetSettings("Picasa2"); if (string.IsNullOrEmpty(Settings.GetSingleValue("Account"))) return null; var service = new PicasaService("exampleCo-exampleApp-1"); string usr = Settings.GetSingleValue("Account") + "@gmail.com"; string pwd = Settings.GetSingleValue("Password"); service.setUserCredentials(usr, pwd); var query = new AlbumQuery(PicasaQuery.CreatePicasaUri(usr)); PicasaFeed feed = service.Query(query); var albums = new List<PicasaAlbum>(); foreach (PicasaEntry entry in feed.Entries) { var ac = new AlbumAccessor(entry); // thumbnail string albumUri = ((Google.GData.Client.AtomEntry)(entry)).AlternateUri.ToString(); string firstThumbUrl = entry.Media.Thumbnails[0].Attributes["url"] as string; albums.Add(new PicasaAlbum() { Accessor = ac, ThumbNailURl = firstThumbUrl, AlbumUri = albumUri }); } return albums; }