-
Notifications
You must be signed in to change notification settings - Fork 1
/
uPrincipal.pas
170 lines (143 loc) · 5.28 KB
/
uPrincipal.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
unit uPrincipal;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs,
dxBar, dxRibbon, dxRibbonForm, dxRibbonSkins, cxGraphics, cxControls, cxLookAndFeels,
cxLookAndFeelPainters, cxClasses, dxRibbonBackstageView, cxBarEditItem,
dxSkinsCore, dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel,
dxSkinCoffee, dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
dxSkinOffice2010Blue, dxSkinOffice2010Silver, IniFiles, dxSkinOffice2013DarkGray,
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinOffice2016Colorful,
dxSkinOffice2016Dark, dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic,
dxSkinSharp, dxSkinSharpPlus, dxSkinSilver, dxSkinSpringTime, dxSkinStardust,
dxSkinSummer2008, dxSkinTheAsphaltWorld, dxSkinsDefaultPainters,
dxSkinValentine, dxSkinVisualStudio2013Blue, dxSkinVisualStudio2013Dark,
dxSkinVisualStudio2013Light, dxSkinVS2010, dxSkinWhiteprint,
dxSkinXmas2008Blue, dxSkinsdxRibbonPainter, dxRibbonCustomizationForm,
dxSkinsdxBarPainter, cxTextEdit, cxContainer, cxEdit, dxSkinsForm,
dxStatusBar, dxRibbonStatusBar, cxLabel, dxGallery, dxGalleryControl, shellapi,
dxRibbonBackstageViewGalleryControl, System.ImageList, Vcl.ImgList, Data.DB,
Data.Win.ADODB, cxImageList, cxButtonEdit, cxDropDownEdit, dxSkinProject1;
type
TfrmPrincipal = class(TdxRibbonForm)
dxBarManager1: TdxBarManager;
dxBarManager1Bar1: TdxBar;
dxRibbon1: TdxRibbon;
rbtPrincipal: TdxRibbonTab;
RBStatus: TdxRibbonStatusBar;
dxSkinController1: TdxSkinController;
dxBarManager1Bar2: TdxBar;
cxBarEditItem1: TcxBarEditItem;
dxBarManager1Bar3: TdxBar;
dxBarLargeButton1: TdxBarLargeButton;
imgGrande: TcxImageList;
imgPequeno: TcxImageList;
dxBarLargeButton2: TdxBarLargeButton;
dxBarButton1: TdxBarButton;
dxBarLargeButton3: TdxBarLargeButton;
dxBarButton2: TdxBarButton;
dxBarManager1Bar4: TdxBar;
dxBarLargeButton4: TdxBarLargeButton;
dxBarLargeButton5: TdxBarLargeButton;
qry: TADOQuery;
dxBarLargeButton6: TdxBarLargeButton;
dxBarLargeButton7: TdxBarLargeButton;
dxBarManager1Bar5: TdxBar;
dxBarLargeButton8: TdxBarLargeButton;
dxBarLargeButton9: TdxBarLargeButton;
dxBarManager1Bar6: TdxBar;
dxBarManager1Bar7: TdxBar;
dxBarLargeButton10: TdxBarLargeButton;
dxBarLargeButton11: TdxBarLargeButton;
procedure FormCreate(Sender: TObject);
procedure dxBarLargeButton4Click(Sender: TObject);
procedure dxBarLargeButton6Click(Sender: TObject);
procedure dxBarLargeButton5Click(Sender: TObject);
procedure dxBarLargeButton8Click(Sender: TObject);
procedure dxBarLargeButton9Click(Sender: TObject);
procedure dxBarLargeButton10Click(Sender: TObject);
procedure dxBarLargeButton11Click(Sender: TObject);
procedure dxBarLargeButton7Click(Sender: TObject);
private
{ Private declarations }
public
localBanco:string;
procedure preencheBanco;
end;
var
frmPrincipal: TfrmPrincipal;
implementation
{$R *.dfm}
uses uDM, ufrmCadProduto,
ufrmCadUnidadesDeMedida, ufrmCadPessoa, ufrmCadCompra, ufrmPainelCompras,
ufrmCadVenda, ufrmPainelVendas;
{ TForm2 }
procedure TfrmPrincipal.dxBarLargeButton10Click(Sender: TObject);
begin
frmCadVenda := TfrmCadVenda.Create(self);
frmCadVenda.Show;
end;
procedure TfrmPrincipal.dxBarLargeButton11Click(Sender: TObject);
begin
frmPainelVendas:=Tfrmpainelvendas.create(self);
frmPainelVendas.Show;
end;
procedure TfrmPrincipal.dxBarLargeButton4Click(Sender: TObject);
begin
frmCadPessoa := TfrmCadPessoa.Create(self);
frmCadPessoa.Show;
end;
procedure TfrmPrincipal.dxBarLargeButton5Click(Sender: TObject);
begin
frmCadProduto := TfrmCadProduto.create(self);
frmCadProduto.show;
end;
procedure TfrmPrincipal.dxBarLargeButton6Click(Sender: TObject);
begin
frmCadUnidadesDeMedida:=TfrmCadUnidadesDeMedida.Create(self);
frmCadUnidadesDeMedida.show;
end;
procedure TfrmPrincipal.dxBarLargeButton7Click(Sender: TObject);
var sCaminho:string;
begin
sCaminho := 'C:\Milk\AnyDesk.exe';
ShellExecute(Handle,'open',pchar(sCaminho),nil,nil,sw_show)
end;
procedure TfrmPrincipal.dxBarLargeButton8Click(Sender: TObject);
begin
frmCadCompra:=TfrmCadCompra.Create(self);
frmCadCompra.show;
end;
procedure TfrmPrincipal.dxBarLargeButton9Click(Sender: TObject);
begin
frmPainelCompras:=TfrmPainelCompras.Create(self);
frmPainelCompras.Show;
end;
procedure TfrmPrincipal.FormCreate(Sender: TObject);
begin
DisableAero := True;
preencheBanco;
DM:=TDM.Create(self);
DM.FDConn.Params.Database := localBanco;
RBStatus.Panels[0].Text := 'V.: 1.0.0.0';
DM.FDConn.Connected:=true;
// Evento que manpula as exceções
//Application.OnException := AppException;
end;
procedure TfrmPrincipal.preencheBanco;
var
ArqIni: TIniFile;
begin
ArqIni := TIniFile.Create('C:\Milk\configMILK.ini');
try
localBanco := ArqIni.ReadString('Configuracoes', 'local', '');
finally
ArqIni.Free;
end;
end;
end.