コード例 #1
0
ファイル: PhotoParser.cs プロジェクト: jonneale/Egg
 /// <summary>
 /// Uses DOM parsing to constitute a Photo data object given the xml returned from facebook
 /// </summary>
 internal static Photo ParsePhoto(XmlNode node)
 {
     Photo photo = new Photo();
     if (node != null)
     {
         photo.PhotoId = XmlHelper.GetNodeText(node, "pid");
         photo.AlbumId = XmlHelper.GetNodeText(node, "aid");
         photo.AlbumId = XmlHelper.GetNodeText(node, "aid");
         photo.OwnerUserId = XmlHelper.GetNodeText(node, "owner");
         if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "src")))
         {
             photo.PictureUrl = new Uri(XmlHelper.GetNodeText(node, "src"));
         }
         if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "link")))
         {
             photo.Link = new Uri(XmlHelper.GetNodeText(node, "link"));
         }
         photo.Caption = XmlHelper.GetNodeText(node, "caption");
         if (!String.IsNullOrEmpty(XmlHelper.GetNodeText(node, "created")))
         {
             photo.CreateDate = DateHelper.ConvertDoubleToDate(double.Parse(XmlHelper.GetNodeText(node, "created"), CultureInfo.InvariantCulture));
         }
     }
     return photo;
 }
コード例 #2
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            if (listBoxPictures.SelectedItem != null)
            {
                m_ChoosenPhoto = listBoxPictures.SelectedItem as Photo;
            }

            this.DialogResult = DialogResult.OK;
        }
コード例 #3
0
ファイル: FacebookAlbum.cs プロジェクト: mvladk/dp2012
 public void displaySelectedPhotoTags(Photo i_Photo)
 {
     foreach (PhotoTag tagg in i_Photo.Tags)
     {
         if (null != tagg.User.Name && !this.AlbumsTaggetUsers.Items.Contains(tagg.User.Name))
         {
             this.AlbumsTaggetUsers.Items.Add(tagg.User.Name);
         }
     }
 }
コード例 #4
0
 internal void ResetEventSelectedPhoto()
 {
     m_EventSelectedPhoto = null;
 }