--- /dev/null
+// UnexpectedErrorForm.cs\r
+// John Barnette (jbarn@httcb.net)\r
+// \r
+// Copyright (c) 2002 John Barnette\r
+//\r
+// This file is part of Monodoc, a multilingual API documentation tool.\r
+//\r
+// Monodoc is free software; you can redistribute it and/or modify\r
+// it under the terms of the GNU General Public License as published by\r
+// the Free Software Foundation; either version 2 of the License, or\r
+// (at your option) any later version.\r
+// \r
+// Monodoc is distributed in the hope that it will be useful,\r
+// but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+// GNU General Public License for more details.\r
+// \r
+// You should have received a copy of the GNU General Public License\r
+// along with Monodoc; if not, write to the Free Software\r
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\r
+\r
+using System;\r
+using System.Drawing;\r
+using System.Collections;\r
+using System.ComponentModel;\r
+using System.Windows.Forms;\r
+\r
+namespace Mono.Doc.Gui\r
+{\r
+ /// <summary>\r
+ /// Summary description for UnexpectedErrorForm.\r
+ /// </summary>\r
+ public class UnexpectedErrorForm : System.Windows.Forms.Form\r
+ {\r
+ private System.Windows.Forms.PictureBox pictureBoxExplosion;\r
+ private System.Windows.Forms.Label labelErrorExplanation;\r
+ private System.Windows.Forms.TextBox textBoxErrorMessage;\r
+ private System.Windows.Forms.Button buttonExit;\r
+ private System.Windows.Forms.Button buttonSendErrorReport;\r
+ /// <summary>\r
+ /// Required designer variable.\r
+ /// </summary>\r
+ private System.ComponentModel.Container components = null;\r
+\r
+ public UnexpectedErrorForm(Exception e)\r
+ {\r
+ //\r
+ // Required for Windows Form Designer support\r
+ //\r
+ InitializeComponent();\r
+\r
+ //\r
+ // TODO: Add any constructor code after InitializeComponent call\r
+ //\r
+\r
+ this.pictureBoxExplosion.Image = GuiResources.ErrorExplosionBitmap;\r
+\r
+ this.textBoxErrorMessage.Text +=\r
+ "Exception: " + e.GetType().FullName + "\n" +\r
+ "Message: " + e.Message + "\n\n" +\r
+ "Stack Trace: \n" + e.StackTrace + "\n\n";\r
+\r
+ while (e.InnerException != null)\r
+ {\r
+ e = e.InnerException;\r
+ this.textBoxErrorMessage.Text +=\r
+ "--- NESTED EXCEPTION ---\n" +\r
+ "Exception: " + e.GetType().FullName + "\n" +\r
+ "Message: " + e.Message + "\n\n" +\r
+ "Stack Trace: \n" + e.StackTrace + "\n\n";\r
+ }\r
+ }\r
+\r
+ /// <summary>\r
+ /// Clean up any resources being used.\r
+ /// </summary>\r
+ protected override void Dispose( bool disposing )\r
+ {\r
+ if( disposing )\r
+ {\r
+ if(components != null)\r
+ {\r
+ components.Dispose();\r
+ }\r
+ }\r
+ base.Dispose( disposing );\r
+ }\r
+\r
+ #region Windows Form Designer generated code\r
+ /// <summary>\r
+ /// Required method for Designer support - do not modify\r
+ /// the contents of this method with the code editor.\r
+ /// </summary>\r
+ private void InitializeComponent()\r
+ {\r
+ this.pictureBoxExplosion = new System.Windows.Forms.PictureBox();\r
+ this.labelErrorExplanation = new System.Windows.Forms.Label();\r
+ this.textBoxErrorMessage = new System.Windows.Forms.TextBox();\r
+ this.buttonExit = new System.Windows.Forms.Button();\r
+ this.buttonSendErrorReport = new System.Windows.Forms.Button();\r
+ this.SuspendLayout();\r
+ // \r
+ // pictureBoxExplosion\r
+ // \r
+ this.pictureBoxExplosion.Location = new System.Drawing.Point(8, 8);\r
+ this.pictureBoxExplosion.Name = "pictureBoxExplosion";\r
+ this.pictureBoxExplosion.Size = new System.Drawing.Size(65, 64);\r
+ this.pictureBoxExplosion.TabIndex = 0;\r
+ this.pictureBoxExplosion.TabStop = false;\r
+ // \r
+ // labelErrorExplanation\r
+ // \r
+ this.labelErrorExplanation.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right);\r
+ this.labelErrorExplanation.Location = new System.Drawing.Point(96, 8);\r
+ this.labelErrorExplanation.Name = "labelErrorExplanation";\r
+ this.labelErrorExplanation.Size = new System.Drawing.Size(216, 64);\r
+ this.labelErrorExplanation.TabIndex = 1;\r
+ this.labelErrorExplanation.Text = "Kaboom! Monodoc has caught an unexpected exception. Seeing as we\'re in heavy de" +\r
+ "velopment, this is hardly surprising. Relevant debugging information follows.";\r
+ // \r
+ // textBoxErrorMessage\r
+ // \r
+ this.textBoxErrorMessage.AcceptsReturn = true;\r
+ this.textBoxErrorMessage.Location = new System.Drawing.Point(8, 88);\r
+ this.textBoxErrorMessage.Multiline = true;\r
+ this.textBoxErrorMessage.Name = "textBoxErrorMessage";\r
+ this.textBoxErrorMessage.ReadOnly = true;\r
+ this.textBoxErrorMessage.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;\r
+ this.textBoxErrorMessage.Size = new System.Drawing.Size(304, 216);\r
+ this.textBoxErrorMessage.TabIndex = 2;\r
+ this.textBoxErrorMessage.Text = "";\r
+ // \r
+ // buttonExit\r
+ // \r
+ this.buttonExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
+ this.buttonExit.Location = new System.Drawing.Point(104, 312);\r
+ this.buttonExit.Name = "buttonExit";\r
+ this.buttonExit.TabIndex = 3;\r
+ this.buttonExit.Text = "Exit";\r
+ this.buttonExit.Click += new System.EventHandler(this.buttonExit_Click);\r
+ // \r
+ // buttonSendErrorReport\r
+ // \r
+ this.buttonSendErrorReport.DialogResult = System.Windows.Forms.DialogResult.Cancel;\r
+ this.buttonSendErrorReport.Location = new System.Drawing.Point(192, 312);\r
+ this.buttonSendErrorReport.Name = "buttonSendErrorReport";\r
+ this.buttonSendErrorReport.Size = new System.Drawing.Size(117, 23);\r
+ this.buttonSendErrorReport.TabIndex = 4;\r
+ this.buttonSendErrorReport.Text = "Send Error Report";\r
+ this.buttonSendErrorReport.Click += new System.EventHandler(this.buttonSendErrorReport_Click);\r
+ // \r
+ // UnexpectedErrorForm\r
+ // \r
+ this.AcceptButton = this.buttonExit;\r
+ this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);\r
+ this.CancelButton = this.buttonExit;\r
+ this.ClientSize = new System.Drawing.Size(320, 341);\r
+ this.Controls.AddRange(new System.Windows.Forms.Control[] {\r
+ this.buttonSendErrorReport,\r
+ this.buttonExit,\r
+ this.textBoxErrorMessage,\r
+ this.labelErrorExplanation,\r
+ this.pictureBoxExplosion});\r
+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;\r
+ this.MaximizeBox = false;\r
+ this.MinimizeBox = false;\r
+ this.Name = "UnexpectedErrorForm";\r
+ this.Text = "Monodoc Error";\r
+ this.ResumeLayout(false);\r
+\r
+ }\r
+ #endregion\r
+\r
+ private void buttonExit_Click(object sender, System.EventArgs e)\r
+ {\r
+ this.Close();\r
+ }\r
+\r
+ private void buttonSendErrorReport_Click(object sender, System.EventArgs e)\r
+ {\r
+ MessageBox.Show("TODO: This is coming, as soon as I figure out the best " +\r
+ "delivery mechanism. Promise.", "Unimplemented Feature"\r
+ );\r
+ }\r
+ }\r
+}\r