public SettingsAllowCallsModel(string allowCallsTitle, string allowCallsDescription, XPCommand <bool> allowCalls, bool isActive) { AllowCallsTitle = allowCallsTitle; AllowCallsDescription = allowCallsDescription; AllowCalls = allowCalls; IsActive = isActive; }
public OrganizationInfoModel(string name, string picture, string section, XPCommand openOrganizationCommand) { Section = section; Name = name; Picture = picture; OpenOrganizationCommand = openOrganizationCommand; }
public void Configure(OrganizationInfoModel organizationInfoModel) { _organizationEvent = organizationInfoModel.OpenOrganizationCommand; _imageView.Image?.Dispose(); ImageService.Instance.LoadStream((token) => { return(ImageHelper.GetStreamFromImageByte(token, organizationInfoModel.Picture)); }).ErrorPlaceholder("organization_noimage", ImageSource.CompiledResource).Transform(new CircleTransformation()).Into(_imageView); UILabelExtensions.SetupLabelAppearance(_sectionLabel, organizationInfoModel.Section, Colors.ProfileGray, 12f); UILabelExtensions.SetupLabelAppearance(_label, organizationInfoModel.Name, Colors.ProfileGrayDarker, 14f, UIFontWeight.Medium); _button.TouchUpInside -= OnButton_TouchUpInside; _button.TouchUpInside += OnButton_TouchUpInside; }
public void Configure(SettingsPhoneModel phone) { if (phone == null) { return; } _changeNumberCommand = phone.ChangeNumber; UILabelExtensions.SetupLabelAppearance(_label, phone.PhoneDescription, Colors.Black, 15f); UITextFieldExtensions.SetupTextFieldAppearance(_textField, Colors.GrayIndicator, 14f, "#", Colors.GrayIndicator, Colors.GrayIndicator, Colors.White.ColorWithAlpha(0f)); _textField.Text = phone.PhoneNumber; _textField.ShouldChangeCharacters = OnDescriptionField_ShouldChangeCharacters; UITextFieldExtensions.AddDoneButtonToNumericKeyboard(_textField); _textField.KeyboardType = UIKeyboardType.PhonePad; _textField.EditingDidEnd -= OnTextField_EditingDidEnd; _textField.EditingDidEnd += OnTextField_EditingDidEnd; }
public SettingsPhoneModel(string phoneDescription, string phoneNumber, XPCommand <string> changeNumber) { PhoneDescription = phoneDescription; PhoneNumber = phoneNumber; ChangeNumber = changeNumber; }