コード例 #1
0
        private void ProcessNodes()
        {
            foreach (var nodeR in _nodes.Where(n => n.Type != NodeType.When))
            {
                if (HasNextNodeR(nodeR) == false)
                {
                    continue;
                }

                var nextNodeR = NextNodeR(nodeR);

                var node     = nodeR.Node;
                var nextNode = nextNodeR.Node;

                if (nextNodeR.Type == NodeType.When)
                {
                    _flowchart.Connect(nextNode)
                    .With(node, "Sim", NodeLinkType.DottedLineArrow);

                    if (HasNextNodeR(nextNodeR))
                    {
                        var next = NextNodeR(nextNodeR);
                        _flowchart.With(next.Node, "Não", NodeLinkType.DottedLineArrow);
                        _flowchart.Connect(node)
                        .With(next.Node);
                    }
                }
                else
                {
                    _flowchart.Connect(node)
                    .With(nextNode);
                }
            }
        }