void ReleaseDesignerOutlets() { if (PrimaryButton != null) { PrimaryButton.Dispose(); PrimaryButton = null; } if (SubtitleLabel != null) { SubtitleLabel.Dispose(); SubtitleLabel = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } if (TitleImageView != null) { TitleImageView.Dispose(); TitleImageView = null; } }
public static string Generate() { var button1 = new XSmallButton("x-Small"); var button2 = new SmallButton("Small"); var button3 = new PrimaryButton("Regular"); var button4 = new LargeButton("Large"); return(button1.ToHtml() + " " + button2.ToHtml() + button3.ToHtml() + button4.ToHtml()); }
private Block InventoryHeader() { var inventoryButton = new PrimaryButton(DougMessages.Inventory, "inventory", Actions.InventorySwitch.ToString()); var equipmentButton = new Button(DougMessages.Equipment, "equipment", Actions.EquipmentSwitch.ToString()); return(new ActionList(new List <Accessory> { inventoryButton, equipmentButton })); }
private void InitBindings() { ViewModel.PropertyChanged += (object sender, PropertyChangedEventArgs e) => { if (e.PropertyName.Equals("PrimaryButtonText")) { PrimaryButton.SetTitle(ViewModel.PrimaryButtonText, UIControlState.Normal); } else if (e.PropertyName.Equals("ShowSubtitle")) { UIView.Animate(0.5, () => { SubtitleLabel.Alpha = ViewModel.ShowSubtitle ? 1 : 0; }); } else if (e.PropertyName.Equals("Title")) { if (ViewModel.ShowTitleLogo) { UIView.Animate( duration: 0.5f, animation: () => { TitleLabel.Alpha = 0; TitleImageView.Alpha = 1; }); } else { UIView.Animate( duration: 0.5f, animation: () => { TitleLabel.Alpha = 1; TitleImageView.Alpha = 0; }); } TitleLabel.Text = ViewModel.Title; TitleImageView.Hidden = !ViewModel.ShowTitleLogo; } }; PrimaryButton.SetCommand("TouchUpInside", ViewModel.PrimaryCommand); }
public override int GetHashCode() { int hash = 1; if (HasVendor) { hash ^= Vendor.GetHashCode(); } if (HasModel) { hash ^= Model.GetHashCode(); } if (HasScreenToLensDistance) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ScreenToLensDistance); } if (HasInterLensDistance) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(InterLensDistance); } hash ^= leftEyeFieldOfViewAngles_.GetHashCode(); if (HasVerticalAlignment) { hash ^= VerticalAlignment.GetHashCode(); } if (HasTrayToLensDistance) { hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(TrayToLensDistance); } hash ^= distortionCoefficients_.GetHashCode(); if (HasPrimaryButton) { hash ^= PrimaryButton.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }