public bool AskForDebugger(string message) { AskForDebuggerDelegate del = delegate { using (AttachDebuggerDialog dialog = new AttachDebuggerDialog(message)) { System.Windows.Forms.DialogResult result = dialog.ShowDialog(); switch (result) { default: case System.Windows.Forms.DialogResult.Retry: { // Start the debugger up this.AttachDebugger(); return(true); } case System.Windows.Forms.DialogResult.Ignore: return(false); case System.Windows.Forms.DialogResult.Cancel: Environment.Exit(-2); return(false); } } }; // Invoke ? return(del(message)); }
public bool AskForDebugger( string message ) { AskForDebuggerDelegate del = delegate { using( AttachDebuggerDialog dialog = new AttachDebuggerDialog( message ) ) { System.Windows.Forms.DialogResult result = dialog.ShowDialog(); switch( result ) { default: case System.Windows.Forms.DialogResult.Retry: { // Start the debugger up this.AttachDebugger(); return true; } case System.Windows.Forms.DialogResult.Ignore: return false; case System.Windows.Forms.DialogResult.Cancel: Environment.Exit( -2 ); return false; } } }; // Invoke ? return del( message ); }