Пример #1
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);

                ps = tableItems [indexPath.Row];
                var image = controller.productImages [indexPath.Row];

                // if there are no cells to reuse, create a new one

                if (cell == null)
                {
                    cell = new MyCustomCell(UITableViewCellStyle.Subtitle, cellIdentifier);

                    cell.TextLabel.Font            = UIFont.SystemFontOfSize(15);
                    cell.TextLabel.Lines           = 2;
                    cell.DetailTextLabel.Font      = UIFont.SystemFontOfSize(12);
                    cell.DetailTextLabel.TextColor = UIColor.Gray;
                    cell.DetailTextLabel.Lines     = 5;

                    cell.AccessoryView = getButton(indexPath.Row);
                }

                botones.ElementAt(indexPath.Row).Tag = indexPath.Row;
                cell.Tag                  = indexPath.Row;
                cell.TextLabel.Text       = ps.nombre;
                cell.DetailTextLabel.Text = ps.descripcion;
                if (image.productImage == null)
                {
                    image.productImage = PlaceholderImage;
                    BeginDownloadingImage(image, indexPath, ps.imagen);
                }
                cell.ImageView.Image = image.productImage;

                return(cell);
            }
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);

                ps = tableItems [indexPath.Row];
                var image = controller.productImages [indexPath.Row];

                // if there are no cells to reuse, create a new one
                if (cell == null)
                {
                    cell = new MyCustomCell(UITableViewCellStyle.Value1, cellIdentifier);

                    cell.TextLabel.Font                = UIFont.SystemFontOfSize(15);
                    cell.TextLabel.Lines               = 2;
                    cell.DetailTextLabel.Font          = UIFont.SystemFontOfSize(20);
                    cell.DetailTextLabel.TextColor     = UIColor.Red;
                    cell.DetailTextLabel.Lines         = 2;
                    cell.DetailTextLabel.TextAlignment = UITextAlignment.Left;
                }
                cell.AccessoryView  = getDistanceView(indexPath.Row);
                cell.TextLabel.Text = ps.tienda_nombre;
                double precio = Double.Parse(ps.precio);

                cell.DetailTextLabel.Text = precio.ToString("C2") + " ";
                cell.Tag = indexPath.Row;
                if (image.storeImage == null)
                {
                    image.storeImage = PlaceholderImage;
                    BeginDownloadingImage(image, indexPath, ps.tienda_imagen);
                }
                cell.ImageView.Image = image.storeImage;

                return(cell);
            }
Пример #3
0
            public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
            {
                UITableViewCell cell  = tableView.DequeueReusableCell(cellIdentifier);
                var             image = controller.productImages [indexPath.Row];

                // if there are no cells to reuse, create a new one
                if (cell == null)
                {
                    cell = new MyCustomCell(UITableViewCellStyle.Value1, cellIdentifier);
                    cell.TextLabel.Font            = UIFont.SystemFontOfSize(25);
                    cell.TextLabel.TextColor       = UIColor.FromRGB(7, 129, 181);
                    cell.DetailTextLabel.Font      = UIFont.SystemFontOfSize(24);
                    cell.DetailTextLabel.Lines     = 2;
                    cell.DetailTextLabel.TextColor = UIColor.Red;
                }

                cell.Tag            = indexPath.Row;
                cell.TextLabel.Text = tableItems[indexPath.Row].nombre;
                Double precio = Double.Parse(tableItems[indexPath.Row].precio);

                cell.DetailTextLabel.Text = precio.ToString("C2");

                if (image.productImage == null)
                {
                    image.productImage = PlaceholderImage;
                    BeginDownloadingImage(image, indexPath, tableItems[indexPath.Row].imagen);
                }
                cell.ImageView.Image = image.productImage;

                return(cell);
            }
Пример #4
0
			public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
			{
				UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
				var image = controller.storeImages [indexPath.Row];

				// if there are no cells to reuse, create a new one
				if (cell == null) {
					cell = new MyCustomCell (UITableViewCellStyle.Value1, cellIdentifier);
					cell.TextLabel.Lines = 2;
					cell.TextLabel.Font = UIFont.SystemFontOfSize(14);
					cell.TextLabel.TextColor = UIColor.FromRGB (7, 129, 181);
					cell.DetailTextLabel.Font = UIFont.SystemFontOfSize(24);
					cell.DetailTextLabel.TextColor = UIColor.Red;
				}

				cell.Tag = indexPath.Row;
				cell.TextLabel.Text = tableItems [indexPath.Row].nombre + "\n" + "(" + tableItems [indexPath.Row].count+ ")";
				cell.DetailTextLabel.Text = "$"+ tableItems[indexPath.Row].precio;
				if (image.storeImage == null) {
					image.storeImage = PlaceholderImage;
					BeginDownloadingImage (image, indexPath, tableItems [indexPath.Row].imagen);
				}
				cell.ImageView.Image = image.storeImage;

				return cell;
			}
Пример #5
0
			public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
			{
				UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
				var image = controller.productImages [indexPath.Row];
				// if there are no cells to reuse, create a new one
				if (cell == null) {
					cell = new MyCustomCell (UITableViewCellStyle.Subtitle, cellIdentifier);

					cell.TextLabel.Font = UIFont.SystemFontOfSize (15);
					cell.DetailTextLabel.Lines = 2;
					cell.TextLabel.TextColor = UIColor.FromRGB (7, 129, 181);
					cell.DetailTextLabel.Font = UIFont.SystemFontOfSize (12);
					cell.DetailTextLabel.TextColor = UIColor.Gray;
					cell.DetailTextLabel.Lines = 2;
					cell.AccessoryView = getButton (indexPath.Row);
				}
				botones.ElementAt (indexPath.Row).Tag = indexPath.Row;
				cell.TextLabel.Text = tableItems [indexPath.Row].nombre;
				cell.DetailTextLabel.Text = "\n" + tableItems [indexPath.Row].cantidad + " pza(s) ";
				cell.Tag = indexPath.Row;
				if (image.productImage == null) {
					image.productImage = PlaceholderImage;
					BeginDownloadingImage (image, indexPath, tableItems[indexPath.Row].imagen);
				}
				cell.ImageView.Image =image.productImage;
				return cell;
			}
			public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
			{
				UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier);
				ps = tableItems [indexPath.Row];
				var image = controller.productImages [indexPath.Row];
				// if there are no cells to reuse, create a new one
				if (cell == null) {
					cell = new MyCustomCell (UITableViewCellStyle.Value1, cellIdentifier);

					cell.TextLabel.Font = UIFont.SystemFontOfSize (15);
					cell.TextLabel.Lines = 2;
					cell.DetailTextLabel.Font = UIFont.SystemFontOfSize (20);
					cell.DetailTextLabel.TextColor = UIColor.Red;
					cell.DetailTextLabel.Lines = 2;
					cell.DetailTextLabel.TextAlignment = UITextAlignment.Left;
				}
				cell.AccessoryView = getDistanceView (indexPath.Row);
				cell.TextLabel.Text = ps.tienda_nombre;
				double precio = Double.Parse (ps.precio);
				cell.DetailTextLabel.Text = precio.ToString ("C2") + " ";
				cell.Tag = indexPath.Row;
				if (image.storeImage == null) {
					image.storeImage = PlaceholderImage;
					BeginDownloadingImage (image, indexPath, ps.tienda_imagen);
				}
				cell.ImageView.Image = image.storeImage;

				return cell;
			}