Believe that most. netProgramPersonnel have experience in using reconfigurator. For whatever purpose, after a Host Program is decompiled with a recycltorCodeTo modify it, the list in this article may be a useful reference.
After decompiling the code using the filegenerator plug-in of recycltor, you can obtainSource codeBut there are various problems in the code, and it is generally not possible to pass the compilation at a time. The following will discuss these issues in detail:
Enumeration problems
For code readability, it may take some time to check metadata to modify the int value back to the enumerated value. In particular, if you want to use the Form Designer, vs2008 may not understand the int value.
Attribute Problems
For example, after a property called names is decompiled, it may be restored to the set_names (names) and get_names () methods, which may be slow to replace one by one. You can replace it with a regular expression.
The set_xxx (XXX) method can be replaced.
Set _ {[A-Z] *} \ (
Is
\ 1 = (
The get_xxx () method can be replaced.
Get _ {[A-Z] *} \ (\)
Is
\ 1
Then, fix the incorrect methods.
Delegation and callback Functions
It is generally restored to the add_xxx (methodsname) method, and needs to be changed to + = methodsname
Resource problems
Use the resgen.exe tool under the. NET Framework SDK to decompile and embed the *. Resources file into the *. resx file,
Syntax: resgen.exe *. resources *. resx, and then set *. if resx is included in the project, it will automatically file with the same name as the form file *. CS Association. If there is no association, You can first exclude it and then add the big method.
Namespace Problems
If you want to switch to the IDE Form Designer without errors, you also need to add a namespace prefix such as system. Windows. Forms in *. CS.
Form Designer RecognitionProblem
The following code is required:
Componentresourcemanager manager = new componentresourcemanager (typeof (classname ));
Replace
System. componentmodel. componentresourcemanager resources = new system. componentmodel. componentresourcemanager (typeof (classname ));
The Form Designer can be recognized normally.