Module Introduction
Coding Style wiki
Basic Introduction
The event delegation center allows you to implement your own TClass registration type, and then have a custom management class inherit from CenterBase<TCenter, TClass> to implement simple event dispatching. The following are provided by default.
How to Use
Default API
public static void Add<UClass>() where UClass : TClass, new()
public static void Add<UClass>(int id) where UClass : TClass, new()
public static void Add(int id, TClass @class)
public static void Delete<UClass>() where UClass : TClass
public static void Delete(int id)
public static void DeleteAll()
public static UClass Find<UClass>() where UClass : TClass
public static UClass Find<UClass>(int id) where UClass : TClass
EventCenter
Centralized Event Integration Module allows you to define the format of each Event for dispatch (you can also list event IDs for planning to fill out in a form with registered IDs, and then retrieve event IDs from the table for dispatch).
- TClass: EventBase, the base class for a single Event, which can be created by right-clicking (Right-click in the Project window -> Create -> OxGFrame -> Center Frame -> Event Center -> Template Event.cs).
- TCenter: EventCenter, used for inheritance management, mainly for the registration phase, created by right-clicking (Right-click in the Project window -> Create -> OxGFrame -> Center Frame -> Event Center -> Template EventCenter.cs).
- Use the Default API for Find calls.
APICenter
Centralized API integration module that allows customization of each API's format for short-lived HTTP API requests. It effectively manages various API formats using Acax (similar to Ajax for API requests).
- TClass: APIBase, the base class for a single API, created via right-click (Right-click in Project window -> Create -> OxGFrame -> Center Frame -> API Center -> Template API.cs).
- TCenter: APICenter, used for inheritance management, mainly for the registration phase, created via right-click (Right-click in Project window -> Create -> OxGFrame -> Center Frame -> API Center -> Template APICenter.cs).
- Use Default API for Find calls.