void explorer_AddPluginException(object sender, AddPluginExceptionEventArgs args) { if (AddPluginException != null) { AddPluginException(sender, args); } }
void parser_AddPluginException(object sender, AddPluginExceptionEventArgs args) { if (this.InvokeRequired) { this.Invoke( new parser_AddPluginExceptionCallback(parser_AddPluginException), new object[] { sender, args }); } else { if (MessageBox.Show( args.Type.FullName + ":\n" + args.Exception.Message + "\n" + args.Exception.StackTrace + "\n\nIgnore this plug-in and continue?", "Error", MessageBoxButtons.YesNo) == DialogResult.No) { args.Cancel = true; MessageBox.Show("Installation canceled by the user...", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } }