Beispiel #1
0
			public ImagesCellView (ImagesCellInfo imagesCellInfo) 
				: base ()
			{
				blocks = new List<Block>();				
				buttons = new List<UIButton>();
				images = new List<UIImage>();
				
				Opaque = true;
				BackgroundColor = UIColor.FromHSBA(0, 0, 0, 0);
				
				copy = imagesCellInfo;
			}
Beispiel #2
0
		public Images2Element (List<ImageInfo> images, int rowIndex)
			: base (null)
		{
			_images = images;
			cellIndex = rowIndex;
			
			imgCellInfo = new ImagesCellInfo()
			{
				Images = _images,
				RowIndex = cellIndex,
			};
		}
Beispiel #3
0
		// 
		// This method is called when the cell is reused to reset
		// all of the cell values
		//
		public void UpdateCell (ImagesCellInfo imagesCellInfo)
		{
			tweetView.Update (imagesCellInfo);
			SetNeedsDisplay ();
		}
Beispiel #4
0
		// Create the UIViews that we will use here, layout happens in LayoutSubviews
		public ImagesCell (UITableViewCellStyle style, NSString ident, ImagesCellInfo imagesCellInfo)
			: base (style, ident)
		{
			SelectionStyle = UITableViewCellSelectionStyle.None;			
			
			tweetView = new ImagesCellView (imagesCellInfo);
			ContentView.Add (tweetView);
		}
Beispiel #5
0
			public void Update (ImagesCellInfo _imagesCellInfo)
			{
				try
				{
					if (_imagesCellInfo != this.imagesCellInfo)
					{
						this.imagesCellInfo = _imagesCellInfo;
						
						int i = 0;
						foreach (ImageInfo imgInfo in imagesCellInfo.Images)
						{
							UIImage img = null;
							
							if (imgInfo.Img != null)
								img = ImageStore.RequestFullPicture(imgInfo.Img.Id, imgInfo.Img.UserId, SizeDB.Size50, this);
							else
								continue;
							
							images[i] = img ?? ImageStore.DefaultImage;													
							buttons[i].SetBackgroundImage(images[i], UIControlState.Normal);													
							i++;
						}
					
						InvokeOnMainThread(() => SetNeedsDisplay ());
					}
				}
				catch (Exception ex)
				{
					Util.LogException("Update", ex);
				}
			}