• 恢复Reflector反编译后资源文件的办法


    反编译问题:

    1.路径问题:如果遇到了Path.Combine,有错误改下即可

    2.资源文件问题:

    在Reflector下,对左边的资源管理窗口的Resources文件夹下的资源文件,进行右键点击,选中"Save as" 选项保存即可。

    例:对于项目文件夹里面的TryAssemb.Form1.resx,首先改为Form1.resx然后移动到TryAssemb目录里面

    3.对窗体打开"视图设计器",发现会出现下面的错误:

    修改方法就是对所有System.Windows.Forms.命名空间里面的控件需要全命名空间的声明,

    例如里面 base.AutoScaleMode = AutoScaleMode.Font;就要改成base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;

    而TextBox textBox1; 也要改成private System.Windows.Forms.TextBox textBox1;这样VS就能识别到这个控件是要绘制在Form上面的

    4.委托和回调函数问题

    一般会被还原为add_Xxx(MethodsName)方法,需要改为 += MethodsName

    5.命名空间问题

    如果需要切换到IDE的窗体设计器,而不出错,则还需要在*.cs中添加比如System.Windows.Forms的命名空间前缀。

    6.窗体设计器识别问题

    需要把以下代码
    ComponentResourceManager manager = new ComponentResourceManager(typeof(ClassName));
    替换为
    System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ClassName));
    窗体设计器才能正常识别。

  • 相关阅读:
    【游戏开发】Excel表格批量转换成CSV的小工具
    iOS
    iOS
    Xcode
    iOS
    iOS
    iOS
    iOS
    iOS
    iOS
  • 原文地址:https://www.cnblogs.com/cncz/p/4040793.html
Copyright © 2020-2023  润新知