public void onTreeViewAfterSelect(TreeNode selectedNode) { if (selectedNode.Tag != null) { selectedMethod = null; btDebugMethod.Enabled = false; btExecuteMethodWithoutDebugger.Enabled = false; switch (selectedNode.Tag.GetType().Name) { case "RuntimeMethodInfo": //Callbacks.raiseRegistedCallbacks(onSelectedMethod, new[] {e.Node.Tag}); selectedMethod = (MethodInfo)selectedNode.Tag; raiseO2MessageWithMethodInfo(selectedMethod); lbLastMethodExecuted.Text = selectedMethod.Name; DI.reflection.loadMethodInfoParametersInDataGridView(selectedMethod, dgvSourceCode_SelectedMethodParameters); // btSourceCode_executeStaticMethod.Enabled = // DI.reflection.doesMethodOnlyHasSupportedParameters((MethodInfo)selectedNode.Tag); dgvSourceCode_SelectedMethodParameters.Enabled = true; btDebugMethod.Enabled = O2Messages.isDebuggerAvailable(); btExecuteMethodWithoutDebugger.Enabled = true; break; case "RuntimeType": foreach (TreeNode childNode in selectedNode.Nodes) { if (childNode.Tag != null && childNode.Tag.GetType().Name == "RuntimeMethodInfo") { raiseO2MessageWithMethodInfo((MethodInfo)childNode.Tag); } } //var type = (Type) e.Node.Tag; //foreach (var methodInfo in DI.reflection.getMethods(type)) // raiseO2MessageWithMethodInfo(methodInfo); break; case "Assembly": var assembly = (Assembly)selectedNode.Tag; foreach (var methodInfo in DI.reflection.getMethods(assembly)) { raiseO2MessageWithMethodInfo(methodInfo); } break; } } }
private void contextMenu_Opening(object sender, System.ComponentModel.CancelEventArgs e) { setBreakPointFeatures(O2Messages.isDebuggerAvailable()); }