示例#1
0
        private void PinEntered(SettingsPinPage page)
        {
            page.PinControl.Entry.Unfocus();
            page.Navigation.PopModalAsync();

            _authService.PIN = page.Model.PIN;

            _settings.AddOrUpdateValue(Constants.SettingPinUnlockOn, true);
            _settings.AddOrUpdateValue(Constants.SettingFingerprintUnlockOn, false);
            PinCell.On = true;

            if (FingerprintCell != null)
            {
                FingerprintCell.On = false;
            }
        }
示例#2
0
        private void PinCell_Changed(object sender, EventArgs e)
        {
            var cell = sender as ExtendedSwitchCell;

            if (cell == null)
            {
                return;
            }

            if (cell.On && !_settings.GetValueOrDefault(Constants.SettingPinUnlockOn, false))
            {
                cell.On = false;
                var pinPage = new SettingsPinPage((page) => PinEntered(page));
                Navigation.PushModalAsync(new ExtendedNavigationPage(pinPage));
            }
            else if (!cell.On)
            {
                _settings.AddOrUpdateValue(Constants.SettingPinUnlockOn, false);
            }
        }