Пример #1
0
        private async Task CheckLockAsync(bool forceLock)
        {
            if (TopPageIsLock())
            {
                // already locked
                return;
            }

            var lockType    = _lockService.GetLockType(forceLock);
            var currentPage = Current.MainPage.Navigation.ModalStack.LastOrDefault() as ExtendedNavigationPage;

            switch (lockType)
            {
            case Enums.LockType.Fingerprint:
                await Current.MainPage.Navigation.PushModalAsync(new ExtendedNavigationPage(new LockFingerprintPage(!forceLock)), false);

                break;

            case Enums.LockType.PIN:
                await Current.MainPage.Navigation.PushModalAsync(new ExtendedNavigationPage(new LockPinPage()), false);

                break;

            case Enums.LockType.Password:
                await Current.MainPage.Navigation.PushModalAsync(new ExtendedNavigationPage(new LockPasswordPage()), false);

                break;

            default:
                break;
            }
        }
Пример #2
0
        private async Task CheckLockAsync(bool forceLock)
        {
            if (TopPageIsLock())
            {
                // already locked
                return;
            }

            var lockType = _lockService.GetLockType(forceLock);

            if (lockType == Enums.LockType.None)
            {
                return;
            }

            _settings.AddOrUpdateValue(Constants.Locked, true);
            switch (lockType)
            {
            case Enums.LockType.Fingerprint:
                await Current.MainPage.Navigation.PushModalAsync(new ExtendedNavigationPage(new LockFingerprintPage(!forceLock)), false);

                break;

            case Enums.LockType.PIN:
                await Current.MainPage.Navigation.PushModalAsync(new ExtendedNavigationPage(new LockPinPage()), false);

                break;

            case Enums.LockType.Password:
                await Current.MainPage.Navigation.PushModalAsync(new ExtendedNavigationPage(new LockPasswordPage()), false);

                break;

            default:
                break;
            }
        }