Пример #1
0
        private void OnSelectionChanged(object sender, SelectionEventArgs args)
        {
            if (args.definition != null)
            {
                // Dump the definition
                CFGPrettyPrinter.PrintPretty(args.definition, cfgTextView);
                if (args.definition is MethodDefinition)
                {
                    currentCfg = new CilToControlFlowGraph().Decompile(args.definition as MethodDefinition);
                }

                if ((drawer == null) && (currentCfg != null))
                {
                    drawer = new CFGPrettyDrawer(drawingArea);
                    drawer.DrawTextBlocks(currentCfg);
                    if (args.module != null)
                    {
                        // Dump the module
                        if (args.assembly != null)
                        {
                            // Dump assembly modules.
                        }
                    }
                }
            }
        }
Пример #2
0
        void HandleClicked(object sender, EventArgs e)
        {
            if (currentCfg != null)
            {
                outputTextView.Buffer.Text = createAssemblyFromCfg(currentCfg);
                if (drawer == null)
                {
                    drawer = new CFGPrettyDrawer(drawingArea);
                    drawer.DrawTextBlocks(currentCfg);
                }

                simulationTextView.Buffer.Clear();
                simulationTextView.Buffer.Text = currentCfg.ToString();
            }
        }