Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parse C# designer.cs and modify?
Message
From
31/08/2009 09:37:18
 
 
General information
Forum:
ASP.NET
Category:
Forms
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01420050
Message ID:
01421855
Views:
82
>>>Hmm. My experience is otherwise. If you make any change to a form using the designer the generated code is *complelely* rewritten so any change you have made manually is lost.
>>
>>Well, I guess you've only ever changed the *wrong* stuff! <g>
>
>Conversely, I don't think I've ever changed the *right* stuff. Can you give a simple example of where changing anything in the form designer will retain other values in the *.Designer.cs file?
>Regards,
>Viv

PMJI, I parsed the designer.cs file and replaced the boundproperty on over 100 controls. After that, I opened it up in the designer (all my changes were there) and started modifying the controls' appearance and adding code behind where necessary. I've added code behind and saved and rebuilt the project probably 20 times since and there hasn't been a problem yet. We use source control (Team Foundation Server) and can always go back to a previous changeset if necessary, but so far it hasn't been.

I don't know which ones are safe to modify and which are not. I did it all programmatically, not manually. I only know by trying it and then opening it up in the designer and modifying something and then rebuilding and testing it.
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform