Пример #1
0
        public override UICollectionViewCell GetCell(UICollectionView collectionView, NSIndexPath indexPath)
        {
            var cell = (UserCell)collectionView.DequeueReusableCell(UserCell.CellID, indexPath);

            ImageCell row = Cells[indexPath.Row];

            if (row.ImgOBJ.Independent)
            {
                cell.ImageView.Alpha   = 1.0f;
                cell.Layer.BorderColor = UIColor.Green.CGColor;
                cell.Layer.BorderWidth = 5.0f;
            }
            else if (row.ImgOBJ.Prompted)
            {
                cell.ImageView.Alpha   = 1.0f;
                cell.Layer.BorderColor = UIColor.Yellow.CGColor;
                cell.Layer.BorderWidth = 5.0f;
            }
            else if (row.ImgOBJ.Missed)
            {
                cell.ImageView.Alpha   = 1.0f;
                cell.Layer.BorderColor = UIColor.Red.CGColor;
                cell.Layer.BorderWidth = 5.0f;
            }

            cell.UpdateRow(row, ImageViewSize);

            return(cell);
        }
Пример #2
0
        public void UpdateRow(ImageCell element, SizeF imageViewSize)
        {
            var Resultfilename = new DatabaseContext <Image>().GetQuery("SELECT * FROM Image WHERE ID = ?", element.ImgOBJ.SessionImageID.ToString());

            ImageView.Image = Utilities.GetUIImageFromFileNameThumbnail(Resultfilename[0].FileName.ToString());
            ImageView.Layer.CornerRadius = 20f;
            ImageView.Frame = new RectangleF(0, 0, imageViewSize.Width, imageViewSize.Height);
        }