将大窗户分成几块(Divide large windows form in pieces)

编程入门 行业动态 更新时间:2024-10-26 13:19:48
将大窗户分成几块(Divide large windows form in pieces)

我需要在单独的设计器文件中划分一个大的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.

更多推荐

本文发布于:2023-08-01 07:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1356726.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:几块   窗户   Divide   large   form

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!