void _OnNodeListItemSelected(NodeListAttributeClass item)
        {
            IsOpenContextMenu = false;
            var node = CreateNodeFromNodeListItem(item, mContextMenuOpenMousePos);

            if (node != null && item.FilterData.StartLinkObj != null)
            {
                var nodePins = node.GetLinkPinInfos();

                LinkPinControl nodeLink = null;
                foreach (var pin in nodePins)
                {
                    if (pin.Visibility != Visibility.Visible)
                    {
                        continue;
                    }
                    if (CodeGenerateSystem.Base.LinkInfo.CanLinkWith(item.FilterData.StartLinkObj, pin))
                    {
                        nodeLink = pin;
                        break;
                    }
                }
                if (nodeLink != null)
                {
                    if (nodeLink.Visibility == Visibility.Visible)
                    {
                        LinkPinControl startLink, endLink;
                        if (item.FilterData.StartLinkObj.LinkOpType == enLinkOpType.Start)
                        {
                            startLink = item.FilterData.StartLinkObj;
                            endLink   = nodeLink;
                        }
                        else
                        {
                            startLink = nodeLink;
                            endLink   = item.FilterData.StartLinkObj;
                        }
                        var linkInfo = LinkInfo.CreateLinkInfo(nodeLink.LinkCurveType, MainDrawCanvas, startLink, endLink);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public NodeListAttributeClass(NodeListAttributeClass parent)
 {
     mParent = parent;
 }