从 dll 恢复 WinForms

发布于 2024-08-26 00:52:52 字数 254 浏览 3 评论 0原文

我们认为大部分源代码已通过 .NET Reflector 恢复。将 dll 导出为 C# 源的实用程序。

唯一缺少的部分是 WinForms,当 .NET Reflector 导出 dll 源时,它不包含在内。

有什么方法可以让 WinForms 从 dll 中恢复吗?

谢谢。

We think most of the source has been recovered through .NET Reflector. A utility which export the dll as C# source.

The only missing part is WinForms which is not included when .NET Reflector export the dll source.

Is there any way to get the WinForms recover from dll?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

成熟稳重的好男人 2024-09-02 00:52:52

如果它不在 dll 中,则无法将其取出:-)

但可能某些类文件就是您正在搜索的形式。也许您必须将对 System.Windows.Forms.dll 的引用添加到您的项目中。

If it's not in the dll, you can't get it out :-)

But possible some class files are the forms you're searching for. Maybe you have to add a reference to System.Windows.Forms.dll to your project.

李白 2024-09-02 00:52:52

从 Visual Studio 2005 开始,Windows 窗体类是部分类,分为设计器生成的部分 (MyForm.designer.cs) 和实际实现 (MyForm.cs)。当您从头开始创建新表单时,您可以在资源管理器中看到这一点。

为了解决您的问题,您必须以与 Visual Studio 相同的方式拆分 Reflector 导出的类:将 InitializeComponent() 方法和所有控件声明放入 MyForm.designer.cs 文件中并将其余代码放入 MyForm.cs 文件中。

From Visual Studio 2005 on, Windows Forms classes are partial classes split into a Designer generated part (MyForm.designer.cs) and your actual implementation (MyForm.cs). You can see that in Explorer when you create a new Form from scratch.

In order to resolve your problem you would have to split up the class exported by Reflector the same way that Visual Studio does: Place the InitializeComponent() method and all control declarations into the MyForm.designer.cs file and the remaining code into the MyForm.cs file.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文