public override void LayoutSubviews() { base.LayoutSubviews(); if (Convert.ToDouble(DataColumn.CellValue) < 0.05) { imageView.Image = Imagehelper.ToUIImage(new ImageMapStream(LoadResource("RedDown.png").ToArray())); } else { imageView.Image = Imagehelper.ToUIImage(new ImageMapStream(LoadResource("GreenUp.png").ToArray())); } this.stocktext.Frame = new CoreGraphics.CGRect(35, this.Bounds.Top, 65, this.Bounds.Height); this.imageView.Frame = new CoreGraphics.CGRect(20, 10, 17, this.Bounds.Height - 20); this.stocktext.Font = DataColumn.GridColumn.RecordFont; this.stocktext.TextAlignment = UITextAlignment.Right; this.stocktext.Text = DataColumn.CellValue.ToString(); }
public List <BankInfo> GetBankDetails(int count) { List <BankInfo> bankDetails = new List <BankInfo> (); for (int i = 1; i <= count; i++) { var ord = new BankInfo() { CustomerID = i, BranchNo = BranchNo [random.Next(15)], Current = CurrentBalance [random.Next(15)], Savings = Savings [random.Next(15)], CustomerName = Customers [random.Next(15)], BalanceScale = random.Next(1, 100), IsOpen = ((i % random.Next(1, 10) > 2) ? true : false), CustomerImage = Imagehelper.ToUIImage(new ImageMapStream(LoadResource("Image" + (i % 29) + ".png").ToArray())), }; bankDetails.Add(ord); } return(bankDetails); }