示例#1
0
文件: ImagesCell.cs 项目: 21Off/21Off
			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;
			}
示例#2
0
		public Images2Element (List<ImageInfo> images, int rowIndex)
			: base (null)
		{
			_images = images;
			cellIndex = rowIndex;
			
			imgCellInfo = new ImagesCellInfo()
			{
				Images = _images,
				RowIndex = cellIndex,
			};
		}
示例#3
0
文件: ImagesCell.cs 项目: 21Off/21Off
		// 
		// 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 ();
		}
示例#4
0
文件: ImagesCell.cs 项目: 21Off/21Off
		// 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);
		}
示例#5
0
文件: ImagesCell.cs 项目: 21Off/21Off
			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);
				}
			}