| Author |
Message |
Eaton
Joined: 18 May 2010 Posts: 16
|
Posted: Mon Jun 21, 2010 5:51 am Post subject: Problem with SDK |
|
|
To make a long story short, I was fiddling with your SDK and trying to make a new UI for the exception reporter. It was going well until I actually tested it. It would apparently throw an exception in the InitializeComponent(); method and basically crash the error reporter.
So, after some long hours of debugging using message boxes, I found the problem line:
| Code: |
| System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExceptionReportingForm)); |
resources is used to grab some text for some controls and such like this:
| Code: |
| this.TellMessageLabel.Text = resources.GetString("TellMessageLabel.Text"); |
I tried setting the text manually, but it just reset when I viewed the designer again.
Any idea why it is crashing when it tries to initialize that resource manager? |
|
| Back to top |
|
 |
Paul.Martin
Joined: 03 Feb 2010 Posts: 83 Location: Cambridgeshire
|
Posted: Fri Jun 25, 2010 3:39 pm Post subject: |
|
|
Sorry for taking a week to reply to this one, not quite sure how I missed it.
Did you start from one of the samples and edit the forms from there or did you start from scratch?
I know when I was having a play around with the samples I had a similar problem, but for that as soon as I added a resource in the Visual Studio (2010) designer everything worked.
The samples are designed for compatibility with all framework versions so the forms do not have individual resource files (they became standard in VS 2005 with the partial classes allowing forms to be kept in 3 seperate files).
If the individual resource file for the form hasn't been created by Visual Studio (or yourself), then the call to
| Code: |
| System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ExceptionReportingForm)); |
will fail as the ResourceManager will start off trying to resolve the ExceptionReportingForm.resource namespace. |
|
| Back to top |
|
 |
Eaton
Joined: 18 May 2010 Posts: 16
|
Posted: Fri Jun 25, 2010 5:20 pm Post subject: |
|
|
I am customizing the error reporter here: C:\Program Files\Red Gate\SmartAssembly 5\SDK\Exception Reporting\3 Custom UI
Using DevExpress components. And yes, to make it cleaner, I put all the the initialization stuff in the Designer.cs, which I had to create.
But I will try to add a resource and see if it works. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group