forked from piresspires/sisfinanceiro_delphi_mysql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ufrmPrincipal.pas
135 lines (115 loc) · 3.4 KB
/
ufrmPrincipal.pas
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
unit ufrmPrincipal;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Imaging.jpeg,
Vcl.ExtCtrls, Vcl.Imaging.pngimage, Vcl.ComCtrls, Vcl.Grids, Vcl.DBGrids,
Data.DB, sSkinManager, sEdit, sLabel, Vcl.Buttons;
type
TfrmPrincipal = class(TForm)
imgUsuarios: TImage;
Label1: TLabel;
imgReceber: TImage;
imgPagar: TImage;
imgCaixa: TImage;
imgConsReceber: TImage;
imgConsPagar: TImage;
Label2: TLabel;
Label3: TLabel;
imgConfiguração: TImage;
imgNavegador: TImage;
Image3: TImage;
Image4: TImage;
StatusBar1: TStatusBar;
imgRelPagar: TImage;
imgRelReceber: TImage;
imgRelCaixa: TImage;
BalloonHint: TBalloonHint;
Timer: TTimer;
sSkinManager1: TsSkinManager;
BitBtn1: TBitBtn;
Button1: TButton;
procedure TimerTimer(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure imgUsuariosClick(Sender: TObject);
procedure imgCaixaClick(Sender: TObject);
procedure imgPagarClick(Sender: TObject);
procedure imgReceberClick(Sender: TObject);
procedure imgConsReceberClick(Sender: TObject);
procedure imgConsPagarClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmPrincipal: TfrmPrincipal;
implementation
{$R *.dfm}
uses uFrmCadastroBasico, uFrmCadastroUsuarios, uFuncoes, uFrmCadastroCaixa,
uFrmCadastroPagar, uFrmCadastroReceber, uFrmConsPagar, uFrmConsReceber,
uFrmLogin, uFrmSplash, uFrmSaldoCaixa, uFrmEmitirRecibo, uSQL;
procedure TfrmPrincipal.BitBtn1Click(Sender: TObject);
begin
CriarForm(TfrmSaldoCaixa, frmSaldoCaixa);
end;
procedure TfrmPrincipal.Button1Click(Sender: TObject);
begin
CriarForm(TfrmEmitirRecibo, frmEmitirRecibo);
end;
procedure TfrmPrincipal.FormClose(Sender: TObject; var Action: TCloseAction);
begin
if Application.MessageBox('Deseja realmente sair?','Informação',MB_YESNO+MB_ICONQUESTION) = mrYes then
Application.Terminate
else
Abort;
end;
procedure TfrmPrincipal.FormCreate(Sender: TObject);
begin
frmSplash := TfrmSplash.Create(nil);
try
frmSplash.ShowModal;
finally
FreeAndNil(frmSplash);
end;
frmLogin := TfrmLogin.Create(nil);
try
frmLogin.ShowModal;
if frmLogin.ModalResult = mrNo then
Application.Terminate;
finally
FreeAndNil(frmLogin);
end;
end;
procedure TfrmPrincipal.imgCaixaClick(Sender: TObject);
begin
CriarForm(TfrmCadastroCaixa, frmCadastroCaixa);
end;
procedure TfrmPrincipal.imgConsPagarClick(Sender: TObject);
begin
CriarForm(TfrmConsPagar,frmConsPagar);
end;
procedure TfrmPrincipal.imgConsReceberClick(Sender: TObject);
begin
CriarForm(TfrmConsReceber,frmConsReceber);
end;
procedure TfrmPrincipal.imgPagarClick(Sender: TObject);
begin
CriarForm(TfrmCadastroPagar, frmCadastroPagar);
end;
procedure TfrmPrincipal.imgReceberClick(Sender: TObject);
begin
CriarForm(TfrmCadastroReceber,frmCadastroReceber);
end;
procedure TfrmPrincipal.imgUsuariosClick(Sender: TObject);
begin
CriarForm(TfrmCadastroUsuarios, frmCadastroUsuarios);
end;
procedure TfrmPrincipal.TimerTimer(Sender: TObject);
begin
StatusBar1.Panels.Items[0].Text := DateTimeToStr(now);
end;
end.