Exemplo n.º 1
0
        public PicasaPictureCollection GetPictures()
        {
            string download_link = GDataApi.GetAlbumFeedById(user, id);

            if (authkey != null && authkey != "")
            {
                download_link += "&authkey=" + authkey;
            }
            string      received = conn.DownloadString(download_link);
            XmlDocument doc      = new XmlDocument();

            doc.LoadXml(received);
            XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);

            XmlUtil.AddDefaultNamespaces(nsmgr);
            XmlNode feed = doc.SelectSingleNode("atom:feed", nsmgr);
            PicasaPictureCollection coll = new PicasaPictureCollection();

            foreach (XmlNode item in feed.SelectNodes("atom:entry", nsmgr))
            {
                coll.Add(new PicasaPicture(conn, this, item, nsmgr));
            }
            coll.SetReadOnly();
            return(coll);
        }
Exemplo n.º 2
0
 public PicasaPictureCollection GetPictures()
 {
     string download_link = GDataApi.GetAlbumFeedById (user, id);
     if (authkey != null && authkey != "")
         download_link += "&authkey=" + authkey;
     string received = conn.DownloadString (download_link);
     XmlDocument doc = new XmlDocument ();
     doc.LoadXml (received);
     XmlNamespaceManager nsmgr = new XmlNamespaceManager (doc.NameTable);
     XmlUtil.AddDefaultNamespaces (nsmgr);
     XmlNode feed = doc.SelectSingleNode ("atom:feed", nsmgr);
     PicasaPictureCollection coll = new PicasaPictureCollection ();
     foreach (XmlNode item in feed.SelectNodes ("atom:entry", nsmgr)) {
         coll.Add (new PicasaPicture (conn, this, item, nsmgr));
     }
     coll.SetReadOnly ();
     return coll;
 }