コード例 #1
0
ファイル: CfgGraphGenerator.cs プロジェクト: relaxar/reko
 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;
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 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();
 }