Ejemplo n.º 1
0
 public object CreateControl()
 {
     this.Control                  = new GViewer();
     this.Control.Dock             = DockStyle.Fill;
     this.Control.Visible          = true;
     this.Control.PanButtonPressed = true;
     this.Control.ToolBarIsVisible = true;
     this.Control.Graph            = CallGraphGenerator.Generate(program);
     return(Control);
 }
Ejemplo n.º 2
0
        public static Graph Generate(Program program)
        {
            Graph graph  = new Graph();
            var   cfgGen = new CallGraphGenerator(graph);

            foreach (var rootProc in program.Procedures.Values)
            {
                cfgGen.Traverse(program.CallGraph, rootProc);
            }
            graph.Attr.LayerDirection = LayerDirection.LR;
            return(graph);
        }