Ejemplo n.º 1
0
        public override void TouchesMoved(NSSet touches, UIEvent evt)
        {
            CurrentPoint = new CGPoint(0, 0);
            UITouch touch = (UITouch)touches.AnyObject;
            CGPoint point = touch.LocationInView(this);

            foreach (PCCircle circle in Subviews)
            {
                if (circle.Frame.Contains(point))
                {
                    if (!CircleSet.Contains(circle))
                    {
                        CircleSet.Add(circle);
                        // move过程中的连线(包含跳跃连线的处理)
                        CalAngleAndconnectTheJumpedCircle();
                    }
                }
                else
                {
                    CurrentPoint = point;
                }
            }

            foreach (PCCircle circle in CircleSet)
            {
                circle.State = CircleState.CircleStateSelected;
                // 如果是登录或者验证原手势密码,就改为对应的状态 (加上这句没有三角箭头)
                //if (Type != CircleViewType.CircleViewTypeSetting)
                //{
                //    circle.State = CircleState.CircleStateLastOneSelected;
                //}
            }
            if (CircleSet.Count > 0)
            {
                // 数组中最后一个对象的处理
                CircleSetLastObjectWithState(CircleState.CircleStateLastOneSelected);
                SetNeedsDisplay();
            }
        }
Ejemplo n.º 2
0
        public override void TouchesBegan(NSSet touches, UIEvent evt)
        {
            GestureEndResetMembers(obj);
            CurrentPoint = new CGPoint(0, 0);
            UITouch touch = (UITouch)touches.AnyObject;
            CGPoint point = touch.LocationInView(this);

            foreach (PCCircle circle in Subviews)
            {
                if (circle.Frame.Contains(point))
                {
                    circle.State = CircleState.CircleStateSelected;
                    CircleSet.Add(circle);
                }
            }
            if (CircleSet.Count > 0)
            {
                //数组中最后一个对象的处理
                CircleSetLastObjectWithState(CircleState.CircleStateLastOneSelected);
                SetNeedsDisplay();
            }
        }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     EnabledCircles.Add(this);
 }