@ -44,6 +44,10 @@ namespace ICSharpCode.SharpDevelop
@@ -44,6 +44,10 @@ namespace ICSharpCode.SharpDevelop
continueButton . Width = closeButton . Width ;
}
try {
Translate ( this ) ;
} catch { }
exceptionTextBox . Text = getClipboardString ( ) ;
try {
@ -52,6 +56,14 @@ namespace ICSharpCode.SharpDevelop
@@ -52,6 +56,14 @@ namespace ICSharpCode.SharpDevelop
} catch { }
}
void Translate ( Control ctl )
{
ctl . Text = StringParser . Parse ( ctl . Text ) ;
foreach ( Control child in ctl . Controls ) {
Translate ( child ) ;
}
}
string getClipboardString ( )
{
string str = "" ;
@ -159,125 +171,123 @@ namespace ICSharpCode.SharpDevelop
@@ -159,125 +171,123 @@ namespace ICSharpCode.SharpDevelop
void CloseButtonClick ( object sender , EventArgs e )
{
if ( MessageBox . Show ( "Do you really want to quit SharpDevelop?" , "SharpDevelop" , MessageBoxButtons . YesNo , MessageBoxIcon . Question , MessageBoxDefaultButton . Button2 ) = = DialogResult . Yes ) {
if ( MessageBox . Show ( StringParser . Parse ( "${res:ICSharpCode.SharpDevelop.ExceptionBox.QuitWarning}" ) , "SharpDevelop" , MessageBoxButtons . YesNo , MessageBoxIcon . Question , MessageBoxDefaultButton . Button2 ) = = DialogResult . Yes ) {
Application . Exit ( ) ;
}
}
void InitializeComponent ( ) {
void InitializeComponent ( )
{
this . closeButton = new System . Windows . Forms . Button ( ) ;
this . label3 = new System . Windows . Forms . Label ( ) ;
this . label2 = new System . Windows . Forms . Label ( ) ;
this . label = new System . Windows . Forms . Label ( ) ;
this . continueButton = new System . Windows . Forms . Button ( ) ;
this . reportButton = new System . Windows . Forms . Button ( ) ;
this . copyErrorCheckBox = new System . Windows . Forms . CheckBox ( ) ;
this . exceptionTextBox = new System . Windows . Forms . TextBox ( ) ;
this . pictureBox = new System . Windows . Forms . PictureBox ( ) ;
//
// ExceptionBox
//
this . ClientSize = new System . Drawing . Size ( 6 8 8 , 4 5 3 ) ;
closeButton = new System . Windows . Forms . Button ( ) ;
( ( System . ComponentModel . ISupportInitialize ) ( this . pictureBox ) ) . BeginInit ( ) ;
this . SuspendLayout ( ) ;
//
// closeButton
//
closeButton . Location = new System . Drawing . Point ( 4 5 4 , 4 2 4 ) ;
closeButton . Name = "closeButton" ;
closeButton . Size = new System . Drawing . Size ( 1 4 0 , 2 3 ) ;
closeButton . TabIndex = 5 ;
closeButton . Text = "Exit SharpDevelop" ;
closeButton . Click + = new System . EventHandler ( this . CloseButtonClick ) ;
label3 = new System . Windows . Forms . Label ( ) ;
this . closeButton . Location = new System . Drawing . Point ( 4 4 5 , 4 2 4 ) ;
this . closeButton . Name = "closeButton" ;
this . closeButton . Size = new System . Drawing . Size ( 1 4 1 , 2 3 ) ;
this . closeButton . TabIndex = 5 ;
this . closeButton . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.ExitSharpDevelop}" ;
this . closeButton . Click + = new System . EventHandler ( this . CloseButtonClick ) ;
//
// label3
//
label3 . Location = new System . Drawing . Point ( 2 3 2 , 1 5 2 ) ;
label3 . Name = "label3" ;
label3 . Size = new System . Drawing . Size ( 4 4 8 , 2 3 ) ;
label3 . TabIndex = 9 ;
label3 . Text = "Thank you for helping make SharpDevelop a better program for everyone!" ;
label2 = new System . Windows . Forms . Label ( ) ;
this . label3 . Location = new System . Drawing . Point ( 2 3 0 , 1 5 9 ) ;
this . label3 . Name = "label3" ;
this . label3 . Size = new System . Drawing . Size ( 4 4 8 , 2 3 ) ;
this . label3 . TabIndex = 9 ;
this . label3 . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.ThankYouMsg}" ;
//
// label2
//
label2 . Location = new System . Drawing . Point ( 2 3 2 , 6 4 ) ;
label2 . Name = "label2" ;
label2 . Size = new System . Drawing . Size ( 4 4 8 , 8 0 ) ;
label2 . TabIndex = 8 ;
label2 . Text = "How to report errors efficiently: We have set up a Web-based forum to report and track errors that are reported by users of SharpDevelop. To minimize necessary questions by the team members, in addition to providing the error message that is copied to the clipboard for easier pasting in the error report, we ask that you provide us with an as detailed as possible step-by-step procedure to reproduce this bug." ;
label = new System . Windows . Forms . Label ( ) ;
this . label2 . Location = new System . Drawing . Point ( 2 3 2 , 6 4 ) ;
this . label2 . Name = "label2" ;
this . label2 . Size = new System . Drawing . Size ( 4 4 8 , 9 5 ) ;
this . label2 . TabIndex = 8 ;
this . label2 . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.HelpText2}" ;
//
// label
//
label . Location = new System . Drawing . Point ( 2 3 2 , 8 ) ;
label . Name = "label" ;
label . Size = new System . Drawing . Size ( 4 4 8 , 4 8 ) ;
label . TabIndex = 6 ;
label . Text = "An unhandled exception has occurred in SharpDevelop. This is unexpected and we\'d " +
"ask you to help us improve SharpDevelop by reporting this error to the SharpDeve" +
"lop team." ;
continueButton = new System . Windows . Forms . Button ( ) ;
this . label . Location = new System . Drawing . Point ( 2 3 2 , 8 ) ;
this . label . Name = "label" ;
this . label . Size = new System . Drawing . Size ( 4 4 8 , 4 8 ) ;
this . label . TabIndex = 6 ;
this . label . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.HelpText1}" ;
//
// continueButton
//
continueButton . Location = new System . Drawing . Point ( 6 0 0 , 4 2 4 ) ;
continueButton . Name = "continueButton" ;
continueButton . Size = new System . Drawing . Size ( 7 5 , 2 3 ) ;
continueButton . TabIndex = 6 ;
continueButton . Text = "Continue" ;
continueButton . Click + = new System . EventHandler ( this . continueButtonClick ) ;
reportButton = new System . Windows . Forms . Button ( ) ;
this . continueButton . Location = new System . Drawing . Point ( 5 9 2 , 4 2 4 ) ;
this . continueButton . Name = "continueButton" ;
this . continueButton . Size = new System . Drawing . Size ( 8 8 , 2 3 ) ;
this . continueButton . TabIndex = 6 ;
this . continueButton . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.Continue}" ;
this . continueButton . Click + = new System . EventHandler ( this . continueButtonClick ) ;
//
// reportButton
//
reportButton . Location = new System . Drawing . Point ( 2 3 2 , 4 2 4 ) ;
reportButton . Name = "reportButton" ;
reportButton . Size = new System . Drawing . Size ( 2 1 6 , 2 3 ) ;
reportButton . TabIndex = 4 ;
reportButton . Text = "Report Error to SharpDevelop Team" ;
reportButton . Click + = new System . EventHandler ( this . buttonClick ) ;
copyErrorCheckBox = new System . Windows . Forms . CheckBox ( ) ;
this . reportButton . Location = new System . Drawing . Point ( 2 3 0 , 4 2 4 ) ;
this . reportButton . Name = "reportButton" ;
this . reportButton . Size = new System . Drawing . Size ( 2 0 9 , 2 3 ) ;
this . reportButton . TabIndex = 4 ;
this . reportButton . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.ReportError}" ;
this . reportButton . Click + = new System . EventHandler ( this . buttonClick ) ;
//
// copyErrorCheckBox
//
copyErrorCheckBox . Checked = true ;
copyErrorCheckBox . CheckState = System . Windows . Forms . CheckState . Checked ;
copyErrorCheckBox . Location = new System . Drawing . Point ( 2 3 2 , 3 6 8 ) ;
copyErrorCheckBox . Name = "copyErrorCheckBox" ;
copyErrorCheckBox . Size = new System . Drawing . Size ( 4 4 0 , 2 4 ) ;
copyErrorCheckBox . TabIndex = 2 ;
copyErrorCheckBox . Text = "Copy error message to clipboard" ;
exceptionTextBox = new System . Windows . Forms . TextBox ( ) ;
this . copyErrorCheckBox . Checked = true ;
this . copyErrorCheckBox . CheckState = System . Windows . Forms . CheckState . Checked ;
this . copyErrorCheckBox . Location = new System . Drawing . Point ( 2 3 0 , 3 7 3 ) ;
this . copyErrorCheckBox . Name = "copyErrorCheckBox" ;
this . copyErrorCheckBox . Size = new System . Drawing . Size ( 4 4 0 , 2 4 ) ;
this . copyErrorCheckBox . TabIndex = 2 ;
this . copyErrorCheckBox . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.CopyToClipboard}" ;
//
// exceptionTextBox
//
exceptionTextBox . Location = new System . Drawing . Point ( 2 3 2 , 1 7 6 ) ;
exceptionTextBox . Multiline = true ;
exceptionTextBox . Name = "exceptionTextBox" ;
exceptionTextBox . ReadOnly = true ;
exceptionTextBox . ScrollBars = System . Windows . Forms . ScrollBars . Vertical ;
exceptionTextBox . Size = new System . Drawing . Size ( 4 4 8 , 1 8 4 ) ;
exceptionTextBox . TabIndex = 1 ;
exceptionTextBox . Text = "textBoxExceptionText" ;
pictureBox = new System . Windows . Forms . PictureBox ( ) ;
( ( System . ComponentModel . ISupportInitialize ) ( pictureBox ) ) . BeginInit ( ) ;
this . exceptionTextBox . Location = new System . Drawing . Point ( 2 3 0 , 1 8 3 ) ;
this . exceptionTextBox . Multiline = true ;
this . exceptionTextBox . Name = "exceptionTextBox" ;
this . exceptionTextBox . ReadOnly = true ;
this . exceptionTextBox . ScrollBars = System . Windows . Forms . ScrollBars . Vertical ;
this . exceptionTextBox . Size = new System . Drawing . Size ( 4 4 8 , 1 8 4 ) ;
this . exceptionTextBox . TabIndex = 1 ;
this . exceptionTextBox . Text = "textBoxExceptionText" ;
//
// pictureBox
//
pictureBox . Location = new System . Drawing . Point ( 0 , 0 ) ;
pictureBox . Name = "pictureBox" ;
pictureBox . Size = new System . Drawing . Size ( 2 2 4 , 4 6 4 ) ;
pictureBox . TabIndex = 0 ;
pictureBox . TabStop = false ;
( ( System . ComponentModel . ISupportInitialize ) ( pictureBox ) ) . EndInit ( ) ;
this . Controls . Add ( closeButton ) ;
this . Controls . Add ( label3 ) ;
this . Controls . Add ( label2 ) ;
this . Controls . Add ( label ) ;
this . Controls . Add ( continueButton ) ;
this . Controls . Add ( reportButton ) ;
this . Controls . Add ( copyErrorCheckBox ) ;
this . Controls . Add ( exceptionTextBox ) ;
this . Controls . Add ( pictureBox ) ;
this . pictureBox . Location = new System . Drawing . Point ( 0 , 0 ) ;
this . pictureBox . Name = "pictureBox" ;
this . pictureBox . Size = new System . Drawing . Size ( 2 2 4 , 4 6 4 ) ;
this . pictureBox . TabIndex = 0 ;
this . pictureBox . TabStop = false ;
//
// ExceptionBox
//
this . ClientSize = new System . Drawing . Size ( 6 8 8 , 4 5 3 ) ;
this . Controls . Add ( this . closeButton ) ;
this . Controls . Add ( this . label3 ) ;
this . Controls . Add ( this . label2 ) ;
this . Controls . Add ( this . label ) ;
this . Controls . Add ( this . continueButton ) ;
this . Controls . Add ( this . reportButton ) ;
this . Controls . Add ( this . copyErrorCheckBox ) ;
this . Controls . Add ( this . exceptionTextBox ) ;
this . Controls . Add ( this . pictureBox ) ;
this . FormBorderStyle = System . Windows . Forms . FormBorderStyle . FixedDialog ;
this . MaximizeBox = false ;
this . MinimizeBox = false ;
this . Name = "ExceptionBox" ;
this . Text = "Unhandled exception has occured " ;
this . SuspendLayou t( ) ;
this . Text = "${res:ICSharpCode.SharpDevelop.ExceptionBox.Title} " ;
( ( System . ComponentModel . ISupportInitialize ) ( this . pictureBox ) ) . EndIni t( ) ;
this . ResumeLayout ( false ) ;
this . PerformLayout ( ) ;
}