示例#1
0
        public override void OnCreate()
        {
            base.OnCreate();

            PasscodeManager = new Passcode.Google.PasscodeManager();
            PasscodeManager.PasscodeLength            = 8;
            PasscodeManager.AnimationEnterInResource  = Resource.Animation.fadein;
            PasscodeManager.AnimationEnterOutResource = Resource.Animation.fadeout;
            PasscodeManager.AnimationExitInResource   = Resource.Animation.fadein;
            PasscodeManager.AnimationExitOutResource  = Resource.Animation.fadeout;

            PasscodeManager.PasscodeEntered += (object sender, Passcode.Google.PasscodeEnteredEventArgs e) => {
                if (e.GetPasscodeAsString() == "11111111")
                {
                    PasscodeManager.Dismiss();
                }
                else
                {
                    PasscodeManager.WrongPasscode();
                }
            };
            PasscodeManager.PasscodeCancelled += (sender, e) => {
                PasscodeManager.Dismiss();
                Toast.MakeText(this, "You must sign in", ToastLength.Long).Show();
            };
        }
示例#2
0
        public override void OnCreate()
        {
            base.OnCreate();

            PasscodeManager = new Passcode.Google.PasscodeManager();
            PasscodeManager.PasscodeLength   = 6;
            PasscodeManager.ShowCancelButton = true;

            PasscodeManager.PasscodeEntered += (object sender, Passcode.Google.PasscodeEnteredEventArgs e) => {
                if (e.GetPasscodeAsString() == "111111")
                {
                    PasscodeManager.Dismiss();
                }
                else
                {
                    PasscodeManager.WrongPasscode();
                }
            };
            PasscodeManager.PasscodeCancelled += (sender, e) => {
                PasscodeManager.Dismiss();
                Toast.MakeText(this, "You must sign in", ToastLength.Long).Show();
            };
        }