예제 #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
 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);
         }
     }
 }
 internal void ResetEventSelectedPhoto()
 {
     m_EventSelectedPhoto = null;
 }