unit uPluginControllerStock; interface uses uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList, ImgList, Controls, PngImageList; type IMCStock = interface(IInterface) ['{52C5C467-6FBE-476C-BE2A-A97D2752526C}'] end; TModuleStock = class(TModuleController, IMCStock) actStockEdi: TAction; menu: TMenuItem; ExtraImages: TPngImageList; LargeImages: TPngImageList; MainMenu: TMainMenu; ModuleActionList: TActionList; Stock1: TMenuItem; SmallImages: TPngImageList; actStockVarela: TAction; Stock2: TMenuItem; procedure actStockEdiExecute(Sender: TObject); procedure actStockVarelaExecute(Sender: TObject); public end; implementation {$R *.dfm} uses Forms, Dialogs, uGUIBase, SysUtils, uEditorControlesBase, uDataModuleStock, uEditorControlStockEDI, uBizStock, cxControls, uEditorControlStockVARELA; function GetModule : TModuleController; begin Result := TModuleStock.Create(NIL); end; exports GetModule name GET_MODULE_FUNC; { ******************************* TModuleContactos ******************************* } procedure TModuleStock.actStockEdiExecute(Sender: TObject); var aControl: IBizStockEDI; aObj: IEditorControlStockEDI; begin //aControl := dmStock.GetItemsStockEDI; aObj := TfEditorControlStockEDI.Create(Application); try with aObj do begin //Items := aControl; ShowEmbedded; end; finally aControl := NIL; aObj := NIL; end; end; procedure TModuleStock.actStockVarelaExecute(Sender: TObject); var aControl: IBizStockVARELA; aObj: IEditorControlStockVARELA; begin aControl := dmStock.GetItemsStockVARELA; aObj := TfEditorControlStockVARELA.Create(Application); try with aObj do begin Items := aControl; ShowEmbedded; end; finally aControl := NIL; aObj := NIL; end; end; initialization RegisterModuleClass(TModuleStock); finalization UnRegisterModuleClass(TModuleStock); end.