Exemple #1
0
 /// <summary>登陆或者验证手势密码输入完成时的代理方法
 /// </summary>
 /// <param name="view"></param>
 /// <param name="type"></param>
 /// <param name="gesture">登陆时的手势密码</param>
 /// <param name="result"></param>
 public override void CircleViewDidCompleteLoginGesture(PCCircleView view, CircleViewType type, string gesture, bool equal)
 {
     // 此时的type有两种情况 Login or verify
     if (type == CircleViewType.CircleViewTypeLogin)
     {
         if (equal)
         {
             //登陆成功
             navigationController.PopToRootViewController(true);
         }
         else
         {
             //密码错误
             msgLabel.ShowWarnMsgAndShake(PCCircleViewConst.gestureTextGestureVerifyError);
         }
     }
     else if (type == CircleViewType.CircleViewTypeVerify)
     {
         if (equal)
         {
             //"验证成功,跳转到设置手势界面"
         }
         else
         {
             //原手势密码输入错误
         }
     }
 }
Exemple #2
0
 /// <summary>连线个数多于或等于4个,获取到第一个手势密码时通知代理
 /// </summary>
 /// <param name="view"></param>
 /// <param name="type"></param>
 /// <param name="gesture">第一个次保存的密码</param>
 public override void CircleViewDidCompleteSetFirstGesture(PCCircleView view, CircleViewType type, string gesture)
 {
     msgLabel.ShowWarnMsg(PCCircleViewConst.gestureTextDrawAgain);
     if (action != null)
     {
         // infoView展示对应选中的圆
         action(view);
     }
 }
Exemple #3
0
 /// <summary>登陆或者验证手势密码输入完成时的代理方法
 /// </summary>
 /// <param name="view"></param>
 /// <param name="type"></param>
 /// <param name="gesture">登陆时的手势密码</param>
 /// <param name="result"></param>
 public override void CircleViewDidCompleteSetSecondGesture(PCCircleView view, CircleViewType type, string gesture, bool equal)
 {
     //两次手势匹配
     if (equal)
     {
         msgLabel.ShowWarnMsg(PCCircleViewConst.gestureTextSetSuccess);
         navigationController.PopToRootViewController(true);
     }
     else
     {
         //两次手势不匹配
         msgLabel.ShowWarnMsgAndShake(PCCircleViewConst.gestureTextDrawAgainError);
         resetBtn.Hidden = false;
     }
 }
Exemple #4
0
 /// <summary>让infoView对应按钮选中
 /// </summary>
 /// <param name="circleView"></param>
 void InfoViewSelectedSubviewsSameAsCircleView(PCCircleView circleView)
 {
     foreach (PCCircle circle in circleView.Subviews)
     {
         if (circle.State == CircleState.CircleStateSelected || circle.State == CircleState.CircleStateLastOneSelected)
         {
             foreach (PCCircle infoCircle in infoView.Subviews)
             {
                 if (infoCircle.Tag == circle.Tag)
                 {
                     infoCircle.State = CircleState.CircleStateSelected;
                 }
             }
         }
     }
 }
Exemple #5
0
        /// <summary>连线个数少于4个时,通知代理
        /// </summary>
        /// <param name="view"></param>
        /// <param name="type"></param>
        /// <param name="gesture">手势结果</param>
        public override void CircleViewConnectCirclesLessThanNeedWithGesture(PCCircleView view, CircleViewType type, string gesture)
        {
            //获取手势保存的第一个密码
            string gestureOne = PCCircleViewConst.GetGesturePassWord();

            // 看是否存在第一个密码
            if (gestureOne.Length > 0)
            {
                resetBtn.Hidden = false;
                msgLabel.ShowWarnMsgAndShake(PCCircleViewConst.gestureTextDrawAgainError);
            }
            else
            {
                msgLabel.ShowWarnMsgAndShake(PCCircleViewConst.gestureTextConnectLess);
            }
        }
Exemple #6
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            //在加载视图后进行任何其他设置
            Title = @"验证手势解锁";
            PCCircleView lockView = new PCCircleView();

            //lockView.Delegate = this;
            lockView.Type = CircleViewType.CircleViewTypeVerify;
            View.AddSubview(lockView);

            msgLabel        = new PCLockLabel(new CGRect(0, 0, PCCircleViewConst.kScreenW, 14));
            msgLabel.Center = new CGPoint(PCCircleViewConst.kScreenW / 2, lockView.Frame.GetMinY() - 30);
            msgLabel.ShowNormalMsg(PCCircleViewConst.gestureTextOldGesture);
            View.AddSubview(msgLabel);
        }
Exemple #7
0
        /// <summary> 界面相同部分生成器
        /// </summary>
        void SetupSameUI()
        {
            // 创建导航栏右边按钮
            NavigationItem.RightBarButtonItem = ItemWithTitle("重设", (int)buttonTag.buttonTagReset);
            // 解锁界面
            PCCircleView lockView = new PCCircleView();

            this.lockView = lockView;
            View.AddSubview(this.lockView);

            PCLockLabel msgLabelNew = new PCLockLabel(new CGRect(0, 0, PCCircleViewConst.kScreenW, 14));

            msgLabelNew.Center = new CGPoint(PCCircleViewConst.kScreenW / 2, lockView.Frame.GetMinY() - 30);
            this.msgLabel      = msgLabelNew;
            View.AddSubview(msgLabel);

            lockView.Delegate = new MyCircleViewDelegate(NavigationController, resetBtn, msgLabel, InfoViewSelectedSubviewsSameAsCircleView);
        }
Exemple #8
0
 /// <summary>登陆或者验证手势密码输入完成时的代理方法
 /// </summary>
 /// <param name="view"></param>
 /// <param name="type"></param>
 /// <param name="gesture">登陆时的手势密码</param>
 /// <param name="result"></param>
 public virtual void CircleViewDidCompleteLoginGesture(PCCircleView view, CircleViewType type, string gesture, bool equal)
 {
 }
Exemple #9
0
 /// <summary>连线个数多于或等于4个,获取到第一个手势密码时通知代理
 /// </summary>
 /// <param name="view"></param>
 /// <param name="type"></param>
 /// <param name="gesture">第一个次保存的密码</param>
 public virtual void CircleViewDidCompleteSetFirstGesture(PCCircleView view, CircleViewType type, string gesture)
 {
 }
Exemple #10
0
 /// <summary>连线个数少于4个时,通知代理
 /// </summary>
 /// <param name="view"></param>
 /// <param name="type"></param>
 /// <param name="gesture">手势结果</param>
 public virtual void CircleViewConnectCirclesLessThanNeedWithGesture(PCCircleView view, CircleViewType type, string gesture)
 {
 }