public static Graph Generate(IUiPreferencesService uiPreferences, Procedure proc, Graphics g, Font defaultFont) { Graph graph = new Graph(); var cfgGen = new CfgGraphGenerator(graph, uiPreferences, g, defaultFont); cfgGen.Traverse(proc.EntryBlock.Succ[0]); graph.Attr.LayerDirection = LayerDirection.TB; return graph; }
public static Graph Generate(IUiPreferencesService uiPreferences, Procedure proc, Graphics g, Font defaultFont) { Graph graph = new Graph(); var cfgGen = new CfgGraphGenerator(graph, uiPreferences, g, defaultFont); cfgGen.Traverse(proc.EntryBlock.Succ[0]); graph.Attr.LayerDirection = LayerDirection.TB; return(graph); }
public void ViewGraph() { gViewer.Parent = combinedCodeView.Parent; using (var g = combinedCodeView.CreateGraphics()) { var uiPreferences = services.RequireService <IUiPreferencesService>(); gViewer.Graph = CfgGraphGenerator.Generate(uiPreferences, proc, g, combinedCodeView.Font); } combinedCodeView.Visible = false; gViewer.Visible = true; gViewer.BringToFront(); }