[英]Add one winform to another project
I have 3 projects, I want to merge the winforms in each project into one project. 我有3个项目,我想将每个项目中的winforms合并到一个项目中。 How can I do it? 我该怎么做?
First you need to analyse if forms in those 3 projects has any not standard dependencies (references to libraries). 首先,您需要分析这3个项目中的表单是否具有任何非标准依赖性(对库的引用)。 Then you can create new project, add library references from other projects, drag and drop files from old projects to new project, fix namespaces (or preserve them so you dont have collision between similar forms or names from different projects) 然后,您可以创建新项目,添加其他项目中的库引用,将旧项目中的文件拖放到新项目中,修复名称空间(或保留它们,以使不同项目的相似形式或名称之间不会发生冲突)
Straightforward approach would be: 简单的方法是:
If you haven't used it before, JetBrain's Resharper could be very useful for you in this case. 如果您以前从未使用过它,在这种情况下,JetBrain的Resharper可能对您非常有用。
To rename the namespace, click on the namespace on the class and hit F2 (hope it works without Resharper). 要重命名名称空间,请在类上单击名称空间,然后按F2(希望它在没有Resharper的情况下可以工作)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.