예제 #1
0
 public ThumbsItem(double width, Thickness margin, NewsPhotosInfo newsPhotosInfo)
     : base(width, margin, new Thickness())
 {
     this._newsPhotosInfo = newsPhotosInfo;
     this.DesiredHeight   = 320.0;
     this.PrepareThumbsList();
 }
예제 #2
0
        private void ReadThumbsListFromNewsPhotosInfo()
        {
            NewsPhotosInfo newsPhotosInfo = this._newsPhotosInfo;

            if ((newsPhotosInfo != null ? newsPhotosInfo.Photos : (List <Photo>)null) == null)
            {
                return;
            }
            this._thumbs.Clear();
            foreach (Photo photo in this._newsPhotosInfo.Photos)
            {
                this._thumbs.Add(ThumbsItem.ConvertPhotoToThumb(photo, (Attachment)null));
            }
        }
예제 #3
0
        private void ReadThumbsListFromNewsPhotosInfo()
        {
            NewsPhotosInfo newsPhotosInfo = this._newsPhotosInfo;

            if ((newsPhotosInfo != null ? newsPhotosInfo.Photos : null) == null)
            {
                return;
            }
            this._thumbs.Clear();
            List <Photo> .Enumerator enumerator = this._newsPhotosInfo.Photos.GetEnumerator();
            try
            {
                while (enumerator.MoveNext())
                {
                    this._thumbs.Add(ThumbsItem.ConvertPhotoToThumb(enumerator.Current, null));
                }
            }
            finally
            {
                enumerator.Dispose();
            }
        }