我需要在单独的设计器文件中划分一个大的C#窗体。
我添加了一个类图来表明我的项目的复杂性。 该项目由1个主要形式(绿色)和一些较小的,不太重要的形式(蓝色)组成。 主窗体依赖于几个提供串行和SQL连接的类(Red)。
问题: 主窗体有2422个控件,由设计器文件构成。 这些控件被安排在几个标签页中,这使得可以将表单分成不同的部分。 但是,它们仍然需要以一种形式出现。
完成此任务的最佳方法是什么?
*除了Windows窗体设计器之外,不可能使用任何其他东西
I need to divide a large C# windows form in separate designer-files.
I added a class-diagram to indicate the complexity of my project. The project consists of 1 main form (Green) and some smaller, less important forms (Blue). The main form relies on several classes (Red) which provide Serial and SQL connections.
The problem: The main form has 2422 controls which are constructed by the designer file. These controls are arranged in several tab pages which makes it possible to devide the form in different parts. However, they still need to appear in one form.
What is the best way to accomplish this?
*It is impossible to use anything else than the Windows Forms designer
最满意答案
您可以使用UserControls并将逻辑独立部分分组。 并根据要求加载它们。
You can use UserControls and group the logical stand-alone parts there. And load them on request.
更多推荐
发布评论