public void Update(Package package) { Id = package.Id; nameLabel.Text = package.Name.ToUpper(); statusLabel.Text = package.GetStatusText(); ButtonInfo info = package.GetButtonInfo(); nameLabel.LayoutParameters = GetTextParams(padding, 1); if (info.Type == PMButtonType.UpdatePackages) { statusLabel.LayoutParameters = new LinearLayout.LayoutParams(0, 0, 0); } else { statusLabel.LayoutParameters = GetTextParams(padding, 1); } Button.Update(info); }
public void Update(Package package) { // Local variable because it's used in Layoutsubviews this.package = package; nameLabel.Text = package.Name; statusLabel.Text = package.GetStatusText(); ButtonInfo info = package.GetButtonInfo(); Button.Text = info.Text; Button.Type = info.Type; Button.PriorityIndex = info.PriorityIndex; Button.PackageName = info.PackageName; Button.PackageId = info.PackageId; if (Button.Type == PMButtonType.UpdatePackages) { Button.Font = UIFont.FromName("HelveticaNeue-Bold", 14); } else { Button.Font = UIFont.FromName("HelveticaNeue-Light", 12); } }