예제 #1
0
 /// <summary>
 /// <para>
 /// Called right after the pin has been verified and set. Then saves the pin to the user's keychain.
 ///  Override this to perform custom saves of pin.</para>
 /// <para></para>
 /// <para>
 /// NOTE: At a minimum when overriding, call
 ///  <code>
 /// ((ILockableScreen)padLockScreenSetupViewController).IsLocked = false;
 /// </code>
 /// to notify the controller to not re-present the lock screen.
 /// </para>
 /// </summary>
 /// <param name="pin">The pin the user entered.</param>
 /// <param name="padLockScreenSetupViewController">The controller who is in charge of setting the new pin.</param>
 /// <remarks>>At a minimum when overriding, call ((ILockableScreen)parent).IsLocked = false; to
 /// notify the controller to not re-present the lock screen.
 /// </remarks>
 public virtual async void PinSet(string pin, BaseLockScreenController padLockScreenSetupViewController)
 {
     Keychain.SavePassword(pin);
     MainLockScreenController.UnlockApplication();
     await parent.DismissViewControllerAsync(true);
 }
예제 #2
0
        public virtual bool ValidatePin(BaseLockScreenController padLockScreenController, string pin)
        {
            var savedPin = Keychain.GetPassword();

            return(savedPin.Equals(pin));
        }
예제 #3
0
 public virtual void AttemptsExpiredForPadLockScreenViewController(BaseLockScreenController padLockScreenController)
 {
     Console.WriteLine("User has been locked out...");
 }
예제 #4
0
 public virtual void UnlockWasUnsuccessful(string badPin, int afterAttempt, BaseLockScreenController padLockScreenController)
 {
     Console.WriteLine("Failed attempt number {0} with pin: {1}", afterAttempt, badPin);
 }
예제 #5
0
 public virtual async void UnlockWasSuccessfulForPadLockScreenViewController(BaseLockScreenController padLockScreenController)
 {
     MainLockScreenController.UnlockApplication();
     await parent.DismissViewControllerAsync(true);
 }
예제 #6
0
 public virtual async void UnlockWasCancelledForPadLockScreen(BaseLockScreenController padLockScreenController)
 {
     await parent.DismissViewControllerAsync(true);
 }