-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuSplash.pas
More file actions
89 lines (72 loc) · 2.11 KB
/
uSplash.pas
File metadata and controls
89 lines (72 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
unit uSplash;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Edit,
FMX.Objects, FMX.Controls.Presentation, FMX.StdCtrls, FMX.Layouts, FMX.Ani;
type
TFrmSplash = class(TForm)
LoBase: TLayout;
RBackground: TRectangle;
LoCorpo: TLayout;
Layout1: TLayout;
Layout2: TLayout;
Layout3: TLayout;
LblDesenvolvedor: TLabel;
LblVersao: TLabel;
LoRodape: TLayout;
Rectangle3: TRectangle;
LblDireitosAutorais: TLabel;
Layout4: TLayout;
ProgressBar1: TProgressBar;
Timer1: TTimer;
FloatAnimationProgressValue: TFloatAnimation;
Layout8: TLayout;
Image1: TImage;
procedure FormCreate(Sender: TObject);
procedure AnimaProgress(Animation: TFloatAnimation; Start, Stop: Single);
procedure FloatAnimationProgressValueFinish(Sender: TObject);
procedure BtnTestClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FrmSplash: TFrmSplash;
implementation
{$R *.fmx}
uses uLogin;
procedure TFrmSplash.AnimaProgress(Animation: TFloatAnimation; Start, Stop: Single);
begin
Animation.Tag := 0;
Animation.Stop;
Animation.StartValue := Start;
Animation.StopValue := Stop;
Animation.Start;
end;
procedure TFrmSplash.BtnTestClick(Sender: TObject);
begin
Close;
end;
procedure TFrmSplash.FloatAnimationProgressValueFinish(Sender: TObject);
begin
//se nao existe registro no banco... abra o login.
FrmLogin := TFrmLogin.Create(Self);
Application.MainForm := FrmLogin;
Close;
FrmLogin.Show;
//senao abra o menu principal
end;
procedure TFrmSplash.FormCreate(Sender: TObject);
begin
//{$IFDEF WINDOWS}
// // Definir tamanho específico para o desktop
// FullScreen := False;
// Width := 480; // Defina a largura desejada
/// Height := 800; // Defina a altura desejada
// Position := TPosition.poDesktopCenter; // Centralizar na área de trabalho
//{$ENDIF}
//AnimaProgress(FloatAnimationProgressValue, 0, 100);
end;
end.