简体   繁体   English

将大窗户分成几块

[英]Divide large windows form in pieces

I need to divide a large C# windows form in separate designer-files. 我需要在单独的设计器文件中划分一个大型C#Windows窗体。

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). 该项目包括1种主要形式(绿色)和一些较小,次要的形式(蓝色)。
The main form relies on several classes (Red) which provide Serial and SQL connections. 主要形式依赖于几个提供串行和SQL连接的类(红色)。

The problem: 问题:
The main form has 2422 controls which are constructed by the designer file. 主要形式有2422个控件,这些控件由设计器文件构造。 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 *除了Windows窗体设计器之外,不能使用其他任何东西

You can use UserControls and group the logical stand-alone parts there. 您可以使用UserControls并在其中对逻辑独立部分进行分组。 And load them on request. 并根据要求加载它们。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM