unit uPluginControllerObras;

interface

uses
  uModuleController, uInterfaces, uHostManager, Menus, Classes, ActnList,
  ImgList, Controls, PngImageList;

type
  IMCObras = interface(IInterface)
  ['{7C0AF9EB-AB6B-4DAC-A984-DF58D1F6F28D}']
  end;

  TModuleObras = class(TModuleController, IMCObras)
    actObras: TAction;
    Obras: TMenuItem;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    Obras1: TMenuItem;
    SmallImages: TPngImageList;
    procedure actObrasExecute(Sender: TObject);
  end;

implementation

{$R *.dfm}
uses
  Forms, Dialogs, uGUIBase, uCustomEditor,
  SysUtils, uEditorObras, uDataModuleObras, uBizObra;

function GetModule : TModuleController;
begin
  Result := TModuleObras.Create(NIL);
end;

exports
  GetModule name GET_MODULE_FUNC;

{
******************************* TModuleObras *******************************
}

procedure TModuleObras.actObrasExecute(Sender: TObject);
var
  aObj: IEditorObras;
  aObras: IBizObra;
begin
  aObras := dmObras.GetItems;
  aObj := TfEditorObras.Create(Application);
  try
    with aObj do
    begin
      Obras := aObras;
      ShowEmbedded;
    end;
  finally
    aObras := NIL;
    aObj := NIL;
  end;
end;

initialization
  RegisterModuleClass(TModuleObras);

finalization
  UnRegisterModuleClass(TModuleObras);

end.
