Ejemplo n.º 1
0
        private PocEdge AddNewGraphEdge(PocVertex from, PocVertex to, Tuple <decimal, decimal> d1)
        {
            string edgeString = string.Format("({1} - {2})", from.ID, Math.Round(d1.Item1, 2), Math.Round(d1.Item2, 2));
            Brush  edgeColor;

            if (from.IsBrush == Brushes.Yellow && to.IsBrush == Brushes.Yellow)
            {
                edgeColor = Brushes.Yellow;
            }
            else
            {
                edgeColor = Brushes.Gray;
            }
            PocEdge newEdge = new PocEdge(edgeString, from, to, edgeColor);

            Graph.AddEdge(newEdge);
            return(newEdge);
        }
Ejemplo n.º 2
0
 public IndexVertex(string id, int index, Tuple <decimal, decimal> d1, Brush Color)
 {
     this.index  = index;
     this.vertex = new PocVertex(id, true, Color);
     this.d1     = d1;
 }