|
|
|
@ -28,19 +28,23 @@ namespace ICSharpCode.SharpDevelop.Services
@@ -28,19 +28,23 @@ namespace ICSharpCode.SharpDevelop.Services
|
|
|
|
|
private ExceptionForm() |
|
|
|
|
{ |
|
|
|
|
InitializeComponent(); |
|
|
|
|
this.Text = StringParser.Parse(this.Text); |
|
|
|
|
buttonContinue.Text = StringParser.Parse(buttonContinue.Text); |
|
|
|
|
buttonIgnore.Text = StringParser.Parse(buttonIgnore.Text); |
|
|
|
|
buttonBreak.Text = StringParser.Parse(buttonBreak.Text); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Result Show(Debugger.Exception exception) |
|
|
|
|
{ |
|
|
|
|
ExceptionForm form = new ExceptionForm(); |
|
|
|
|
form.textBox.Text = "Exception " + |
|
|
|
|
exception.Type + |
|
|
|
|
" was thrown in debugee:\r\n" + |
|
|
|
|
exception.Message + "\r\n\r\n" + |
|
|
|
|
exception.Callstack.Replace("\n","\r\n"); |
|
|
|
|
form.pictureBox.Image = ResourceService.GetBitmap((exception.ExceptionType != ExceptionType.DEBUG_EXCEPTION_UNHANDLED)?"Icons.32x32.Warning":"Icons.32x32.Error"); |
|
|
|
|
form.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); |
|
|
|
|
return form.result; |
|
|
|
|
using (ExceptionForm form = new ExceptionForm()) { |
|
|
|
|
form.textBox.Text = |
|
|
|
|
ResourceService.GetString("MainWindow.Windows.Debug.ExceptionForm.Message").Replace("{0}", exception.Type) + "\r\n" + |
|
|
|
|
exception.Message + "\r\n\r\n" + |
|
|
|
|
exception.Callstack.Replace("\n","\r\n"); |
|
|
|
|
form.pictureBox.Image = ResourceService.GetBitmap((exception.ExceptionType != ExceptionType.DEBUG_EXCEPTION_UNHANDLED)?"Icons.32x32.Warning":"Icons.32x32.Error"); |
|
|
|
|
form.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm); |
|
|
|
|
return form.result; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#region Windows Forms Designer generated code
|
|
|
|
@ -65,7 +69,7 @@ namespace ICSharpCode.SharpDevelop.Services
@@ -65,7 +69,7 @@ namespace ICSharpCode.SharpDevelop.Services
|
|
|
|
|
this.buttonBreak.Name = "buttonBreak"; |
|
|
|
|
this.buttonBreak.Size = new System.Drawing.Size(91, 32); |
|
|
|
|
this.buttonBreak.TabIndex = 0; |
|
|
|
|
this.buttonBreak.Text = "Break"; |
|
|
|
|
this.buttonBreak.Text = "${res:XML.MainMenu.DebugMenu.Break}"; |
|
|
|
|
this.buttonBreak.Click += new System.EventHandler(this.buttonBreak_Click); |
|
|
|
|
//
|
|
|
|
|
// pictureBox
|
|
|
|
@ -80,12 +84,12 @@ namespace ICSharpCode.SharpDevelop.Services
@@ -80,12 +84,12 @@ namespace ICSharpCode.SharpDevelop.Services
|
|
|
|
|
// buttonIgnore
|
|
|
|
|
//
|
|
|
|
|
this.buttonIgnore.Anchor = System.Windows.Forms.AnchorStyles.Bottom; |
|
|
|
|
this.buttonIgnore.Enabled = true; |
|
|
|
|
this.buttonIgnore.DialogResult = System.Windows.Forms.DialogResult.Cancel; |
|
|
|
|
this.buttonIgnore.Location = new System.Drawing.Point(372, 160); |
|
|
|
|
this.buttonIgnore.Name = "buttonIgnore"; |
|
|
|
|
this.buttonIgnore.Size = new System.Drawing.Size(91, 32); |
|
|
|
|
this.buttonIgnore.TabIndex = 2; |
|
|
|
|
this.buttonIgnore.Text = "Ignore"; |
|
|
|
|
this.buttonIgnore.Text = "${res:Global.IgnoreButtonText}"; |
|
|
|
|
this.buttonIgnore.Click += new System.EventHandler(this.buttonIgnore_Click); |
|
|
|
|
//
|
|
|
|
|
// buttonContinue
|
|
|
|
@ -95,26 +99,26 @@ namespace ICSharpCode.SharpDevelop.Services
@@ -95,26 +99,26 @@ namespace ICSharpCode.SharpDevelop.Services
|
|
|
|
|
this.buttonContinue.Name = "buttonContinue"; |
|
|
|
|
this.buttonContinue.Size = new System.Drawing.Size(91, 32); |
|
|
|
|
this.buttonContinue.TabIndex = 1; |
|
|
|
|
this.buttonContinue.Text = "Continue"; |
|
|
|
|
this.buttonContinue.Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.Continue}"; |
|
|
|
|
this.buttonContinue.Click += new System.EventHandler(this.buttonContinue_Click); |
|
|
|
|
//
|
|
|
|
|
// label
|
|
|
|
|
// textBox
|
|
|
|
|
//
|
|
|
|
|
this.textBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
|
|
|
|
| System.Windows.Forms.AnchorStyles.Left) |
|
|
|
|
| System.Windows.Forms.AnchorStyles.Right))); |
|
|
|
|
| System.Windows.Forms.AnchorStyles.Left) |
|
|
|
|
| System.Windows.Forms.AnchorStyles.Right))); |
|
|
|
|
this.textBox.Location = new System.Drawing.Point(91, 16); |
|
|
|
|
this.textBox.Name = "textBox"; |
|
|
|
|
this.textBox.Multiline = true; |
|
|
|
|
this.textBox.WordWrap = false; |
|
|
|
|
this.textBox.Name = "textBox"; |
|
|
|
|
this.textBox.ReadOnly = true; |
|
|
|
|
this.textBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; |
|
|
|
|
this.textBox.Size = new System.Drawing.Size(528, 138); |
|
|
|
|
this.textBox.TabIndex = 4; |
|
|
|
|
this.textBox.Text = ""; |
|
|
|
|
this.textBox.ScrollBars = ScrollBars.Both; |
|
|
|
|
this.textBox.WordWrap = false; |
|
|
|
|
//
|
|
|
|
|
// ExceptionForm
|
|
|
|
|
//
|
|
|
|
|
this.CancelButton = this.buttonIgnore; |
|
|
|
|
this.ClientSize = new System.Drawing.Size(638, 203); |
|
|
|
|
this.Controls.Add(this.textBox); |
|
|
|
|
this.Controls.Add(this.pictureBox); |
|
|
|
@ -125,27 +129,27 @@ namespace ICSharpCode.SharpDevelop.Services
@@ -125,27 +129,27 @@ namespace ICSharpCode.SharpDevelop.Services
|
|
|
|
|
this.MinimizeBox = false; |
|
|
|
|
this.Name = "ExceptionForm"; |
|
|
|
|
this.ShowInTaskbar = false; |
|
|
|
|
this.Text = "Exception"; |
|
|
|
|
this.Text = "${res:MainWindow.Windows.Debug.ExceptionHistory.Exception}"; |
|
|
|
|
this.TopMost = true; |
|
|
|
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); |
|
|
|
|
this.ResumeLayout(false); |
|
|
|
|
|
|
|
|
|
this.PerformLayout(); |
|
|
|
|
} |
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
private void buttonBreak_Click(object sender, System.EventArgs e) |
|
|
|
|
private void buttonBreak_Click(object sender, System.EventArgs e) |
|
|
|
|
{ |
|
|
|
|
result = Result.Break; |
|
|
|
|
Close(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void buttonContinue_Click(object sender, System.EventArgs e) |
|
|
|
|
private void buttonContinue_Click(object sender, System.EventArgs e) |
|
|
|
|
{ |
|
|
|
|
result = Result.Continue; |
|
|
|
|
Close(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void buttonIgnore_Click(object sender, System.EventArgs e) |
|
|
|
|
private void buttonIgnore_Click(object sender, System.EventArgs e) |
|
|
|
|
{ |
|
|
|
|
result = Result.Ignore; |
|
|
|
|
Close(); |
|
|
|
|