Exemplo n.º 1
0
        public override InteractionState StartDraw(PointF pt)
        {
            ChartObject ac     = fc.ActiveObject;
            Node        node   = fc.GetNodeAt(pt);
            int         handle = 0;

            if (ac != null && (fc.ModifierKeyActions.GetKeys(ModifierKeyAction.OverrideBehavior) & Control.ModifierKeys) == 0 &&
                !ac.notInteractive() && ac.HitTestHandle(pt, ref handle))
            {
                return(new InteractionState(ac, handle, Action.Modify));
            }
            else if (node != null && node.canHaveArrows(true))
            {
                return(new InteractionState(
                           new Arrow(fc, node), -1, Action.Create));
            }
            else if (node != null)
            {
                return(new InteractionState(fc.Selection, -1, Action.Create));
            }
            else
            {
                return(new InteractionState(CreateNode(), -1, Action.Create));
            }
        }
Exemplo n.º 2
0
        public override InteractionState StartDraw(PointF pt)
        {
            ChartObject ac     = fc.ActiveObject;
            Node        obj    = fc.GetNodeAt(pt);
            int         handle = 0;

            if (ac != null && !ac.notInteractive() && ac.HitTestHandle(pt, ref handle))
            {
                return(new InteractionState(ac, handle, Action.Modify));
            }
            else
            if (obj != null && obj.canHaveArrows(true))
            {
                return(new InteractionState(
                           new Arrow(fc, obj), -1, Action.Create));
            }
            else
            if (obj == null && fc.AllowUnconnectedArrows)
            {
                return(new InteractionState(
                           new Arrow(fc, fc.Dummy), -1, Action.Create));
            }
            else
            {
                return(new InteractionState(
                           fc.Selection, -1, Action.Create));
            }
        }
Exemplo n.º 3
0
        public override InteractionState StartDraw(System.Drawing.PointF pt)
        {
            ChartObject ac     = fc.ActiveObject;
            int         handle = 0;

            if (ac != null && !ac.notInteractive() && ac.HitTestHandle(pt, ref handle))
            {
                return(new InteractionState(ac, handle, Action.Modify));
            }
            else
            {
                return(new InteractionState(
                           new ControlHost(fc), -1, Action.Create));
            }
        }