Thanks for your comprehension and enjoy CoolSoft.
DeCodEx stands for Designer Code Extractor.
If you are using the new .NET Framework 2.0, I hope you know about the existance of Partial Types.
Partial types allows you to split the definition and implementation of a class or a struct across multiple files.
You can put one part of a class in one file and another part of the class in a different file by using the new partial keyword
VisualStudio 2005/2008 itself uses partial types to manage Form and UserControl sources, separing Designer code from User code.
This is a better solution, if compared with the old #Region...#End Region used in VisualStudio 2002/2003.
OK, we all agree on this but... have you ever tried to convert a .NET 1.1 project to 2.0?
The conversion usually completes smootly, depending on how well was the old code written (VS2005 is more meticolous regarding type-conversions and Object usage).
Anyway, during the conversion, Forms and UserControls are not splitted to the new (so called) Designer+User format.
Since I was tired having all of my user code mixed with VisualStudio one, I created DeCodEx to split an old-style source file into User+Designer partial files.
Splitting is accomplished by moving regions, fields and methods from the original Form1.vb (or .cs) to the new Form1.Designer.vb (.cs) file.
Moved blocks can be even left commented in the original file (see picture below).
- given a project file, you can select which Forms / UserControls will be converted
- source code is parsed with a compiler-like parser; no Regular Expressions are used to ensure better results
- VB.NET and C# sources are fully supported
- C# fields were declared outside the #region; DeCodEx parses those fields type and moves only the ones derived from Control or Component
- splitting is done in a safe way, no lines were dropped: each original line will appear in Designer or in User file
- you can set force DeCodEx to leave the orinigal lines as commented in the original source file; a special line comment prefix will be added, allowing you to remove these lines afterward
- could create a backup of your project before starting conversion
- detailed activity log and error management
- can be run outside VisualStudio
Here you can see the result after the splitting (click to see the full image):
ver. 1.1.0 - (22 Feb 2012)
- NEW: Added support for VS2001 projects. NEW: Added support for multiple classes into the same source file.
ver. 1.0.0 - (12 Jan 2009)
- FIX:Attributes applied to class level are not duplicated in .designer file anymore. They will appear in user file only (thanks to Steve Schoon).
ver. 0.9.7 - (18 Oct 2008)
- NEW: While adding project items, DeCodEx tests if file is missing, readonly or the corresponding .designer file already exists; if one of these conditions is true, the item can't be selected and drawn in red. This could help if your sources are coming from SourceSafe (thanks to Paul).
- NEW: Main dialog now saves its size and position.
ver. 0.9.6 - (21 May 2008)
- FIX: Fixed a bug reading source files which contain extended ASCII chars, like German umlaute (üöä...) which causes this chars to be replaced by squares (thanks to Petra).
ver. 0.9.5 - (21 Apr 2008)
- User can now add his own "Windows Form Designer" region names, if its locale is not (still) supported.
They are loaded from two files (inside bin folder):
- RegionNames.txt contains "official" localizations and is mantained by CoolSoft; it'll be updated at each new version of DeCodEx; DO NOT EDIT THIS FILE.
- RegionNames.user.txt contains user customized names and won't be touched by setup procedure.
Again, please send me your localized names and I'll add them to official ones.
ver. 0.9.4 - (14 Apr 2008)
- NEW: "Windows Form Designer" region name is localized (still wondering why >:-) ).
DeCodEx now recognizes this name (and the corresponding UserControl one) in localized version of VisualStudio; currently supported locales are:
ENG: "Windows Form Designer generated code"
ITA: "Codice generato da Progettazione Windows Form" (thanks to Paolo)
Send me region names of your unsupported locale...
- NEW: Log only supported project items (Forms and UserControls).
- NEW: Log all movable-types (types that DeCodEx will move to Designer file).
- FIX: C# form (and user control) constructors are wrongly moved to *.Designer.cs file (thanks to Michael).
ver. 0.9.3 - (28 Feb 2008)
- NEW: In case of code parsing errors, they are reported into log for further investigation ver. 0.9.2 - (28 Feb 2008)
- NEW: Argument exception in frmMain.vb:line 83 while parsing project (reported by Dan Sifuentes)
ver. 0.9.1 - (27 Feb 2008)
- NEW: Menu item to check for new version
- FIX: Some cosmetic fixes to GUI
ver. 0.9.0 - (01 Feb 2008)
- First public release
Warning, advertise blocker detected!
CoolSoft is supported by donations and a few (and non-intrusive) banners.
Thanks for your comprehension and enjoy CoolSoft.
Click here if you want to support CoolSoft: