学习010-01-02 Modules(模块)

Modules(模块)

XAF modules are similar to standard Class Library projects. The difference is that each module project contains a class that inherits ModuleBase. The presence of such a class allows the XAF core code to distinguish modules from regular .NET assemblies.
XAF模块类似于标准类库项目。不同之处在于,每个模块项目都包含一个继承ModuleBase的类。这样一个类的存在允许XAF核心代码将模块与常规的. NET程序集区分开来。

XAF-specific classes declared within modules are collected automatically (using reflection) and utilized in automatic UI generation. For instance, if you declare a Controller descendant within a module, an XAF application will create it in each Frame. This allows you to implement custom code to be executed when the Controller is activated (see Controllers).
在模块中声明的特定于XAF的类会自动收集(使用反射)并在自动UI生成中使用。例如,如果您在模块中声明一个Controller后代,XAF应用程序将在每个Frame中创建它。这允许您实现自定义代码以在控制器激活时执行(请参阅控制器)。

Create a Custom Module(创建自定义模块)

You are not limited to three modules per solution. Generally, you may implement one custom feature per module. You can also reuse custom modules in other XAF applications. To create a new module, follow the steps below.
每个解决方案不限于三个模块。通常,您可以为每个模块实现一个自定义功能。您还可以在其他XAF应用程序中重用自定义模块。要创建新模块,请按照以下步骤操作。

  • Right-click the application solution root node and select Add | New Project… in the invoked context menu.
    右键单击应用程序解决方案根节点并在调用的上下文菜单中选择添加|新建项目…。
    在这里插入图片描述

  • In the Add New Project dialog, select the DevExpress v24.1 XAF Template Gallery template and click Next.
    在添加新项目对话框中,选择DevExpress v24.1 XAF模板库模板,然后单击下一步。

  • Specify the new module’s name and click Create.
    指定新模块的名称并单击创建。
    在这里插入图片描述

  • In the next window, click Run Wizard.
    在下一个窗口中,单击运行向导。

  • Choose the Reusable Module Library option in the Solution Wizard and press Finish.
    在解决方案向导中选择可重用模块库选项,然后按完成。
    在这里插入图片描述

  • Choose the ORM library.
    选择ORM库。
    在这里插入图片描述

Tip
For additional information on how to choose an ORM that suits your needs, refer to the following topic: Why We Recommend EF Core over XPO for New Development.
有关如何选择适合您需求的ORM的更多信息,请参阅以下主题:为什么我们推荐EF Core而不是XPO进行新开发。

  • Add a reference to the newly added module to the existing module or application project as it is described in the Ways to Register a Module topic.
    将对新添加模块的引用添加到现有模块或应用程序项目,如注册模块的方式主题中所述。

You can also convert an existing Class Library into a module by defining a ModuleBase class descendant in it. For this, take the Module.cs (Module.vb) file from an existing module as a prototype. Rename the class and set a correct namespace.
您还可以通过在现有类库中定义ModuleBase类后代来将其转换为模块。为此,请将现有模块中的Module. cs(Module.vb)文件作为原型。重命名类并设置正确的命名空间。

Important
Inheritance from modules is not recommended. The ModuleBase class descendants should be sealed (NotInheritable in VB).
不建议从模块继承。ModuleBase类的后代应该被密封(VB中的NotInherable)。

Modules Shipped With XAF(XAF附带的模块)

One of the XAF concepts is to use modules (class libraries containing a ModuleBase descendant) to provide additional Controllers, Actions, List Editors, View Items, Application Model nodes and properties. A module can be considered as a ready-to-use package for a certain feature that can be easily enabled when creating an XAF application in the Solution Wizard. In an existing application, additional modules can be added using Application Builders (for .NET) and Toolbox in the Module Designer or Application Designer (for all .NET versions). Topics in this section provide detailed information on each built-in XAF module, module components and ways to use and customize them.
XAF概念之一是使用模块(包含ModuleBase后代的类库)来提供额外的控制器、操作、列表编辑器、视图项、应用程序模型节点和属性。一个模块可以被认为是某个功能的现成包,可以在解决方案向导中创建XAF应用程序时轻松启用。在现有应用程序中,可以使用模块设计器或应用程序设计器(适用于所有。NET版本)中的应用程序生成器(for. NET)和工具箱添加额外的模块。本节中的主题提供了有关每个内置XAF模块、模块组件以及使用和自定义它们的方法的详细信息。

Audit Trail Module

在这里插入图片描述

The Audit Trail module is intended to provide you with information on changes that are being made to the application’s data. You can retrieve information on the kind of change (object is created, changed, etc.), who made this change, with what object, the previous and new property values, and so much more. A change is registered between two sequential events of object saving to a data storage.
审核跟踪模块旨在为您提供有关对应用程序数据所做更改的信息。您可以检索有关更改类型(对象被创建、更改等)、谁进行了此更改、使用了什么对象、以前的和新的属性值等等的信息。更改在对象保存到数据存储的两个连续事件之间注册。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NETCore Blazor、Windows Forms、ASP.NETWeb Forms。

Business Class Library Customization Module

在这里插入图片描述

Provides UI settings (class images, List View columns arrangements and Detail View layouts) for built-in business objects from the Business Class Library.
为业务类库中的内置业务对象提供UI设置(类图像、列表视图列排列和详细视图布局)。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NETCore Blazor、Windows Forms、ASP.NETWeb Forms。

Chart Module

在这里插入图片描述

Provides List Editors that allow you to visualize data using the WinForms Chart Control and ASP.NET Web Forms Chart Control. These controls offer you a comprehensive set of 2D and 3D charts to address a broad range of business needs with ease. The Chart module adopts these controls for XAF applications, so you can easily visualize your data, and integrates the Chart Designer into the Model Editor.
提供列表编辑器,允许您使用WinForms图表控件和ASP.NETWeb窗体图表控件可视化数据。这些控件为您提供一组全面的2D和3D图表,以轻松满足广泛的业务需求。图表模块为XAF应用程序采用这些控件,因此您可以轻松可视化数据,并将图表设计器集成到模型编辑器中。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

Clone Object Module

在这里插入图片描述

Allows end-users to quickly create similar business objects by copying an existing object and changing the required property values. For this purpose, this module provides the CloneObjectViewController that contains the CloneObject Action. When executing this Action, the focused object is cloned.
允许最终用户通过复制现有对象并更改所需的属性值来快速创建类似的业务对象。为此,本模块提供了包含CloneObject Action的CloneObjectViewController。执行此Action时,将克隆焦点对象。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NETCore Blazor、Windows Forms、ASP.NETWeb Forms。

ConditionalAppearance

在这里插入图片描述

Allows you to configure a user interface dynamically. UI customizations are performed on the basis of predefined business rules for control color highlighting, changing availability and visibility, font style, etc. In addition, you can define or modify these rules at runtime without recompiling your application.
允许您动态配置用户交互界面。UI自定义是根据预定义的业务规则执行的,用于控制颜色突出显示、更改可用性和可见性、字体样式等。此外,您可以在运行时定义或修改这些规则,而无需重新编译应用程序。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

Dashboards Module

在这里插入图片描述

Integrates DevExpress Dashboard controls into XAF applications. Allows users to create dashboards at runtime and persist them in the application database.
将DevExpress仪表板控件集成到XAF应用程序中。允许用户在运行时创建仪表板并将它们持久化在应用程序数据库中。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

File Attachments Module

在这里插入图片描述

Provides Property Editors and Controllers that allow users to attach files to business objects using properties of the file data type.
提供属性编辑器和控制器,允许用户使用文件数据类型的属性将文件附加到业务对象。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

KPI Module

在这里插入图片描述

Introduces the support of Key Performance Indicators (KPI) - quantitative measurements of dynamic business processes. For instance, an important performance indicator for a trading company might be daily sales, and for a team of developers it might be the number of active bugs in their product. For better visualization, KPI value ranges can be split into a “green zone” (everything is OK), a “yellow zone” (warning), and a “red zone” (things are problematic). When KPI are based on a time range, it can be useful to compare the values of different periods (for instance, the current month versus the previous month). If a deeper analysis (drilldown) is required, then the objects from which an indicator was calculated can be listed.
介绍关键绩效指标(KPI)的支持——动态业务流程的定量测量。例如,对于一家贸易公司来说,一个重要的绩效指标可能是每日销售额,对于一个开发团队来说,它可能是他们产品中活跃错误的数量。为了更好地可视化,KPI值范围可以分为“绿区”(一切正常)、“黄区”(警告)和“红区”(事情有问题)。当KPI基于一个时间范围时,比较不同时期的值(例如,当前月份与前一个月)会很有用。如果需要更深入的分析(钻取),那么可以列出计算指标的对象。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

Maps Module

在这里插入图片描述

Provides List and Property Editors intended to display business objects on a map.
提供用于在地图上显示业务对象的列表和属性编辑器。

Supported platforms: ASP.NET Web Forms.
支持的平台:ASP.NET Web Forms.

Notifications Module

在这里插入图片描述

Displays reminders for scheduler appointments or any custom business object in Windows Forms and ASP.NET Web Forms applications. At the required time, a pop-up window is automatically invoked. In this window, a user can view alerts, and cancel or delay them for a specified amount of time.
在Windows窗体和ASP.NETWeb窗体应用程序中显示调度程序约会或任何自定义业务对象的提醒。在需要的时间,会自动调用一个弹出窗口。在此窗口中,用户可以查看警报,并取消或延迟指定的时间。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

Office Module

在这里插入图片描述

The Office Module integrates the following DevExpress controls:
Office模块集成了以下DevExpress控件:

  • WinForms Rich Text Editor with Mail Merge support(支持邮件合并的WinForms富文本编辑器)
  • ASP.NET Web Forms Rich Text Editor with Mail Merge support(ASP.NET支持邮件合并的Web窗体富文本编辑器)
  • ASP.NET Core Blazor Rich Text Editor with Mail Merge support(ASP.NET核心Blazor富文本编辑器,支持邮件合并)
  • WinForms Spreadsheet(WinForms电子表格)
  • ASP.NET Web Forms Spreadsheet(ASP.NETWeb窗体电子表格)

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

Pivot Chart Module

在这里插入图片描述

Allows users to analyze application data using pivot grid and chart controls in Windows Forms and ASP.NET Web Forms applications. Analysis configuration created by a user is stored in the application database and thus is available to other users. You can also create predefined analysis.
允许用户在Windows窗体和ASP.NETWeb窗体应用程序中使用透视网格和图表控件分析应用程序数据。用户创建的分析配置存储在应用程序数据库中,因此可供其他用户使用。您还可以创建预定义的分析。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

Pivot Grid Module

在这里插入图片描述

Provides List Editors that allow you to analyze data using the PivotGridControl and ASPxPivotGrid controls (in Windows Forms and ASP.NET Web Forms applications respectively). The Pivot Grid module adopts these controls for XAF applications, so that you can add data analysis functionality with ease, and also integrates the PivotGrid Designer into the Model Editor.
提供列表编辑器,允许您使用数据透视网格控件和ASPxPivotGrid控件(分别在Windows窗体和ASP.NETWeb窗体应用程序中)分析数据。数据透视网格模块为XAF应用程序采用这些控件,因此您可以轻松添加数据分析功能,还将数据透视网格设计器集成到模型编辑器中。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

Reports V2 Module

在这里插入图片描述

Integrates the DevExpress Reporting into XAF applications. Creates a user interface for designing, viewing and printing reports. Both user-defined and built-in reports are represented by business objects that are stored with other persistent objects in the application database.
将DevExpress报告集成到XAF应用程序中。创建用于设计、查看和打印报告的用户交互界面。用户定义和内置报告都由业务对象表示,这些业务对象与应用程序数据库中的其他持久对象一起存储。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

Scheduler Module

在这里插入图片描述

Provides List Editors that integrate the Blazor Scheduler, WinForms Scheduler, and ASP.NET Web Forms Scheduler controls. You can use these controls to present and manage scheduling information in an efficient manner. Various date-time views, multiple resources display, date navigator, end-user capabilities and other features - everything to make your scheduling application simpler and more convenient to use.
提供集成Blazor Scheduler、WinForms Scheduler和ASP.NETWeb Forms Scheduler控件的列表编辑器。您可以使用这些控件以高效的方式呈现和管理调度信息。各种日期时间视图、多种资源显示、日期导航器、最终用户功能和其他功能——一切都使您的调度应用程序更简单,使用更方便。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

Script Recorder Module

在这里插入图片描述

Supplies a script recorder that records the actions you perform on a UI and saves them to an EasyTest script file. You use a set of Actions available in the Tools menu to control the recording process.
提供一个脚本记录器,用于记录您在UI上执行的操作并将它们保存到EasyTest脚本文件中。您使用工具菜单中可用的一组操作来控制录制过程。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

State Machine Module

在这里插入图片描述

Provides a user interface for the state transition management for business objects that have certain states (for example, the Task object, which can be in the NotStarted, InProgress, or Completed state). You can define a set of states and corresponding permitted transitions and associate them with a business class in code or at runtime. Additionally, you can define Conditional Appearance rules and associate them with specific states.
为具有特定状态的业务对象提供状态转换管理的用户交互界面(例如,任务对象,它可以处于NotStarted、InProgress或已完成状态)。您可以定义一组状态和相应的允许转换,并在代码或运行时将它们与业务类相关联。此外,您可以定义条件外观规则并将它们与特定状态相关联。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

TreeList Editors Module

在这里插入图片描述

Provides List Editors that integrate the WinForms Tree List and ASP.NET Web Forms Tree List controls. You can use these controls to display data as a tree, a grid, or a combination of both, regardless of data complexity.
提供集成WinForms树列表和ASP.NETWeb窗体树列表控件的列表编辑器。您可以使用这些控件将数据显示为树、网格或两者的组合,而不管数据的复杂性如何。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台: Windows Forms, ASP.NET Web Forms.

Validation Module

在这里插入图片描述

Allows you to validate user input based on business rules declared in code, at design time, or at runtime.
允许您在设计时或运行时根据代码中声明的业务规则验证用户输入。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

View Variants Module

在这里插入图片描述

Allows you to keep several predefined variants of a View layout in the Application Model and provides an option to switch between these variants at runtime.
允许您在应用程序模型中保留视图布局的几个预定义变体,并提供在运行时在这些变体之间切换的选项。

Supported platforms: ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.
支持的平台:ASP.NET Core Blazor, Windows Forms, ASP.NET Web Forms.

Workflow Module

在这里插入图片描述

Integrates Windows Workflow Foundation (WF) 4.0/4.5 support into XAF. WF is a workflow management framework designed to assist you in creating more manageable, workflow-enabled applications.
将Windows Workflow Foundation(WF)4.0/4.5支持集成到XAF中。WF是一个工作流管理框架,旨在帮助您创建更易于管理、支持工作流的应用程序。

Supported platforms: Windows Forms, ASP.NET Web Forms.
支持的平台:Windows Forms, ASP.NET Web Forms.

Tip
To get more ready-to-use modules, see XAF Community Extensions. 要获得更多即用型模块,请参阅XAF社区扩展。

System Module(系统模块)

Any XAF application includes a System Module. This module cannot be disabled, since it provides a certain basic functionality required in all applications. The System Module enables the following functionality:
任何XAF应用程序都包含一个系统模块。不能禁用此模块,因为它提供了所有应用程序所需的某些基本功能。系统模块启用以下功能:

  • Navigation System
  • Printing
  • Exporting
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

汤姆•猫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值