Ejemplo n.º 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);
 }
Ejemplo n.º 2
0
        public virtual bool ValidatePin(BaseLockScreenController padLockScreenController, string pin)
        {
            var savedPin = Keychain.GetPassword();

            return(savedPin.Equals(pin));
        }