AlonsoYSal_FactuGES2/Source/Cliente/uSplash.pas
2019-11-18 10:36:42 +00:00

80 lines
1.5 KiB
ObjectPascal

unit uSplash;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, JvGIF, StdCtrls, uFactuGES_App;
type
TSplashScreen = class(TForm)
Panel1: TPanel;
lblTexto: TLabel;
Image2: TImage;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
end;
TAppSplashForm = class(TInterfacedObject, IAppSplashForm)
private
FSplashScreen: TSplashScreen;
function GetMensaje: String;
procedure SetMensaje(const AMensaje : String);
public
constructor Create;
destructor Destroy; override;
procedure Show;
procedure Hide;
procedure Update;
property Mensaje : String read GetMensaje write SetMensaje;
end;
implementation
{$R *.dfm}
{ TAppSplash }
constructor TAppSplashForm.Create;
begin
FSplashScreen := TSplashScreen.Create(NIL)
end;
destructor TAppSplashForm.Destroy;
begin
FSplashScreen.Release;
inherited;
end;
function TAppSplashForm.GetMensaje: String;
begin
FSplashScreen.lblTexto.Caption;
end;
procedure TAppSplashForm.Hide;
begin
FSplashScreen.Hide;
end;
procedure TAppSplashForm.SetMensaje(const AMensaje: String);
begin
FSplashScreen.lblTexto.Caption := AMensaje;
end;
procedure TAppSplashForm.Show;
begin
FSplashScreen.Show;
end;
procedure TAppSplashForm.Update;
begin
FSplashScreen.Update;
end;
procedure TSplashScreen.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action := caFree;
end;
end.