划分大VC++ .NET GUI 头文件
我继承了一个 GUI,格式为 10,000 行 Visual C++ .NET Form1.h
文件和 3 MB Form1.resx
。前一位作者基本上放下了很多按钮来模拟界面,实现了一些东西,然后就失去了动力。我的任务就是完成它。管理层不想失去他们的“投资”,我也宁愿保留所做的一切。
我能做些什么来将这个怪物分成更小的文件,甚至可能对其进行一些组织吗?现在,它足够大,编辑任务速度很慢。它只会变得更慢。现有功能直接在 Form1.h
文件中实现,因此我最好将操作/事件附加到 UI 元素。
我刚刚弄清楚如何创建新的托管资源文件并复制粘贴 UI 元素,但这不包括某些属性,例如名称或事件。
I've inherited a GUI in the format of a 10,000 line Visual C++ .NET Form1.h
file and 3 megabyte Form1.resx
. The previous author essentially put down lots of buttons to mock up the interface, implemented a few things, and then ran out of steam. My task is to finish it. The management does not want to lose their "investment" on it, and I'd rather keep whatever is done as well.
Is there anything I can do to divide this monster into smaller files, and perhaps even organize it somewhat? Right now, it's large enough that editing tasks are slow. It can only get slower. The existing functionality is implemented directly in the Form1.h
file, so preferably I'd rather keep the actions/events attached to the UI elements.
I just figured out how to create a new managed resource file and copy-paste UI elements, but that doesn't include certain properties such as names, or events.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个有缺陷的立场。扔掉某些东西并重新开始是否是正确的做法取决于还剩下多少工作来完成它,而不是取决于已经完成了多少工作。在这一点上,他们只是在乱花钱。
将现有应用程序视为原型设计并从头开始正确实施它,因为这可能比尝试修复这个怪物更快。
This is a flawed position. Whether it's the right move to throw something out and start over depends on how much work there is left to complete it, not on how much work has already been done. At this point, they're just throwing good money after bad.
Treat the existing application as a prototype design and implement it properly from the ground up, because that will probably be faster than trying to fix up this monstrosity.