复合应用块中的交换模块

发布于 2024-07-17 21:20:41 字数 209 浏览 4 评论 0原文

我是 CAB 框架的新手。 在浏览完示例 GPS 应用程序后,我了解了如何加载单个模块及其视图的显示方式。

我有一个项目,其中有 3 种形式。 我应该为此创建一个具有三个不同视图的单个模块,还是应该为此创建三个不同的模块。

如果我创建三个视图,如何在这些视图之间切换。 如果我要创建三个不同的模块,我如何在这些模块之间切换。

谢谢。

I am new to CAB framework. After going through the sample GPS application I understood how a single module is loaded and its view is displayed.

I have a project in which I have 3 forms. Should I create a single module with three different Views for this or should I create three different modules for this.

If I create three views, how do i Switch between these views. And if I am creating three different Modules, how do i switch between these modules.

thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

单身情人 2024-07-24 21:20:41

如果您总是一起使用这三种形式,请将它们放在同一个模块中。 如果您在给定时间只需要其中一个或两个表单,请将它们放入单独的模块中,以便您可以根据需要仅加载所需的表单。

我不明白你所说的“模块之间切换”到底是什么意思。 如果您参考如何在应用程序启动时选择要加载的模块,则可以通过重写引导程序中的 GetModuleCatalog 方法并在重写的方法中创建模块目录来实现。 如果您的意思是如何在应用程序中的任何点动态加载模块,则可以通过使用容器的 IModuleManager 对象中的 LoadModule 方法来实现。

If you will always use these three forms together, put them in the same module. If you will need only one or two of these forms at a given time, put them in separate modules, so you can load only the forms you need on demand.

I don't understand what you exactly mean by "switch between modules". If you refer to how you select which modules to load at the application start, you do it by overriding the GetModuleCatalog method in the bootstrapper and creating a module catalog inside the overrided method. If you mean how to load modules dinamically at any point in the application, you can do that by using the LoadModule method in the container's IModuleManager object.

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