Exemplo n.º 1
0
        private void DrawPairingEdge(GoTextNodeHoverable sourceGoNode, GoTextNodeHoverable imageGoNode, double score, GoLayer layer)
        {
            GoLink link = new GoLink();

            double pairingScore = score;

            if (pairingScore < 0)
            {
                pairingScore = 0;
            }
            Color edgeColor = Color.FromArgb(Convert.ToInt32(255 - 255 * pairingScore), Convert.ToInt32(255 * pairingScore), 0);

            link.ToolTipText = (pairingScore.ToString());
            link.Pen         = new Pen(edgeColor);
            if (sourceGoNode == null || imageGoNode == null)
            {
                return;
            }
            link.ToPort   = sourceGoNode.LeftPort;
            link.FromPort = imageGoNode.RightPort;
            layer.Add(link);
            link.PenWidth = 3;
        }
Exemplo n.º 2
0
 public GoNodeWrapper(GoTextNodeHoverable node, InstructionNode instructionWrapper)
 {
     Node            = node;
     InstructionNode = instructionWrapper;
 }
Exemplo n.º 3
0
 public GoLabeledVertexWrapper(GoTextNodeHoverable node, LabeledVertex labledVertex)
 {
     Node         = node;
     LabledVertex = labledVertex;
     Index        = labledVertex.Index;
 }