Beispiel #1
0
        private static void OnFormatVertex([NotNull] object sender, [NotNull] FormatVertexEventArgs <TGraph> args)
        {
            var builder = new StringBuilder();

            builder.AppendLine($"{args.Vertex.VertexCount}-{args.Vertex.EdgeCount}");

            foreach (TVertex vertex in args.Vertex.Vertices)
            {
                builder.AppendLine($"  {vertex}");
            }
            foreach (TEdge edge in args.Vertex.Edges)
            {
                builder.AppendLine($"  {edge}");
            }

            args.VertexFormat.Label = builder.ToString();
        }
 private static void OnFormatVertex([NotNull] object sender, [NotNull] FormatVertexEventArgs <TVertex> args)
 {
     args.VertexFormat.Label = args.Vertex.ToString();
 }