Example #1
0
        private void UpdateCurrentContent()
        {
            var nodeSelector = RestrictVisibility
                ? OriginalGraph.GetNodeSelector(SelectedNodeIds, NodeVisitStopFunction, NodeVisitAcceptFunction)
                : null;

            CurrentDotContent = OriginalGraph.ToDot(new DotFormatOptions {
                NodeSelector = nodeSelector
            });
            if (UpdateCurrentImage)
            {
                CurrentImage = GraphParser.GetGraphImage(CurrentDotContent);
            }
            CurrentDotLayoutContent = GraphParser.GetGraphLayoutDot(CurrentDotContent);
            CurrentLayoutGraph      = GraphParser.GetGraph(CurrentDotLayoutContent);

            if (CurrentWpfGraph != null)
            {
                CurrentWpfGraph.Changed -= CurrentWpfGraphChanged;
            }
            CurrentWpfGraph          = new WpfGraph(CurrentLayoutGraph, SelectedNodeIds);
            CurrentWpfGraph.Changed += CurrentWpfGraphChanged;

            if (IsConnectedComponentsEnabled)
            {
                CurrentConnectedComponents = GetConnectedComponents(CurrentLayoutGraph);
            }
        }
Example #2
0
 private static void GenerateOutput(string originalDot, string graphDot, string reparsedDot)
 {
     GraphParser.GetGraphImage(originalDot).Save("outOriginal.png");
     GraphParser.GetGraphImage(graphDot).Save("out.png");
     File.WriteAllText("layout.gv", reparsedDot);
 }