Esempio n. 1
0
        /// <summary>
        /// Adds a link to a condition to the target node
        /// </summary>
        /// <param name="mouseDownInfo">The mouse down info that contains the condition info</param>
        /// <param name="targetNode">The target node to link to</param>
        internal protected override void AddLink(MouseDownInfo mouseDownInfo, Node targetNode)
        {
            // if there is info
            if (mouseDownInfo != null)
            {
                ConditionMouseDownInfo conditionInfo = (ConditionMouseDownInfo)mouseDownInfo;
                // check if the condition linked to another node, if so remove the link first
                var oldLink = conditionInfo.Condition.LinksTo;
                if (oldLink != null)
                {
                    oldLink.ParentNodes.RemoveWithoutRefBack(this);
                }

                // add the link to the condition
                conditionInfo.Condition.LinksTo = targetNode;
                if (targetNode != null)
                {
                    targetNode.ParentNodes.AddWithoutRefBack(this);
                }
            }
        }
 /// <summary>
 /// Container nodes don't have links, so do nothing
 /// </summary>
 /// <param name="mouseDownInfo"></param>
 /// <param name="targetNode"></param>
 protected internal override void AddLink(MouseDownInfo mouseDownInfo, Node targetNode)
 {
 }
 /// <summary>
 /// Adds a link to the given target node, along with the data built when the mouse was pressed
 /// </summary>
 /// <param name="mouseDownInfo">The additional mousedown info when the mouse was pressed</param>
 /// <param name="targetNode">The target node to link to</param>
 internal protected abstract void AddLink(MouseDownInfo mouseDownInfo, Node targetNode);
Esempio n. 4
0
 /// <summary>
 /// Adds a link to the given target node
 /// </summary>
 /// <param name="mouseDownInfo">The info when the mouse was pressed</param>
 /// <param name="targetNode">The target node to link to</param>
 internal protected override void AddLink(MouseDownInfo mouseDownInfo, Node targetNode)
 {
     LinksTo = targetNode;
 }