unit uAcercaDe;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, JvGIF, ExtCtrls, JvExControls, JvComponent, JvGradient, StdCtrls,
  uHostManager;

type
  TfAcercaDe = class(TForm)
    JvGradient1: TJvGradient;
    Panel1: TPanel;
    Bevel1: TBevel;
    bAceptar: TButton;
    memModulos: TMemo;
    Image1: TImage;
    procedure FormShow(Sender: TObject);
  private
    FHostManager: THostManager;
  public
    property HostManager : THostManager read FHostManager write FHostManager;
  end;

var
  fAcercaDe: TfAcercaDe;

implementation

{$R *.dfm}

uses JclFileUtils;

procedure TfAcercaDe.FormShow(Sender: TObject);
var
  i : integer;
  Obj : TJclFileVersionInfo;
begin
  memModulos.Lines.Clear;

  Obj := TJclFileVersionInfo.Create(Application.ExeName);
  try
    with Obj do
    begin
      memModulos.Lines.Add(ProductName + ' - Versión ' + FileVersion);
      memModulos.Lines.Add(CompanyName);
      memModulos.Lines.Add('');
    end;
  finally
    FreeAndNil(Obj);
  end;

  if Assigned(FHostManager) then
  begin
    memModulos.Lines.Add('');
    memModulos.Lines.Add('');
    memModulos.Lines.Add('Módulos disponibles:');
    for i := 0 to (HostManager.ModulesCount - 1) do
      memModulos.Lines.Add('  - ' + FHostManager.Modules[i].Module.ModuleName +
        ' - v. ' + FHostManager.Modules[i].Module.Version);
  end;
end;

end.
