unit uPluginControllerFicherosEDI;

interface

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

type
  IMCFicherosEDI = interface(IInterface)
  ['{D058419C-2EFC-41A6-99DD-76E5B7FC4361}']
  end;

  TModuleFicherosEDI = class(TModuleController, IMCFicherosEDI)
    actCargarFicheros: TAction;
    menu: TMenuItem;
    ExtraImages: TPngImageList;
    LargeImages: TPngImageList;
    MainMenu: TMainMenu;
    ModuleActionList: TActionList;
    Ficheros1: TMenuItem;
    SmallImages: TPngImageList;
    actHistorial: TAction;
    Historialdecargas1: TMenuItem;
    procedure actCargarFicherosExecute(Sender: TObject);
    procedure actHistorialExecute(Sender: TObject);
  public
  end;

implementation

{$R *.dfm}

uses
  Forms, Dialogs, uGUIBase, SysUtils, uAsistenteCargaFicheros,
  uEditorHistorialCargasEDI, uBizEDILog, uDataModuleFicherosEDI;

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

exports
  GetModule name GET_MODULE_FUNC;

procedure TModuleFicherosEDI.actCargarFicherosExecute(Sender: TObject);
begin
  VerAsistenteEtiquetasMontajes;
end;

procedure TModuleFicherosEDI.actHistorialExecute(Sender: TObject);
var
  aControl: IBizEDILog;
  aObj: IEditorHistorialCargasEDI;
begin
  aControl := dmFicherosEDI.GetItems;
  aObj := TfEditorHistorialCargasEDI.Create(Application);
  try
    with aObj do
    begin
      EDILog := aControl;
      ShowEmbedded;
    end;
  finally
    aControl := NIL;
    aObj := NIL;
  end;
end;

initialization
  RegisterModuleClass(TModuleFicherosEDI);

finalization
  UnRegisterModuleClass(TModuleFicherosEDI);

end.
