Browse Source

add Continue button to DebuggeeExceptionForm

pull/18/head
Siegfried Pammer 14 years ago
parent
commit
b4e1e34202
  1. 20
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.Designer.cs
  2. 11
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs
  3. 4
      src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.resx
  4. 2
      src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

20
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.Designer.cs generated

@ -21,6 +21,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -21,6 +21,7 @@ namespace ICSharpCode.SharpDevelop.Services
this.exceptionView = new System.Windows.Forms.RichTextBox();
this.btnStop = new System.Windows.Forms.Button();
this.btnBreak = new System.Windows.Forms.Button();
this.btnContinue = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.SuspendLayout();
//
@ -60,7 +61,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -60,7 +61,7 @@ namespace ICSharpCode.SharpDevelop.Services
//
this.btnStop.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnStop.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnStop.Location = new System.Drawing.Point(340, 366);
this.btnStop.Location = new System.Drawing.Point(385, 366);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(115, 30);
this.btnStop.TabIndex = 3;
@ -73,7 +74,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -73,7 +74,7 @@ namespace ICSharpCode.SharpDevelop.Services
//
this.btnBreak.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnBreak.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnBreak.Location = new System.Drawing.Point(219, 366);
this.btnBreak.Location = new System.Drawing.Point(143, 366);
this.btnBreak.Name = "btnBreak";
this.btnBreak.Size = new System.Drawing.Size(115, 30);
this.btnBreak.TabIndex = 4;
@ -82,9 +83,23 @@ namespace ICSharpCode.SharpDevelop.Services @@ -82,9 +83,23 @@ namespace ICSharpCode.SharpDevelop.Services
this.btnBreak.UseVisualStyleBackColor = true;
this.btnBreak.Click += new System.EventHandler(this.BtnBreakClick);
//
// btnContinue
//
this.btnContinue.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.btnContinue.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnContinue.Location = new System.Drawing.Point(264, 366);
this.btnContinue.Name = "btnContinue";
this.btnContinue.Size = new System.Drawing.Size(115, 30);
this.btnContinue.TabIndex = 5;
this.btnContinue.Text = "Continue";
this.btnContinue.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.btnContinue.UseVisualStyleBackColor = true;
this.btnContinue.Click += new System.EventHandler(this.BtnContinueClick);
//
// DebuggeeExceptionForm
//
this.ClientSize = new System.Drawing.Size(642, 399);
this.Controls.Add(this.btnContinue);
this.Controls.Add(this.btnBreak);
this.Controls.Add(this.btnStop);
this.Controls.Add(this.exceptionView);
@ -96,6 +111,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -96,6 +111,7 @@ namespace ICSharpCode.SharpDevelop.Services
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
this.ResumeLayout(false);
}
private System.Windows.Forms.Button btnContinue;
private System.Windows.Forms.Button btnBreak;
private System.Windows.Forms.Button btnStop;
private System.Windows.Forms.RichTextBox exceptionView;

11
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.cs

@ -38,9 +38,11 @@ namespace ICSharpCode.SharpDevelop.Services @@ -38,9 +38,11 @@ namespace ICSharpCode.SharpDevelop.Services
this.btnBreak.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Break}");
this.btnStop.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Terminate}");
this.btnContinue.Text = StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Continue}");
this.btnBreak.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Break");
this.btnStop.Image = WinFormsResourceService.GetBitmap("Icons.16x16.StopProcess");
this.btnContinue.Image = WinFormsResourceService.GetBitmap("Icons.16x16.Debug.Continue");
}
void ProcessHandler(object sender, EventArgs e)
@ -54,13 +56,14 @@ namespace ICSharpCode.SharpDevelop.Services @@ -54,13 +56,14 @@ namespace ICSharpCode.SharpDevelop.Services
this.process.Resumed -= ProcessHandler;
}
public static void Show(Process process, string title, string message, string stacktrace, Bitmap icon)
public static void Show(Process process, string title, string message, string stacktrace, Bitmap icon, bool canContinue)
{
DebuggeeExceptionForm form = new DebuggeeExceptionForm(process);
form.Text = title;
form.pictureBox.Image = icon;
form.lblExceptionText.Text = message;
form.exceptionView.Text = stacktrace;
form.btnContinue.Enabled = canContinue;
form.Show(WorkbenchSingleton.MainWin32Window);
}
@ -105,5 +108,11 @@ namespace ICSharpCode.SharpDevelop.Services @@ -105,5 +108,11 @@ namespace ICSharpCode.SharpDevelop.Services
this.process.Terminate();
Close();
}
void BtnContinueClick(object sender, EventArgs e)
{
this.process.Continue();
Close();
}
}
}

4
src/AddIns/Debugger/Debugger.AddIn/Service/DebuggeeExceptionForm.resx

@ -112,9 +112,9 @@ @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

2
src/AddIns/Debugger/Debugger.AddIn/Service/WindowsDebugger.cs

@ -878,7 +878,7 @@ namespace ICSharpCode.SharpDevelop.Services @@ -878,7 +878,7 @@ namespace ICSharpCode.SharpDevelop.Services
string message = string.Format(StringParser.Parse("${res:MainWindow.Windows.Debug.ExceptionForm.Message}"), e.Exception.Type);
Bitmap icon = WinFormsResourceService.GetBitmap(e.IsUnhandled ? "Icons.32x32.Error" : "Icons.32x32.Warning");
DebuggeeExceptionForm.Show(debuggedProcess, title, message, stacktraceBuilder.ToString(), icon);
DebuggeeExceptionForm.Show(debuggedProcess, title, message, stacktraceBuilder.ToString(), icon, !e.IsUnhandled);
}
public void JumpToCurrentLine()

Loading…
Cancel
Save