示例#1
0
 public SettingsAllowCallsModel(string allowCallsTitle, string allowCallsDescription, XPCommand <bool> allowCalls, bool isActive)
 {
     AllowCallsTitle       = allowCallsTitle;
     AllowCallsDescription = allowCallsDescription;
     AllowCalls            = allowCalls;
     IsActive = isActive;
 }
示例#2
0
 public OrganizationInfoModel(string name, string picture, string section, XPCommand openOrganizationCommand)
 {
     Section = section;
     Name    = name;
     Picture = picture;
     OpenOrganizationCommand = openOrganizationCommand;
 }
示例#3
0
        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;
        }
示例#4
0
        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;
        }
示例#5
0
 public SettingsPhoneModel(string phoneDescription, string phoneNumber, XPCommand <string> changeNumber)
 {
     PhoneDescription = phoneDescription;
     PhoneNumber      = phoneNumber;
     ChangeNumber     = changeNumber;
 }