划分大VC++ .NET GUI 头文件

发布于 2024-10-12 15:18:59 字数 357 浏览 3 评论 0原文

我继承了一个 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 技术交流群。

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

发布评论

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

评论(1

帅气尐潴 2024-10-19 15:18:59

管理层不想失去对此的“投资”

这是一个有缺陷的立场。扔掉某些东西并重新开始是否是正确的做法取决于还剩下多少工作来完成它,而不是取决于已经完成了多少工作。在这一点上,他们只是在乱花钱。

将现有应用程序视为原型设计并从头开始正确实施它,因为这可能比尝试修复这个怪物更快

The management does not want to lose their "investment" on it

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.

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