public void Configure(SettingsAllowCallsModel settings) { _settings = settings; UILabelExtensions.SetupLabelAppearance(_title, settings.AllowCallsTitle, Colors.Black, 15f); UILabelExtensions.SetupLabelAppearance(_description, settings.AllowCallsDescription, Colors.Black, 12f); _switch.On = settings.IsActive; _switch.ValueChanged -= OnSwitch_ValueChanged; _switch.ValueChanged += OnSwitch_ValueChanged; }
public UserSettingsSource(UITableView tableView, SettingsPhoneModel phoneModel, SettingsAllowCallsModel allowCallsModel, DescriptionTypeEventModel passwordTypeModel, List <DescriptionAndBoolEventModel> switchModel, List <DescriptionTypeEventModel> typeModelInformation, List <DescriptionTypeEventModel> typeModelDanger, Dictionary <string, string> locationResources) { _phoneModel = phoneModel; _allowCallsModel = allowCallsModel; _passwordTypeModel = passwordTypeModel; _typeModelInformation = typeModelInformation; _typeModelDanger = typeModelDanger; _switchModel = switchModel; _locationResources = locationResources; tableView.RegisterNibForCellReuse(LabelWithArrowCell.Nib, LabelWithArrowCell.Key); tableView.RegisterNibForCellReuse(SwitchCell.Nib, SwitchCell.Key); tableView.RegisterNibForCellReuse(AllowPhoneCallsCell.Nib, AllowPhoneCallsCell.Key); tableView.RegisterNibForCellReuse(PhoneNumberCell.Nib, PhoneNumberCell.Key); }