Commit f40c7147e7c7f9d352c172b8acdd8ac4e88fefee
1 parent
9f57fcf0
Exists in
master
Atualizacao de pasta MapaCACIC 2.6-Beta-2
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windows@955 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
17 changed files
with
2646 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,2 @@ |
1 | + | |
2 | +Esse módulo foi desenvolvido para atender à necessidade de coleta de informações patrimoniais de forma seletiva por estação, onde o técnico vai presencialmente e, de posse do nível de acesso "Técnico" no módulo gerente WEB, realiza o preenchimento dos campos relativos ao Patrimônio e Localização Física. | ... | ... |
No preview for this file type
No preview for this file type
... | ... | @@ -0,0 +1,334 @@ |
1 | +object frmAcesso: TfrmAcesso | |
2 | + Left = 301 | |
3 | + Top = 147 | |
4 | + BorderIcons = [] | |
5 | + BorderStyle = bsSingle | |
6 | + Caption = | |
7 | + 'MapaCacic - M'#243'dulo Avulso para Coleta de Informa'#231#245'es Patrimoniai' + | |
8 | + 's' | |
9 | + ClientHeight = 305 | |
10 | + ClientWidth = 605 | |
11 | + Color = clBtnFace | |
12 | + Font.Charset = DEFAULT_CHARSET | |
13 | + Font.Color = clWindowText | |
14 | + Font.Height = -11 | |
15 | + Font.Name = 'MS Sans Serif' | |
16 | + Font.Style = [] | |
17 | + Icon.Data = { | |
18 | + 0000010001003232000001000800E00F00001600000028000000320000006400 | |
19 | + 00000100080000000000B80B0000000000000000000000010000000000000000 | |
20 | + 0000FFFFFF006699FF0099FFFF0066FFFF000033FF00002BD70000156A001534 | |
21 | + 380065CA320063C6310052A529004B9625002C59160066CC330066CB330060C0 | |
22 | + 30005DBA2F0059B12D00376D1C004589240059B233001A350F003C77240054A8 | |
23 | + 370034672200234618001E3B150050A23C00478A37000F1E0C004F9940001223 | |
24 | + 0F00315D2A00152A1200539E4A003D7238002A5028001223130026462800438E | |
25 | + 49000E1C10003F874B003A7E4600326D3D00101F130068BD7B00457C57006BC0 | |
26 | + 8A00294935006FC395000B16120012231D001B413500357B680074C7B0002851 | |
27 | + 47001B4239000E1B18006AB4AA007BD0C400183E3B000F2524007FD5D2008BE9 | |
28 | + E70088E4E30086E0DE00183E3E004FC8C8003D9A9A00193F3F001C4444001C41 | |
29 | + 41001F4545001E3B3B0097FDFD0095FAFA008EEEEE008CEBEB0087E2E20081D8 | |
30 | + D8005D9C9C003B63630098FEFE0093F5F50090F0F00079CACA006BB3B300416C | |
31 | + 6C0047757500122E2F00235455006FBBBF004D8285004A7C7F0015353800538D | |
32 | + 94003255590060A2A900416F76002B494D0050878E002C6D79001526290078CB | |
33 | + D8004D8590001C30350031C4F60033CCFF0033CAFD0032C5F80031BFF10031B8 | |
34 | + EA0032B0E400296781001E36400032AADD0013354400508EAA004E89A3001E34 | |
35 | + 3E0033A1D50035A5DA005CA3C800369AD00030566A0061ACD5003892CA000409 | |
36 | + 0C00569BC600368BC2000E1A220027475D00223F55000B263D001D4F78003C89 | |
37 | + C500060C1100549BD5001F394E004F92CC00235A8E004388CD00285B99004688 | |
38 | + D6004989D200335E93001E324900030C180010315B0018315100071934003369 | |
39 | + B500020407003E7ED600152A4800080E17004F88D8004D85D300548DE1001444 | |
40 | + 96005A8EE9005C90EC000C131F005E92F000141F33001145AD00010204000305 | |
41 | + 09000E1625001B2A47000D1422000B111D00111A2C000F1727001E2E4D004A70 | |
42 | + BC003956910036528900273B63006598FE006395F9006295F7006192F4006090 | |
43 | + F1005E8EED005B8AE500517ACC004C73C000486CB500466AB1004264A7004162 | |
44 | + A4004060A1006597FD006496FA005E8DEB005D8BE9005A87E1005985DF005782 | |
45 | + DA00547ED2004E75C3004466AA003F5E9D00354F8400324B7D002C426E002A3F | |
46 | + 690024365A0022335500203050001A2741003C5A95000A0F1A00162138002639 | |
47 | + 60004F76C6004567AD000E3288000F2B70000938B900040D2400184AD2000736 | |
48 | + C50002030600032BBF000837D7000629A7000032FE000031FD000031F9000031 | |
49 | + F5000030F100002FEB00002CDF000029D0000028C8000026BF000024B600001E | |
50 | + 9800001D9300001A880000187D0000156C0000156B0000146400000E4900000A | |
51 | + 3500000724000230E3000534E60000051D0001092D0000000100FFFFFF000000 | |
52 | + 0000F9FC00000000000000000000000000000000000000000000000000000000 | |
53 | + 00000000000000000000FC0000000000000000000000F6F60000000000000000 | |
54 | + 000000000000000000000000000000000000000000000000000000000000F0F8 | |
55 | + 000000000000000000FDE8E7F800000000000000000000000000000000000000 | |
56 | + 0000000000000000000000000000000000F705EBF900000000000000F9ED0505 | |
57 | + ECF9000000000000000000000000000000000000000000000000000000000000 | |
58 | + 00000000FDE90505F100000000000000F605050505F800000000000000000000 | |
59 | + 000000000000000000000000000000000000000000000000F7050505E5F80000 | |
60 | + 000000F9EA05050505F600000000000000000000000000000000000000000000 | |
61 | + 000000000000000000000000E4E5050505EE0000000000F705050505E5EE0000 | |
62 | + 00000000000000000000000000000000000000000000000000000000000000FD | |
63 | + E905050505E5FD00000000A5DCEAE5E6EAEFDE00000000000000000000000000 | |
64 | + 00000000000000000000000000000000000000DEEDE8050506DCA30000008057 | |
65 | + 5096EBDB7D626A00000000000000000000000000000000000000000000000000 | |
66 | + 0000000000000064608BE2E2844E630000008356034D96840303640000000000 | |
67 | + 0000000000000000ABAEAEAEAE00000000000000000000000000005D034C9B85 | |
68 | + 4C036000000083500303424F0303630000000000000000ABA5CFD5BDBBC5B4B7 | |
69 | + C8BCC0CDAAA90000000000000000995703535655030362000000805703030303 | |
70 | + 03035E0000000000A9D7B1BA02020202020202020202020202B5BDD2AE000000 | |
71 | + 0000895C0303030303036300000000614B030303030364000000A3D3C6020202 | |
72 | + 02020202020202020202020202020202C3B1A900000000605303030303546A00 | |
73 | + 0000001E314F030303503300D6A5BB0202020202020202020202B70202020202 | |
74 | + 020202020202B8CFAB0000344D030353562720000000002012275603572720A3 | |
75 | + C102020202020202020202B9D5D2B3D1CFBD02020202020202020202C7A5001E | |
76 | + 3150033B250B290000000080170A2531171433CAC3020202020202020202C7D3 | |
77 | + BCB40202C4D5B3B70202020202020202C2B7D4290B2138190F1A000000000000 | |
78 | + 2914091A091BB09F7C8E0202020202020202D3B9020202020202BBB302020202 | |
79 | + 020202B67F7FA2AE190E110E1020000000000000AD515959A226A19E716D7FB5 | |
80 | + 0202020202D9B10202020202020202CCBF0202020202A47C6C799DB720090E0F | |
81 | + 1A000000000000AE5D593B5159B7717C9E746C7CA40202020202C20202020202 | |
82 | + 02020202B502020202A17A6C7C9D747A93190919330000000000AB5159BD5157 | |
83 | + 5159C36C7A9E796C79A10202020202020202020202020202020202029F716C7F | |
84 | + 9D716D88B5261334A300000000006F6590D9BD513B5159B46C719E7C6C79A102 | |
85 | + 0202020202020202020202020202029D706D88916F6B88B402BD3A02CDAC0000 | |
86 | + 00006F6F6F9FBCBD513B5159026D7091828E0202020202020202020202020202 | |
87 | + 020202C288888E6B6F8E02020202020202CF00000000006F6F6E9F9ADA515751 | |
88 | + 59B46B74BA02020202020202020202020202020202020202029E6F7091020202 | |
89 | + 020202020202D3000000AEC26F6F029F9ABD51575159029D0202020202020202 | |
90 | + 02020202020202020202020202028E9D02020202020202020202C6AE0000A502 | |
91 | + 026F6D6F9FD9BD513B5159020202020202020202020202020202020202020202 | |
92 | + 020202020202020202020202020202D70000ADB4026F6F686E9FD9BD51575102 | |
93 | + 0202020202020202020202020202020202020202020202020202020202020202 | |
94 | + 020202AD000000C002026F6F6F027A9ABD513B59BAC8C9D9B0BDDABA02020202 | |
95 | + 020202BADABDB0D9C9C8BAB8B4020202020202020202BED6000000A3C002026F | |
96 | + 6F6F6E9FD9BD3B5159B1CCBFBEBDBC020202020202020202BCBDBEBFCCB1B2CC | |
97 | + B502020202020202B9D8AC00000000009CB802026F6F6C027A9A515751020202 | |
98 | + 02020202020202020202020202020202020202020202020202020202AA000000 | |
99 | + 00000000FED4BFB9026F6C6FA4BCBD5151510259595959595959595902020202 | |
100 | + 02020202020202020202020202C3CAD0E1000000000000000000FED6A5D20268 | |
101 | + 6EB9D951515159595959595959595959595902020202020202020202B9BBC1D0 | |
102 | + D4AB9900000000000000000000000000000000026F6F56513B5759595900320F | |
103 | + 00000059595959C1B1CECFD8D2AAA5A9D6A80000000000000000000000000000 | |
104 | + 0000000000000000026F6F6F59595959000F0F0F000000000059595900000000 | |
105 | + 0000000000000000000000000000000000000000000000000000000000006F6F | |
106 | + 5959590000000000000000000000595959000000000000000000000000000000 | |
107 | + 0000000000000000000000000000000000000059595906060606060606060606 | |
108 | + 0606065959590000000000000000000000000000000000000000000000000000 | |
109 | + 00000000000000595906060F0F0F060606060606060606065959000000000000 | |
110 | + 0000000000000000000000000000000000FD070707070707070759595906060F | |
111 | + 0F06060606060606060606062E5959070707070707070707070707F4FC000000 | |
112 | + 0000000000F8EF06060606060606595959060F0F060606060606060606060606 | |
113 | + 0F5959060606060606060606060606F100000000000000000000945A08080808 | |
114 | + 0859590000000000000F0F0F0000000000000000005959080808080808080808 | |
115 | + 085F3E0000000000000000000000005A4404040404595932033204040F0F0404 | |
116 | + 040404040404040404595904040404040404040404455A000000000000000000 | |
117 | + 000000008646354748595905030332320F3204323204040404040404042F5949 | |
118 | + 4375393D49467535474A0000000000000000000000000000EE95175864595959 | |
119 | + 0503560F0F04323204040404040404042E59595E78F10D1651DEF11400570000 | |
120 | + 000000000000000000000000E8A0103762E65959050556033232320432043204 | |
121 | + 040415153259123F77E52B1D038FE91F1F0300000000000000000000000000EF | |
122 | + 05E00A304CE3595959055603032E2E2E2E0505050505151559590F3250EA7211 | |
123 | + 42810536184B57000000000000000000000000EE05FA112E03DFDD5959055603 | |
124 | + 03012E2E2E0505050505153259E00E324DFA8D093C7B056615555C0000000000 | |
125 | + 00000000000000EE05E9152E03DFE0595959560303322E2E2E3205050505322E | |
126 | + 59E009304CE38D0F377E057211415C000000000000000000000000EF05E00932 | |
127 | + 4EFBA60E59595903032E2E2E2E3205050505595959A60E3768E76615558C0536 | |
128 | + 184B570000000000000000000000000005A00A375C058711405959592E2E2E2E | |
129 | + 2E05050559595959058712407B052A1C0398E81C230300000000000000000000 | |
130 | + 0000000006380C5669EB2C143F8D5959592E2E2E2E32595959593F65EB2C143F | |
131 | + 92ED0B2442E4EF122F5600000000000000000000000000000700005800070000 | |
132 | + 5800000D5959595959595959000059000700005800000D005800000D00000000 | |
133 | + 000000000000F3FFFFFFFFF7C000F3FFFFFFFFF3C000E1FFFFFFFFE1C000C0FF | |
134 | + FFFFFFC1C000C0FFFFFFFFC0C00080FFFFFFFFC0C00080FFFFFFFF804000807F | |
135 | + FFFFFF804000007FFFFFFF804000007FFC1FFF804000007F8000FF004000007C | |
136 | + 00001F0040008070000007804000804000000180400080000000008040008000 | |
137 | + 00000000C000C00000000000C000C00000000001C000800000000001C0000000 | |
138 | + 00000001C000000000000000C000000000000000C00080000000000040000000 | |
139 | + 0000000000000000000000000000000000000000000080000000000000008000 | |
140 | + 0000000040008000000000004000800000000000400080000000000040008000 | |
141 | + 00000000C000C00000000000C000C00000000000C000C00000000001C000E000 | |
142 | + 00000001C000E00000000001C000E00000000003C000F00000000007C000F800 | |
143 | + 00000007C000FC000000000FC000FC000000002FC000FC000000000FC000F800 | |
144 | + 00000007C000F80000000007C000F80000000007C000F80000000007C000FC00 | |
145 | + 0000000FC000FC000000000FC000FDAD8035B5BFC000} | |
146 | + KeyPreview = True | |
147 | + OldCreateOrder = False | |
148 | + Position = poDesktopCenter | |
149 | + OnActivate = FormActivate | |
150 | + OnCreate = FormCreate | |
151 | + OnKeyDown = FormKeyDown | |
152 | + OnShow = FormShow | |
153 | + PixelsPerInch = 96 | |
154 | + TextHeight = 13 | |
155 | + object lbVersao: TLabel | |
156 | + Left = 512 | |
157 | + Top = 289 | |
158 | + Width = 90 | |
159 | + Height = 13 | |
160 | + Alignment = taRightJustify | |
161 | + AutoSize = False | |
162 | + Caption = 'Vers'#227'o: X.X.X.X' | |
163 | + Font.Charset = DEFAULT_CHARSET | |
164 | + Font.Color = clWindowText | |
165 | + Font.Height = -9 | |
166 | + Font.Name = 'Arial' | |
167 | + Font.Style = [] | |
168 | + ParentFont = False | |
169 | + end | |
170 | + object lbTeWebManagerAddress: TLabel | |
171 | + Left = 1 | |
172 | + Top = 289 | |
173 | + Width = 153 | |
174 | + Height = 13 | |
175 | + AutoSize = False | |
176 | + Caption = 'Endere'#231'o do Servidor de Aplica'#231#227'o:' | |
177 | + Font.Charset = DEFAULT_CHARSET | |
178 | + Font.Color = clWindowText | |
179 | + Font.Height = -9 | |
180 | + Font.Name = 'Arial' | |
181 | + Font.Style = [] | |
182 | + ParentFont = False | |
183 | + end | |
184 | + object edTeWebManagerAddress: TLabel | |
185 | + Left = 156 | |
186 | + Top = 287 | |
187 | + Width = 146 | |
188 | + Height = 14 | |
189 | + Caption = 'EdTeWebManagerAddress' | |
190 | + Font.Charset = DEFAULT_CHARSET | |
191 | + Font.Color = clWindowText | |
192 | + Font.Height = -11 | |
193 | + Font.Name = 'Arial' | |
194 | + Font.Style = [fsBold] | |
195 | + ParentFont = False | |
196 | + end | |
197 | + object btAcesso: TButton | |
198 | + Left = 177 | |
199 | + Top = 242 | |
200 | + Width = 105 | |
201 | + Height = 33 | |
202 | + Caption = 'Acessar' | |
203 | + Default = True | |
204 | + Enabled = False | |
205 | + Font.Charset = DEFAULT_CHARSET | |
206 | + Font.Color = clWindowText | |
207 | + Font.Height = -16 | |
208 | + Font.Name = 'Arial' | |
209 | + Font.Style = [fsBold] | |
210 | + ParentFont = False | |
211 | + TabOrder = 0 | |
212 | + OnClick = btAcessoClick | |
213 | + end | |
214 | + object btCancela: TButton | |
215 | + Left = 333 | |
216 | + Top = 242 | |
217 | + Width = 105 | |
218 | + Height = 33 | |
219 | + Caption = 'Cancelar' | |
220 | + Font.Charset = DEFAULT_CHARSET | |
221 | + Font.Color = clWindowText | |
222 | + Font.Height = -16 | |
223 | + Font.Name = 'Arial' | |
224 | + Font.Style = [fsBold] | |
225 | + ParentFont = False | |
226 | + TabOrder = 1 | |
227 | + OnClick = btCancelaClick | |
228 | + end | |
229 | + object pnAcesso: TPanel | |
230 | + Left = 2 | |
231 | + Top = 3 | |
232 | + Width = 602 | |
233 | + Height = 196 | |
234 | + BevelInner = bvRaised | |
235 | + BevelOuter = bvLowered | |
236 | + TabOrder = 2 | |
237 | + object lbNomeUsuarioAcesso: TLabel | |
238 | + Left = 56 | |
239 | + Top = 35 | |
240 | + Width = 127 | |
241 | + Height = 20 | |
242 | + Caption = 'Nome de Usu'#225'rio:' | |
243 | + Font.Charset = DEFAULT_CHARSET | |
244 | + Font.Color = clWindowText | |
245 | + Font.Height = -16 | |
246 | + Font.Name = 'MS Sans Serif' | |
247 | + Font.Style = [] | |
248 | + ParentFont = False | |
249 | + end | |
250 | + object lbSenhaAcesso: TLabel | |
251 | + Left = 394 | |
252 | + Top = 35 | |
253 | + Width = 130 | |
254 | + Height = 20 | |
255 | + Caption = 'Senha de Acesso:' | |
256 | + Font.Charset = DEFAULT_CHARSET | |
257 | + Font.Color = clWindowText | |
258 | + Font.Height = -16 | |
259 | + Font.Name = 'MS Sans Serif' | |
260 | + Font.Style = [] | |
261 | + ParentFont = False | |
262 | + end | |
263 | + object lbAviso: TLabel | |
264 | + Left = 4 | |
265 | + Top = 121 | |
266 | + Width = 593 | |
267 | + Height = 13 | |
268 | + Alignment = taCenter | |
269 | + AutoSize = False | |
270 | + Caption = | |
271 | + 'ATEN'#199#195'O: O usu'#225'rio deve estar cadastrado no Gerente WEB e deve t' + | |
272 | + 'er acesso PRIM'#193'RIO ou SECUND'#193'RIO a este local' | |
273 | + Font.Charset = DEFAULT_CHARSET | |
274 | + Font.Color = clNavy | |
275 | + Font.Height = -11 | |
276 | + Font.Name = 'MS Sans Serif' | |
277 | + Font.Style = [] | |
278 | + ParentFont = False | |
279 | + end | |
280 | + object edNomeUsuarioAcesso: TEdit | |
281 | + Left = 56 | |
282 | + Top = 55 | |
283 | + Width = 150 | |
284 | + Height = 28 | |
285 | + Font.Charset = DEFAULT_CHARSET | |
286 | + Font.Color = clWindowText | |
287 | + Font.Height = -16 | |
288 | + Font.Name = 'MS Sans Serif' | |
289 | + Font.Style = [] | |
290 | + MaxLength = 20 | |
291 | + ParentFont = False | |
292 | + TabOrder = 0 | |
293 | + OnKeyUp = edNomeUsuarioAcessoKeyUp | |
294 | + end | |
295 | + object edSenhaAcesso: TEdit | |
296 | + Left = 394 | |
297 | + Top = 55 | |
298 | + Width = 150 | |
299 | + Height = 28 | |
300 | + Font.Charset = DEFAULT_CHARSET | |
301 | + Font.Color = clWindowText | |
302 | + Font.Height = -16 | |
303 | + Font.Name = 'MS Sans Serif' | |
304 | + Font.Style = [] | |
305 | + ParentFont = False | |
306 | + PasswordChar = #7 | |
307 | + TabOrder = 1 | |
308 | + OnKeyUp = edSenhaAcessoKeyUp | |
309 | + end | |
310 | + end | |
311 | + object pnMensagens: TPanel | |
312 | + Left = 1 | |
313 | + Top = 200 | |
314 | + Width = 602 | |
315 | + Height = 24 | |
316 | + BevelInner = bvLowered | |
317 | + TabOrder = 3 | |
318 | + object lbMsg_Erro_Senha: TLabel | |
319 | + Left = 3 | |
320 | + Top = 4 | |
321 | + Width = 589 | |
322 | + Height = 17 | |
323 | + Alignment = taCenter | |
324 | + AutoSize = False | |
325 | + end | |
326 | + end | |
327 | + object tm_Mensagem: TTimer | |
328 | + Enabled = False | |
329 | + Interval = 5000 | |
330 | + OnTimer = tm_MensagemTimer | |
331 | + Left = 282 | |
332 | + Top = 241 | |
333 | + end | |
334 | +end | ... | ... |
... | ... | @@ -0,0 +1,246 @@ |
1 | +(** | |
2 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
3 | +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
4 | + | |
5 | +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
6 | + | |
7 | +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
8 | +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. | |
9 | + | |
10 | +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
11 | +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
12 | + | |
13 | +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
14 | +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
15 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
16 | +*) | |
17 | + | |
18 | +unit acesso; | |
19 | + | |
20 | +interface | |
21 | + | |
22 | +uses | |
23 | + Windows, | |
24 | + Messages, | |
25 | + SysUtils, | |
26 | + Variants, | |
27 | + Classes, | |
28 | + Graphics, | |
29 | + Controls, | |
30 | + Forms, | |
31 | + StdCtrls, | |
32 | + ExtCtrls, | |
33 | + dialogs; | |
34 | + | |
35 | +type | |
36 | + TfrmAcesso = class(TForm) | |
37 | + btAcesso: TButton; | |
38 | + btCancela: TButton; | |
39 | + pnAcesso: TPanel; | |
40 | + lbNomeUsuarioAcesso: TLabel; | |
41 | + edNomeUsuarioAcesso: TEdit; | |
42 | + lbSenhaAcesso: TLabel; | |
43 | + edSenhaAcesso: TEdit; | |
44 | + pnMensagens: TPanel; | |
45 | + lbMsg_Erro_Senha: TLabel; | |
46 | + lbAviso: TLabel; | |
47 | + tm_Mensagem: TTimer; | |
48 | + lbVersao: TLabel; | |
49 | + lbTeWebManagerAddress: TLabel; | |
50 | + edTeWebManagerAddress: TLabel; | |
51 | + procedure btAcessoClick(Sender: TObject); | |
52 | + procedure btCancelaClick(Sender: TObject); | |
53 | + procedure FormCreate(Sender: TObject); | |
54 | + procedure edNomeUsuarioAcessoKeyUp(Sender: TObject; var Key: Word; | |
55 | + Shift: TShiftState); | |
56 | + procedure FormShow(Sender: TObject); | |
57 | + procedure edSenhaAcessoKeyUp(Sender: TObject; var Key: Word; | |
58 | + Shift: TShiftState); | |
59 | + procedure tm_MensagemTimer(Sender: TObject); | |
60 | + procedure FormActivate(Sender: TObject); | |
61 | + function VerificaVersao : boolean; | |
62 | + procedure FormKeyDown(Sender: TObject; var Key: Word; | |
63 | + Shift: TShiftState); | |
64 | + private | |
65 | + { Private declarations } | |
66 | + public | |
67 | + { Public declarations } | |
68 | + end; | |
69 | + | |
70 | +var | |
71 | + frmAcesso: TfrmAcesso; | |
72 | + | |
73 | +implementation | |
74 | +uses main_mapa; | |
75 | +{$R *.dfm} | |
76 | + | |
77 | +procedure TfrmAcesso.btAcessoClick(Sender: TObject); | |
78 | +var Request_mapa : TStringList; | |
79 | + strRetorno, | |
80 | + str_local_Aux : String; | |
81 | +begin | |
82 | + frmMapaCacic.boolAcessoOK := false; | |
83 | + Request_mapa:=TStringList.Create; | |
84 | + | |
85 | + lbMsg_Erro_Senha.Caption := str_local_Aux; | |
86 | + | |
87 | + // Autenticação de Programa e Usuário | |
88 | + Request_mapa.Values['nm_acesso'] := g_oCacic.enCrypt(edNomeUsuarioAcesso.Text); | |
89 | + Request_mapa.Values['te_senha'] := g_oCacic.enCrypt(edSenhaAcesso.Text); | |
90 | + Request_mapa.Values['cs_MapaCacic'] := g_oCacic.enCrypt('S'); | |
91 | + Request_mapa.Values['te_operacao'] := g_oCacic.enCrypt('Autentication'); | |
92 | + Request_mapa.Values['te_versao_mapa'] := g_oCacic.enCrypt(g_oCacic.getVersionInfo(ParamStr(0))); | |
93 | + | |
94 | + strRetorno := frmMapaCacic.ComunicaServidor('mapa_acesso.php', Request_mapa, 'Autenticando o Acesso...'); | |
95 | + Request_mapa.free; | |
96 | + | |
97 | + if (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then | |
98 | + Begin | |
99 | + str_local_Aux := trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_USUARIO',strRetorno))); | |
100 | + if (str_local_Aux <> '') then | |
101 | + Begin | |
102 | + frmMapaCacic.strId_usuario := str_local_Aux; | |
103 | + str_local_Aux := ''; | |
104 | + frmMapaCacic.boolAcessoOK := true; // Acesso OK! | |
105 | + End | |
106 | + else | |
107 | + Begin | |
108 | + str_local_Aux := 'Usuário/Senha incorretos ou Usuário sem Acesso Primário/Secundário a este local!'; | |
109 | + End | |
110 | + End | |
111 | + else | |
112 | + Begin | |
113 | + str_local_Aux := 'Problemas na comunicação!'; | |
114 | + End; | |
115 | + | |
116 | + lbMsg_Erro_Senha.Caption := str_local_Aux; | |
117 | + | |
118 | + if (frmMapaCacic.boolAcessoOK) then | |
119 | + Begin | |
120 | + lbAviso.Caption := 'USUÁRIO AUTENTICADO: "' + trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('NM_USUARIO_COMPLETO',strRetorno)))+'"'; | |
121 | + lbAviso.Font.Style := [fsBold]; | |
122 | + lbAviso.Font.Color := clGreen; | |
123 | + Application.ProcessMessages; | |
124 | + Sleep(3000); | |
125 | + End | |
126 | + else | |
127 | + lbMsg_Erro_Senha.Font.Color := clRed; | |
128 | + | |
129 | + tm_Mensagem.Enabled := true; | |
130 | + | |
131 | + g_oCacic.writeDailyLog(str_local_Aux); | |
132 | + | |
133 | + Application.ProcessMessages; | |
134 | + | |
135 | + if (frmMapaCacic.boolAcessoOK) then | |
136 | + self.Close | |
137 | + else | |
138 | + Begin | |
139 | + edNomeUsuarioAcesso.AutoSelect := false; | |
140 | + edNomeUsuarioAcesso.SetFocus; | |
141 | + End; | |
142 | +end; | |
143 | + | |
144 | +Function TfrmAcesso.VerificaVersao : boolean; | |
145 | +var Request_mapa : TStringList; | |
146 | + strRetorno, | |
147 | + strAUX : String; | |
148 | +begin | |
149 | + Result := false; | |
150 | + Request_mapa:=TStringList.Create; | |
151 | + | |
152 | + // Envio dos dados ao DataBase... | |
153 | + Request_mapa.Values['cs_MapaCacic'] := g_oCacic.enCrypt('S'); | |
154 | + Request_mapa.Values['te_operacao'] := g_oCacic.enCrypt('Autentication'); | |
155 | + Request_mapa.Values['te_versao_mapa'] := g_oCacic.enCrypt(g_oCacic.getVersionInfo(ParamStr(0))); | |
156 | + | |
157 | + strRetorno := frmMapaCacic.ComunicaServidor('mapa_acesso.php', Request_mapa, 'Verificando Versão...'); | |
158 | + Request_mapa.free; | |
159 | + | |
160 | + if (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then | |
161 | + Begin | |
162 | + strAUX := trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_VERSAO_MAPA',strRetorno))); | |
163 | + if (strAUX = '') then | |
164 | + Result := true | |
165 | + else | |
166 | + MessageDLG(#13#10#13#10+'ATENÇÃO! Encontra-se disponibilizada a versão "'+strAUX+'".'+#13#10#13#10+'Acesse o Gerente WEB do CACIC, opção "Repositório" e baixe o programa "MapaCACIC"!'+#13#10,mtWarning,[mbOK],0); | |
167 | + End | |
168 | + else | |
169 | + MessageDLG(#13#10#13#10+'ATENÇÃO! Há problema na comunicação com o módulo Gerente WEB.'+#13#10#13#10,mtWarning,[mbOK],0); | |
170 | +end; | |
171 | + | |
172 | + | |
173 | +procedure TfrmAcesso.btCancelaClick(Sender: TObject); | |
174 | +begin | |
175 | + lbMsg_Erro_Senha.Caption := 'Aguarde... Finalizando!'; | |
176 | + Application.ProcessMessages; | |
177 | + Self.Close; | |
178 | + boolFinalizar := true; | |
179 | +end; | |
180 | + | |
181 | +procedure TfrmAcesso.FormCreate(Sender: TObject); | |
182 | +begin | |
183 | + intPausaPadrao := 3000; //(3 mil milisegundos = 3 segundos) | |
184 | + frmAcesso.lbVersao.Caption := 'Versão: ' + g_oCacic.getVersionInfo(ParamStr(0)); | |
185 | + frmMapaCacic.lbMensagens.Caption := 'Entrada de Dados para Autenticação no Módulo Gerente WEB Cacic'; | |
186 | +end; | |
187 | + | |
188 | +procedure TfrmAcesso.edNomeUsuarioAcessoKeyUp(Sender: TObject; | |
189 | + var Key: Word; Shift: TShiftState); | |
190 | +begin | |
191 | + if not (trim(frmAcesso.edNomeUsuarioAcesso.Text) = '') and | |
192 | + not (trim(frmAcesso.edSenhaAcesso.Text) = '') then | |
193 | + frmAcesso.btAcesso.Enabled := true | |
194 | + else | |
195 | + frmAcesso.btAcesso.Enabled := false; | |
196 | +end; | |
197 | + | |
198 | +procedure TfrmAcesso.FormShow(Sender: TObject); | |
199 | +begin | |
200 | + frmAcesso.edNomeUsuarioAcesso.SetFocus; | |
201 | +end; | |
202 | + | |
203 | +procedure TfrmAcesso.edSenhaAcessoKeyUp(Sender: TObject; var Key: Word; | |
204 | + Shift: TShiftState); | |
205 | +begin | |
206 | + if not (trim(frmAcesso.edNomeUsuarioAcesso.Text) = '') and | |
207 | + not (trim(frmAcesso.edSenhaAcesso.Text) = '') then | |
208 | + frmAcesso.btAcesso.Enabled := true | |
209 | + else | |
210 | + frmAcesso.btAcesso.Enabled := false; | |
211 | +end; | |
212 | + | |
213 | +procedure TfrmAcesso.tm_MensagemTimer(Sender: TObject); | |
214 | +begin | |
215 | + tm_Mensagem.Enabled := false; | |
216 | + lbMsg_Erro_Senha.Caption := ''; | |
217 | + lbMsg_Erro_Senha.Font.Color := clBlack; | |
218 | +end; | |
219 | + | |
220 | +procedure TfrmAcesso.FormActivate(Sender: TObject); | |
221 | +begin | |
222 | + if (g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress',g_oCacic.getLocalFolder + 'GER_COLS.inf'))='') then | |
223 | + Begin | |
224 | + frmMapaCacic.Mensagem('Favor verificar a instalação do Cacic.' +#13#10 + 'Não Existe Servidor de Aplicação configurado!',true,intPausaPadrao); | |
225 | + frmMapaCacic.Finalizar(true); | |
226 | + End | |
227 | + else | |
228 | + frmAcesso.edTeWebManagerAddress.Caption := frmMapaCacic.edTeWebManagerAddress.Caption; | |
229 | + | |
230 | + if not VerificaVersao then | |
231 | + frmMapaCacic.Finalizar(false); | |
232 | +end; | |
233 | + | |
234 | +procedure TfrmAcesso.FormKeyDown(Sender: TObject; var Key: Word; | |
235 | + Shift: TShiftState); | |
236 | +begin | |
237 | + IF (key = VK_RETURN) then | |
238 | + Begin | |
239 | + if (edNomeUsuarioAcesso.Focused) and (trim(edNomeUsuarioAcesso.Text) <> '') then | |
240 | + edSenhaAcesso.SetFocus | |
241 | + else if (edSenhaAcesso.Focused) and (trim(edSenhaAcesso.Text) <> '') then | |
242 | + btAcessoClick(nil); | |
243 | + End; | |
244 | +end; | |
245 | + | |
246 | +end. | ... | ... |
No preview for this file type
No preview for this file type
... | ... | @@ -0,0 +1,613 @@ |
1 | +object frmMapaCacic: TfrmMapaCacic | |
2 | + Left = 211 | |
3 | + Top = 193 | |
4 | + BorderIcons = [biSystemMenu] | |
5 | + BorderStyle = bsSingle | |
6 | + Caption = | |
7 | + 'MapaCacic - M'#243'dulo Avulso para Coleta de Informa'#231#245'es Patrimoniai' + | |
8 | + 's' | |
9 | + ClientHeight = 327 | |
10 | + ClientWidth = 782 | |
11 | + Color = clBtnFace | |
12 | + Font.Charset = DEFAULT_CHARSET | |
13 | + Font.Color = clWindowText | |
14 | + Font.Height = -9 | |
15 | + Font.Name = 'MS Sans Serif' | |
16 | + Font.Style = [] | |
17 | + Icon.Data = { | |
18 | + 0000010001003232000001000800E00F00001600000028000000320000006400 | |
19 | + 00000100080000000000B80B0000000000000000000000010000000000000000 | |
20 | + 0000FFFFFF006699FF0099FFFF0066FFFF000033FF00002BD70000156A001534 | |
21 | + 380065CA320063C6310052A529004B9625002C59160066CC330066CB330060C0 | |
22 | + 30005DBA2F0059B12D00376D1C004589240059B233001A350F003C77240054A8 | |
23 | + 370034672200234618001E3B150050A23C00478A37000F1E0C004F9940001223 | |
24 | + 0F00315D2A00152A1200539E4A003D7238002A5028001223130026462800438E | |
25 | + 49000E1C10003F874B003A7E4600326D3D00101F130068BD7B00457C57006BC0 | |
26 | + 8A00294935006FC395000B16120012231D001B413500357B680074C7B0002851 | |
27 | + 47001B4239000E1B18006AB4AA007BD0C400183E3B000F2524007FD5D2008BE9 | |
28 | + E70088E4E30086E0DE00183E3E004FC8C8003D9A9A00193F3F001C4444001C41 | |
29 | + 41001F4545001E3B3B0097FDFD0095FAFA008EEEEE008CEBEB0087E2E20081D8 | |
30 | + D8005D9C9C003B63630098FEFE0093F5F50090F0F00079CACA006BB3B300416C | |
31 | + 6C0047757500122E2F00235455006FBBBF004D8285004A7C7F0015353800538D | |
32 | + 94003255590060A2A900416F76002B494D0050878E002C6D79001526290078CB | |
33 | + D8004D8590001C30350031C4F60033CCFF0033CAFD0032C5F80031BFF10031B8 | |
34 | + EA0032B0E400296781001E36400032AADD0013354400508EAA004E89A3001E34 | |
35 | + 3E0033A1D50035A5DA005CA3C800369AD00030566A0061ACD5003892CA000409 | |
36 | + 0C00569BC600368BC2000E1A220027475D00223F55000B263D001D4F78003C89 | |
37 | + C500060C1100549BD5001F394E004F92CC00235A8E004388CD00285B99004688 | |
38 | + D6004989D200335E93001E324900030C180010315B0018315100071934003369 | |
39 | + B500020407003E7ED600152A4800080E17004F88D8004D85D300548DE1001444 | |
40 | + 96005A8EE9005C90EC000C131F005E92F000141F33001145AD00010204000305 | |
41 | + 09000E1625001B2A47000D1422000B111D00111A2C000F1727001E2E4D004A70 | |
42 | + BC003956910036528900273B63006598FE006395F9006295F7006192F4006090 | |
43 | + F1005E8EED005B8AE500517ACC004C73C000486CB500466AB1004264A7004162 | |
44 | + A4004060A1006597FD006496FA005E8DEB005D8BE9005A87E1005985DF005782 | |
45 | + DA00547ED2004E75C3004466AA003F5E9D00354F8400324B7D002C426E002A3F | |
46 | + 690024365A0022335500203050001A2741003C5A95000A0F1A00162138002639 | |
47 | + 60004F76C6004567AD000E3288000F2B70000938B900040D2400184AD2000736 | |
48 | + C50002030600032BBF000837D7000629A7000032FE000031FD000031F9000031 | |
49 | + F5000030F100002FEB00002CDF000029D0000028C8000026BF000024B600001E | |
50 | + 9800001D9300001A880000187D0000156C0000156B0000146400000E4900000A | |
51 | + 3500000724000230E3000534E60000051D0001092D0000000100FFFFFF000000 | |
52 | + 0000F9FC00000000000000000000000000000000000000000000000000000000 | |
53 | + 00000000000000000000FC0000000000000000000000F6F60000000000000000 | |
54 | + 000000000000000000000000000000000000000000000000000000000000F0F8 | |
55 | + 000000000000000000FDE8E7F800000000000000000000000000000000000000 | |
56 | + 0000000000000000000000000000000000F705EBF900000000000000F9ED0505 | |
57 | + ECF9000000000000000000000000000000000000000000000000000000000000 | |
58 | + 00000000FDE90505F100000000000000F605050505F800000000000000000000 | |
59 | + 000000000000000000000000000000000000000000000000F7050505E5F80000 | |
60 | + 000000F9EA05050505F600000000000000000000000000000000000000000000 | |
61 | + 000000000000000000000000E4E5050505EE0000000000F705050505E5EE0000 | |
62 | + 00000000000000000000000000000000000000000000000000000000000000FD | |
63 | + E905050505E5FD00000000A5DCEAE5E6EAEFDE00000000000000000000000000 | |
64 | + 00000000000000000000000000000000000000DEEDE8050506DCA30000008057 | |
65 | + 5096EBDB7D626A00000000000000000000000000000000000000000000000000 | |
66 | + 0000000000000064608BE2E2844E630000008356034D96840303640000000000 | |
67 | + 0000000000000000ABAEAEAEAE00000000000000000000000000005D034C9B85 | |
68 | + 4C036000000083500303424F0303630000000000000000ABA5CFD5BDBBC5B4B7 | |
69 | + C8BCC0CDAAA90000000000000000995703535655030362000000805703030303 | |
70 | + 03035E0000000000A9D7B1BA02020202020202020202020202B5BDD2AE000000 | |
71 | + 0000895C0303030303036300000000614B030303030364000000A3D3C6020202 | |
72 | + 02020202020202020202020202020202C3B1A900000000605303030303546A00 | |
73 | + 0000001E314F030303503300D6A5BB0202020202020202020202B70202020202 | |
74 | + 020202020202B8CFAB0000344D030353562720000000002012275603572720A3 | |
75 | + C102020202020202020202B9D5D2B3D1CFBD02020202020202020202C7A5001E | |
76 | + 3150033B250B290000000080170A2531171433CAC3020202020202020202C7D3 | |
77 | + BCB40202C4D5B3B70202020202020202C2B7D4290B2138190F1A000000000000 | |
78 | + 2914091A091BB09F7C8E0202020202020202D3B9020202020202BBB302020202 | |
79 | + 020202B67F7FA2AE190E110E1020000000000000AD515959A226A19E716D7FB5 | |
80 | + 0202020202D9B10202020202020202CCBF0202020202A47C6C799DB720090E0F | |
81 | + 1A000000000000AE5D593B5159B7717C9E746C7CA40202020202C20202020202 | |
82 | + 02020202B502020202A17A6C7C9D747A93190919330000000000AB5159BD5157 | |
83 | + 5159C36C7A9E796C79A10202020202020202020202020202020202029F716C7F | |
84 | + 9D716D88B5261334A300000000006F6590D9BD513B5159B46C719E7C6C79A102 | |
85 | + 0202020202020202020202020202029D706D88916F6B88B402BD3A02CDAC0000 | |
86 | + 00006F6F6F9FBCBD513B5159026D7091828E0202020202020202020202020202 | |
87 | + 020202C288888E6B6F8E02020202020202CF00000000006F6F6E9F9ADA515751 | |
88 | + 59B46B74BA02020202020202020202020202020202020202029E6F7091020202 | |
89 | + 020202020202D3000000AEC26F6F029F9ABD51575159029D0202020202020202 | |
90 | + 02020202020202020202020202028E9D02020202020202020202C6AE0000A502 | |
91 | + 026F6D6F9FD9BD513B5159020202020202020202020202020202020202020202 | |
92 | + 020202020202020202020202020202D70000ADB4026F6F686E9FD9BD51575102 | |
93 | + 0202020202020202020202020202020202020202020202020202020202020202 | |
94 | + 020202AD000000C002026F6F6F027A9ABD513B59BAC8C9D9B0BDDABA02020202 | |
95 | + 020202BADABDB0D9C9C8BAB8B4020202020202020202BED6000000A3C002026F | |
96 | + 6F6F6E9FD9BD3B5159B1CCBFBEBDBC020202020202020202BCBDBEBFCCB1B2CC | |
97 | + B502020202020202B9D8AC00000000009CB802026F6F6C027A9A515751020202 | |
98 | + 02020202020202020202020202020202020202020202020202020202AA000000 | |
99 | + 00000000FED4BFB9026F6C6FA4BCBD5151510259595959595959595902020202 | |
100 | + 02020202020202020202020202C3CAD0E1000000000000000000FED6A5D20268 | |
101 | + 6EB9D951515159595959595959595959595902020202020202020202B9BBC1D0 | |
102 | + D4AB9900000000000000000000000000000000026F6F56513B5759595900320F | |
103 | + 00000059595959C1B1CECFD8D2AAA5A9D6A80000000000000000000000000000 | |
104 | + 0000000000000000026F6F6F59595959000F0F0F000000000059595900000000 | |
105 | + 0000000000000000000000000000000000000000000000000000000000006F6F | |
106 | + 5959590000000000000000000000595959000000000000000000000000000000 | |
107 | + 0000000000000000000000000000000000000059595906060606060606060606 | |
108 | + 0606065959590000000000000000000000000000000000000000000000000000 | |
109 | + 00000000000000595906060F0F0F060606060606060606065959000000000000 | |
110 | + 0000000000000000000000000000000000FD070707070707070759595906060F | |
111 | + 0F06060606060606060606062E5959070707070707070707070707F4FC000000 | |
112 | + 0000000000F8EF06060606060606595959060F0F060606060606060606060606 | |
113 | + 0F5959060606060606060606060606F100000000000000000000945A08080808 | |
114 | + 0859590000000000000F0F0F0000000000000000005959080808080808080808 | |
115 | + 085F3E0000000000000000000000005A4404040404595932033204040F0F0404 | |
116 | + 040404040404040404595904040404040404040404455A000000000000000000 | |
117 | + 000000008646354748595905030332320F3204323204040404040404042F5949 | |
118 | + 4375393D49467535474A0000000000000000000000000000EE95175864595959 | |
119 | + 0503560F0F04323204040404040404042E59595E78F10D1651DEF11400570000 | |
120 | + 000000000000000000000000E8A0103762E65959050556033232320432043204 | |
121 | + 040415153259123F77E52B1D038FE91F1F0300000000000000000000000000EF | |
122 | + 05E00A304CE3595959055603032E2E2E2E0505050505151559590F3250EA7211 | |
123 | + 42810536184B57000000000000000000000000EE05FA112E03DFDD5959055603 | |
124 | + 03012E2E2E0505050505153259E00E324DFA8D093C7B056615555C0000000000 | |
125 | + 00000000000000EE05E9152E03DFE0595959560303322E2E2E3205050505322E | |
126 | + 59E009304CE38D0F377E057211415C000000000000000000000000EF05E00932 | |
127 | + 4EFBA60E59595903032E2E2E2E3205050505595959A60E3768E76615558C0536 | |
128 | + 184B570000000000000000000000000005A00A375C058711405959592E2E2E2E | |
129 | + 2E05050559595959058712407B052A1C0398E81C230300000000000000000000 | |
130 | + 0000000006380C5669EB2C143F8D5959592E2E2E2E32595959593F65EB2C143F | |
131 | + 92ED0B2442E4EF122F5600000000000000000000000000000700005800070000 | |
132 | + 5800000D5959595959595959000059000700005800000D005800000D00000000 | |
133 | + 000000000000F3FFFFFFFFF7C000F3FFFFFFFFF3C000E1FFFFFFFFE1C000C0FF | |
134 | + FFFFFFC1C000C0FFFFFFFFC0C00080FFFFFFFFC0C00080FFFFFFFF804000807F | |
135 | + FFFFFF804000007FFFFFFF804000007FFC1FFF804000007F8000FF004000007C | |
136 | + 00001F0040008070000007804000804000000180400080000000008040008000 | |
137 | + 00000000C000C00000000000C000C00000000001C000800000000001C0000000 | |
138 | + 00000001C000000000000000C000000000000000C00080000000000040000000 | |
139 | + 0000000000000000000000000000000000000000000080000000000000008000 | |
140 | + 0000000040008000000000004000800000000000400080000000000040008000 | |
141 | + 00000000C000C00000000000C000C00000000000C000C00000000001C000E000 | |
142 | + 00000001C000E00000000001C000E00000000003C000F00000000007C000F800 | |
143 | + 00000007C000FC000000000FC000FC000000002FC000FC000000000FC000F800 | |
144 | + 00000007C000F80000000007C000F80000000007C000F80000000007C000FC00 | |
145 | + 0000000FC000FC000000000FC000FDAD8035B5BFC000} | |
146 | + OldCreateOrder = False | |
147 | + Position = poDesktopCenter | |
148 | + Visible = True | |
149 | + OnActivate = FormActivate | |
150 | + OnClose = FormClose | |
151 | + OnCreate = FormCreate | |
152 | + PixelsPerInch = 96 | |
153 | + TextHeight = 13 | |
154 | + object lbTeWebManagerAddress: TLabel | |
155 | + Left = 1 | |
156 | + Top = 309 | |
157 | + Width = 153 | |
158 | + Height = 13 | |
159 | + AutoSize = False | |
160 | + Caption = 'Endere'#231'o do Servidor de Aplica'#231#227'o:' | |
161 | + Font.Charset = DEFAULT_CHARSET | |
162 | + Font.Color = clWindowText | |
163 | + Font.Height = -9 | |
164 | + Font.Name = 'Arial' | |
165 | + Font.Style = [] | |
166 | + ParentFont = False | |
167 | + end | |
168 | + object lbVersao: TLabel | |
169 | + Left = 689 | |
170 | + Top = 310 | |
171 | + Width = 90 | |
172 | + Height = 13 | |
173 | + Alignment = taRightJustify | |
174 | + AutoSize = False | |
175 | + Caption = 'v: X.X.X.X' | |
176 | + Font.Charset = DEFAULT_CHARSET | |
177 | + Font.Color = clWindowText | |
178 | + Font.Height = -9 | |
179 | + Font.Name = 'Arial' | |
180 | + Font.Style = [] | |
181 | + ParentFont = False | |
182 | + end | |
183 | + object edTeWebManagerAddress: TLabel | |
184 | + Left = 156 | |
185 | + Top = 308 | |
186 | + Width = 146 | |
187 | + Height = 14 | |
188 | + Caption = 'EdTeWebManagerAddress' | |
189 | + Font.Charset = DEFAULT_CHARSET | |
190 | + Font.Color = clWindowText | |
191 | + Font.Height = -11 | |
192 | + Font.Name = 'Arial' | |
193 | + Font.Style = [fsBold] | |
194 | + ParentFont = False | |
195 | + end | |
196 | + object gbLeiaComAtencao: TGroupBox | |
197 | + Left = 1 | |
198 | + Top = -1 | |
199 | + Width = 780 | |
200 | + Height = 53 | |
201 | + Caption = ' Leia com aten'#231#227'o ' | |
202 | + Color = clBtnFace | |
203 | + Font.Charset = DEFAULT_CHARSET | |
204 | + Font.Color = clRed | |
205 | + Font.Height = -13 | |
206 | + Font.Name = 'MS Sans Serif' | |
207 | + Font.Style = [fsBold] | |
208 | + ParentColor = False | |
209 | + ParentFont = False | |
210 | + TabOrder = 0 | |
211 | + Visible = False | |
212 | + object lbLeiaComAtencao: TLabel | |
213 | + Left = 5 | |
214 | + Top = 14 | |
215 | + Width = 769 | |
216 | + Height = 32 | |
217 | + AutoSize = False | |
218 | + Caption = | |
219 | + 'O preenchimento correto dos campos abaixo '#233' de extrema import'#226'nc' + | |
220 | + 'ia para um efetivo controle patrimonial e de localiza'#231#227'o de equi' + | |
221 | + 'pamentos.' | |
222 | + Font.Charset = DEFAULT_CHARSET | |
223 | + Font.Color = clBlack | |
224 | + Font.Height = -13 | |
225 | + Font.Name = 'MS Sans Serif' | |
226 | + Font.Style = [] | |
227 | + ParentFont = False | |
228 | + WordWrap = True | |
229 | + end | |
230 | + end | |
231 | + object gbInformacoesSobreComputador: TGroupBox | |
232 | + Left = 1 | |
233 | + Top = 61 | |
234 | + Width = 780 | |
235 | + Height = 151 | |
236 | + Caption = | |
237 | + 'Informa'#231#245'es sobre localiza'#231#227'o f'#237'sica e patrimonial deste computa' + | |
238 | + 'dor' | |
239 | + Font.Charset = DEFAULT_CHARSET | |
240 | + Font.Color = clBlue | |
241 | + Font.Height = -11 | |
242 | + Font.Name = 'MS Sans Serif' | |
243 | + Font.Style = [fsBold] | |
244 | + ParentFont = False | |
245 | + TabOrder = 1 | |
246 | + Visible = False | |
247 | + object lbEtiqueta1: TLabel | |
248 | + Left = 3 | |
249 | + Top = 15 | |
250 | + Width = 48 | |
251 | + Height = 13 | |
252 | + Caption = 'Etiqueta 1' | |
253 | + Font.Charset = DEFAULT_CHARSET | |
254 | + Font.Color = clWindowText | |
255 | + Font.Height = -11 | |
256 | + Font.Name = 'MS Sans Serif' | |
257 | + Font.Style = [] | |
258 | + ParentFont = False | |
259 | + Visible = False | |
260 | + end | |
261 | + object lbEtiqueta2: TLabel | |
262 | + Left = 3 | |
263 | + Top = 105 | |
264 | + Width = 48 | |
265 | + Height = 13 | |
266 | + Caption = 'Etiqueta 2' | |
267 | + Font.Charset = DEFAULT_CHARSET | |
268 | + Font.Color = clWindowText | |
269 | + Font.Height = -11 | |
270 | + Font.Name = 'MS Sans Serif' | |
271 | + Font.Style = [] | |
272 | + ParentFont = False | |
273 | + Visible = False | |
274 | + end | |
275 | + object lbEtiqueta3: TLabel | |
276 | + Left = 341 | |
277 | + Top = 15 | |
278 | + Width = 48 | |
279 | + Height = 13 | |
280 | + Caption = 'Etiqueta 3' | |
281 | + Font.Charset = DEFAULT_CHARSET | |
282 | + Font.Color = clWindowText | |
283 | + Font.Height = -11 | |
284 | + Font.Name = 'MS Sans Serif' | |
285 | + Font.Style = [] | |
286 | + ParentFont = False | |
287 | + Visible = False | |
288 | + end | |
289 | + object lbEtiqueta4: TLabel | |
290 | + Left = 341 | |
291 | + Top = 60 | |
292 | + Width = 48 | |
293 | + Height = 13 | |
294 | + Caption = 'Etiqueta 4' | |
295 | + Font.Charset = DEFAULT_CHARSET | |
296 | + Font.Color = clWindowText | |
297 | + Font.Height = -11 | |
298 | + Font.Name = 'MS Sans Serif' | |
299 | + Font.Style = [] | |
300 | + ParentFont = False | |
301 | + Visible = False | |
302 | + end | |
303 | + object lbEtiqueta5: TLabel | |
304 | + Left = 493 | |
305 | + Top = 60 | |
306 | + Width = 48 | |
307 | + Height = 13 | |
308 | + Caption = 'Etiqueta 5' | |
309 | + Font.Charset = DEFAULT_CHARSET | |
310 | + Font.Color = clWindowText | |
311 | + Font.Height = -11 | |
312 | + Font.Name = 'MS Sans Serif' | |
313 | + Font.Style = [] | |
314 | + ParentFont = False | |
315 | + Visible = False | |
316 | + end | |
317 | + object lbEtiqueta6: TLabel | |
318 | + Left = 645 | |
319 | + Top = 60 | |
320 | + Width = 48 | |
321 | + Height = 13 | |
322 | + Caption = 'Etiqueta 6' | |
323 | + Font.Charset = DEFAULT_CHARSET | |
324 | + Font.Color = clWindowText | |
325 | + Font.Height = -11 | |
326 | + Font.Name = 'MS Sans Serif' | |
327 | + Font.Style = [] | |
328 | + ParentFont = False | |
329 | + Visible = False | |
330 | + end | |
331 | + object lbEtiqueta7: TLabel | |
332 | + Left = 341 | |
333 | + Top = 105 | |
334 | + Width = 48 | |
335 | + Height = 13 | |
336 | + Caption = 'Etiqueta 7' | |
337 | + Font.Charset = DEFAULT_CHARSET | |
338 | + Font.Color = clWindowText | |
339 | + Font.Height = -11 | |
340 | + Font.Name = 'MS Sans Serif' | |
341 | + Font.Style = [] | |
342 | + ParentFont = False | |
343 | + Visible = False | |
344 | + end | |
345 | + object lbEtiqueta8: TLabel | |
346 | + Left = 493 | |
347 | + Top = 105 | |
348 | + Width = 48 | |
349 | + Height = 13 | |
350 | + Caption = 'Etiqueta 8' | |
351 | + Font.Charset = DEFAULT_CHARSET | |
352 | + Font.Color = clWindowText | |
353 | + Font.Height = -11 | |
354 | + Font.Name = 'MS Sans Serif' | |
355 | + Font.Style = [] | |
356 | + ParentFont = False | |
357 | + Visible = False | |
358 | + end | |
359 | + object lbEtiqueta9: TLabel | |
360 | + Left = 645 | |
361 | + Top = 105 | |
362 | + Width = 48 | |
363 | + Height = 13 | |
364 | + Caption = 'Etiqueta 9' | |
365 | + Font.Charset = DEFAULT_CHARSET | |
366 | + Font.Color = clWindowText | |
367 | + Font.Height = -11 | |
368 | + Font.Name = 'MS Sans Serif' | |
369 | + Font.Style = [] | |
370 | + ParentFont = False | |
371 | + Visible = False | |
372 | + end | |
373 | + object lbEtiqueta1a: TLabel | |
374 | + Left = 3 | |
375 | + Top = 60 | |
376 | + Width = 54 | |
377 | + Height = 13 | |
378 | + Caption = 'Etiqueta 1a' | |
379 | + Font.Charset = DEFAULT_CHARSET | |
380 | + Font.Color = clWindowText | |
381 | + Font.Height = -11 | |
382 | + Font.Name = 'MS Sans Serif' | |
383 | + Font.Style = [] | |
384 | + ParentFont = False | |
385 | + Visible = False | |
386 | + end | |
387 | + object cb_id_unid_organizacional_nivel1: TComboBox | |
388 | + Left = 3 | |
389 | + Top = 30 | |
390 | + Width = 325 | |
391 | + Height = 21 | |
392 | + Hint = 'Esse '#233' o texto de ajuda da "Etiqueta 1"' | |
393 | + Style = csDropDownList | |
394 | + Font.Charset = DEFAULT_CHARSET | |
395 | + Font.Color = clWindowText | |
396 | + Font.Height = -11 | |
397 | + Font.Name = 'MS Sans Serif' | |
398 | + Font.Style = [] | |
399 | + ItemHeight = 13 | |
400 | + ParentFont = False | |
401 | + ParentShowHint = False | |
402 | + ShowHint = True | |
403 | + TabOrder = 0 | |
404 | + Visible = False | |
405 | + OnChange = cb_id_unid_organizacional_nivel1Change | |
406 | + end | |
407 | + object cb_id_unid_organizacional_nivel2: TComboBox | |
408 | + Left = 3 | |
409 | + Top = 120 | |
410 | + Width = 325 | |
411 | + Height = 21 | |
412 | + Style = csDropDownList | |
413 | + Enabled = False | |
414 | + Font.Charset = DEFAULT_CHARSET | |
415 | + Font.Color = clWindowText | |
416 | + Font.Height = -11 | |
417 | + Font.Name = 'MS Sans Serif' | |
418 | + Font.Style = [] | |
419 | + ItemHeight = 13 | |
420 | + ParentFont = False | |
421 | + ParentShowHint = False | |
422 | + ShowHint = True | |
423 | + TabOrder = 1 | |
424 | + Visible = False | |
425 | + end | |
426 | + object ed_te_localizacao_complementar: TEdit | |
427 | + Left = 341 | |
428 | + Top = 30 | |
429 | + Width = 434 | |
430 | + Height = 22 | |
431 | + Font.Charset = DEFAULT_CHARSET | |
432 | + Font.Color = clWindowText | |
433 | + Font.Height = -11 | |
434 | + Font.Name = 'Arial' | |
435 | + Font.Style = [] | |
436 | + MaxLength = 100 | |
437 | + ParentFont = False | |
438 | + ParentShowHint = False | |
439 | + ShowHint = True | |
440 | + TabOrder = 2 | |
441 | + Visible = False | |
442 | + end | |
443 | + object ed_te_info_patrimonio3: TEdit | |
444 | + Left = 645 | |
445 | + Top = 75 | |
446 | + Width = 130 | |
447 | + Height = 21 | |
448 | + Font.Charset = DEFAULT_CHARSET | |
449 | + Font.Color = clWindowText | |
450 | + Font.Height = -11 | |
451 | + Font.Name = 'MS Sans Serif' | |
452 | + Font.Style = [] | |
453 | + MaxLength = 20 | |
454 | + ParentFont = False | |
455 | + ParentShowHint = False | |
456 | + ShowHint = True | |
457 | + TabOrder = 5 | |
458 | + Visible = False | |
459 | + end | |
460 | + object ed_te_info_patrimonio1: TEdit | |
461 | + Left = 341 | |
462 | + Top = 75 | |
463 | + Width = 130 | |
464 | + Height = 21 | |
465 | + Font.Charset = DEFAULT_CHARSET | |
466 | + Font.Color = clWindowText | |
467 | + Font.Height = -11 | |
468 | + Font.Name = 'MS Sans Serif' | |
469 | + Font.Style = [] | |
470 | + MaxLength = 20 | |
471 | + ParentFont = False | |
472 | + ParentShowHint = False | |
473 | + ShowHint = True | |
474 | + TabOrder = 3 | |
475 | + Visible = False | |
476 | + end | |
477 | + object ed_te_info_patrimonio2: TEdit | |
478 | + Left = 493 | |
479 | + Top = 75 | |
480 | + Width = 130 | |
481 | + Height = 21 | |
482 | + Font.Charset = DEFAULT_CHARSET | |
483 | + Font.Color = clWindowText | |
484 | + Font.Height = -11 | |
485 | + Font.Name = 'MS Sans Serif' | |
486 | + Font.Style = [] | |
487 | + MaxLength = 20 | |
488 | + ParentFont = False | |
489 | + ParentShowHint = False | |
490 | + ShowHint = True | |
491 | + TabOrder = 4 | |
492 | + Visible = False | |
493 | + end | |
494 | + object ed_te_info_patrimonio6: TEdit | |
495 | + Left = 645 | |
496 | + Top = 120 | |
497 | + Width = 130 | |
498 | + Height = 21 | |
499 | + Font.Charset = DEFAULT_CHARSET | |
500 | + Font.Color = clWindowText | |
501 | + Font.Height = -11 | |
502 | + Font.Name = 'MS Sans Serif' | |
503 | + Font.Style = [] | |
504 | + MaxLength = 20 | |
505 | + ParentFont = False | |
506 | + ParentShowHint = False | |
507 | + ShowHint = True | |
508 | + TabOrder = 8 | |
509 | + Visible = False | |
510 | + end | |
511 | + object ed_te_info_patrimonio4: TEdit | |
512 | + Left = 341 | |
513 | + Top = 120 | |
514 | + Width = 130 | |
515 | + Height = 21 | |
516 | + Font.Charset = DEFAULT_CHARSET | |
517 | + Font.Color = clWindowText | |
518 | + Font.Height = -11 | |
519 | + Font.Name = 'MS Sans Serif' | |
520 | + Font.Style = [] | |
521 | + MaxLength = 20 | |
522 | + ParentFont = False | |
523 | + ParentShowHint = False | |
524 | + ShowHint = True | |
525 | + TabOrder = 6 | |
526 | + Visible = False | |
527 | + end | |
528 | + object ed_te_info_patrimonio5: TEdit | |
529 | + Left = 493 | |
530 | + Top = 120 | |
531 | + Width = 130 | |
532 | + Height = 21 | |
533 | + Font.Charset = DEFAULT_CHARSET | |
534 | + Font.Color = clWindowText | |
535 | + Font.Height = -11 | |
536 | + Font.Name = 'MS Sans Serif' | |
537 | + Font.Style = [] | |
538 | + MaxLength = 20 | |
539 | + ParentFont = False | |
540 | + ParentShowHint = False | |
541 | + ShowHint = True | |
542 | + TabOrder = 7 | |
543 | + Visible = False | |
544 | + end | |
545 | + object cb_id_unid_organizacional_nivel1a: TComboBox | |
546 | + Left = 3 | |
547 | + Top = 75 | |
548 | + Width = 325 | |
549 | + Height = 22 | |
550 | + Style = csDropDownList | |
551 | + Enabled = False | |
552 | + Font.Charset = DEFAULT_CHARSET | |
553 | + Font.Color = clWindowText | |
554 | + Font.Height = -11 | |
555 | + Font.Name = 'Arial' | |
556 | + Font.Style = [] | |
557 | + ItemHeight = 14 | |
558 | + ParentFont = False | |
559 | + ParentShowHint = False | |
560 | + ShowHint = True | |
561 | + TabOrder = 9 | |
562 | + Visible = False | |
563 | + OnChange = cb_id_unid_organizacional_nivel1aChange | |
564 | + end | |
565 | + object Panel1: TPanel | |
566 | + Left = 333 | |
567 | + Top = 16 | |
568 | + Width = 2 | |
569 | + Height = 125 | |
570 | + Caption = 'Panel1' | |
571 | + TabOrder = 10 | |
572 | + end | |
573 | + end | |
574 | + object btGravarInformacoes: TButton | |
575 | + Left = 192 | |
576 | + Top = 259 | |
577 | + Width = 401 | |
578 | + Height = 30 | |
579 | + Caption = 'Grava e Envia Informa'#231#245'es Patrimoniais ao Gerente WEB' | |
580 | + Font.Charset = DEFAULT_CHARSET | |
581 | + Font.Color = clWindowText | |
582 | + Font.Height = -13 | |
583 | + Font.Name = 'Arial' | |
584 | + Font.Style = [fsBold] | |
585 | + ParentFont = False | |
586 | + TabOrder = 2 | |
587 | + Visible = False | |
588 | + OnClick = AtualizaPatrimonio | |
589 | + end | |
590 | + object pnMensagens: TPanel | |
591 | + Left = 1 | |
592 | + Top = 212 | |
593 | + Width = 779 | |
594 | + Height = 22 | |
595 | + BevelInner = bvLowered | |
596 | + TabOrder = 3 | |
597 | + object lbMensagens: TLabel | |
598 | + Left = 2 | |
599 | + Top = 2 | |
600 | + Width = 775 | |
601 | + Height = 18 | |
602 | + Align = alClient | |
603 | + Alignment = taCenter | |
604 | + AutoSize = False | |
605 | + Font.Charset = DEFAULT_CHARSET | |
606 | + Font.Color = clWindowText | |
607 | + Font.Height = -13 | |
608 | + Font.Name = 'MS Sans Serif' | |
609 | + Font.Style = [] | |
610 | + ParentFont = False | |
611 | + end | |
612 | + end | |
613 | +end | ... | ... |
... | ... | @@ -0,0 +1,1102 @@ |
1 | +(** | |
2 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
3 | +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
4 | + | |
5 | +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
6 | + | |
7 | +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
8 | +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. | |
9 | + | |
10 | +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
11 | +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
12 | + | |
13 | +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
14 | +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
15 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
16 | +*) | |
17 | + | |
18 | +unit main_mapa; | |
19 | + | |
20 | +interface | |
21 | + | |
22 | +uses | |
23 | + Windows, | |
24 | + Sysutils, // Deve ser colocado após o Windows acima, nunca antes | |
25 | + strutils, | |
26 | + IdTCPConnection, | |
27 | + IdTCPClient, | |
28 | + IdHTTP, | |
29 | + IdBaseComponent, | |
30 | + IdComponent, | |
31 | + WinSock, | |
32 | + NB30, | |
33 | + StdCtrls, | |
34 | + Controls, | |
35 | + Classes, | |
36 | + Forms, | |
37 | + ExtCtrls, | |
38 | + Graphics, | |
39 | + Dialogs, | |
40 | + CACIC_Library, | |
41 | + LibXmlParser; // Usado em MontaCombos | |
42 | + | |
43 | +var | |
44 | + intPausaPadrao : integer; | |
45 | + | |
46 | +var v_Aguarde : TextFile; | |
47 | + | |
48 | +var | |
49 | + boolDebugs, | |
50 | + boolFinalizar : boolean; | |
51 | + | |
52 | +var | |
53 | + g_oCacic : TCACIC; | |
54 | + | |
55 | +type | |
56 | + TfrmMapaCacic = class(TForm) | |
57 | + gbLeiaComAtencao: TGroupBox; | |
58 | + lbLeiaComAtencao: TLabel; | |
59 | + gbInformacoesSobreComputador: TGroupBox; | |
60 | + lbEtiqueta1: TLabel; | |
61 | + lbEtiqueta2: TLabel; | |
62 | + lbEtiqueta3: TLabel; | |
63 | + cb_id_unid_organizacional_nivel1: TComboBox; | |
64 | + cb_id_unid_organizacional_nivel2: TComboBox; | |
65 | + ed_te_localizacao_complementar: TEdit; | |
66 | + btGravarInformacoes: TButton; | |
67 | + lbEtiqueta4: TLabel; | |
68 | + lbEtiqueta5: TLabel; | |
69 | + lbEtiqueta6: TLabel; | |
70 | + lbEtiqueta7: TLabel; | |
71 | + lbEtiqueta8: TLabel; | |
72 | + lbEtiqueta9: TLabel; | |
73 | + ed_te_info_patrimonio1: TEdit; | |
74 | + ed_te_info_patrimonio2: TEdit; | |
75 | + ed_te_info_patrimonio3: TEdit; | |
76 | + ed_te_info_patrimonio4: TEdit; | |
77 | + ed_te_info_patrimonio5: TEdit; | |
78 | + ed_te_info_patrimonio6: TEdit; | |
79 | + pnMensagens: TPanel; | |
80 | + lbMensagens: TLabel; | |
81 | + lbEtiqueta1a: TLabel; | |
82 | + cb_id_unid_organizacional_nivel1a: TComboBox; | |
83 | + Panel1: TPanel; | |
84 | + lbTeWebManagerAddress: TLabel; | |
85 | + lbVersao: TLabel; | |
86 | + edTeWebManagerAddress: TLabel; | |
87 | + | |
88 | + procedure mapa; | |
89 | + procedure MontaCombos(p_strConfigs : String); | |
90 | + procedure MontaInterface(p_strConfigs : String); | |
91 | + procedure FormClose(Sender: TObject; var Action: TCloseAction); | |
92 | + procedure cb_id_unid_organizacional_nivel1Change(Sender: TObject); | |
93 | + procedure AtualizaPatrimonio(Sender: TObject); | |
94 | + procedure RecuperaValoresAnteriores(p_strConfigs : String); | |
95 | + procedure CriaFormSenha(Sender: TObject); | |
96 | + Function ComunicaServidor(URL : String; Request : TStringList; MsgAcao: String) : String; | |
97 | + procedure Finalizar(p_pausa:boolean); | |
98 | + procedure Sair; | |
99 | + function LastPos(SubStr, S: string): Integer; | |
100 | + Function Rat(OQue: String; Onde: String) : Integer; | |
101 | + Function RetornaValorVetorUON1(id1 : string) : String; | |
102 | + Function RetornaValorVetorUON1a(id1a : string) : String; | |
103 | + Function RetornaValorVetorUON2(id2,idLocal : string) : String; | |
104 | + function LetrasDrives: string; | |
105 | + function SearchFile(p_Drive,p_File:string) : boolean; | |
106 | + procedure GetSubDirs(Folder:string; sList:TStringList); | |
107 | + procedure Mensagem(p_strMsg : String; p_boolAlerta : boolean; p_intPausaSegundos : integer); | |
108 | + procedure cb_id_unid_organizacional_nivel1aChange(Sender: TObject); | |
109 | + procedure FormActivate(Sender: TObject); | |
110 | + procedure FormCreate(Sender: TObject); | |
111 | + private | |
112 | + strId_unid_organizacional_nivel1, | |
113 | + strId_unid_organizacional_nivel1a, | |
114 | + strId_unid_organizacional_nivel2, | |
115 | + strId_Local, | |
116 | + strTe_localizacao_complementar, | |
117 | + strTe_info_patrimonio1, | |
118 | + strTe_info_patrimonio2, | |
119 | + strTe_info_patrimonio3, | |
120 | + strTe_info_patrimonio4, | |
121 | + strTe_info_patrimonio5, | |
122 | + strTe_info_patrimonio6 : String; | |
123 | + public | |
124 | + boolAcessoOK : boolean; | |
125 | + strId_usuario : String; | |
126 | + end; | |
127 | + | |
128 | +var | |
129 | + frmMapaCacic: TfrmMapaCacic; | |
130 | + | |
131 | +implementation | |
132 | + | |
133 | +uses acesso, Math; | |
134 | + | |
135 | +{$R *.dfm} | |
136 | + | |
137 | + | |
138 | +// Estruturas de dados para armazenar os itens das Unidades Organizacionais de Níveis 1, 1a e 2 | |
139 | +type | |
140 | + TRegistroUON1 = record | |
141 | + id1 : String; | |
142 | + nm1 : String; | |
143 | + end; | |
144 | + TVetorUON1 = array of TRegistroUON1; | |
145 | + | |
146 | + TRegistroUON1a = record | |
147 | + id1 : String; | |
148 | + id1a : String; | |
149 | + nm1a : String; | |
150 | + id_local: String; | |
151 | + end; | |
152 | + | |
153 | + TVetorUON1a = array of TRegistroUON1a; | |
154 | + | |
155 | + TRegistroUON2 = record | |
156 | + id1a : String; | |
157 | + id2 : String; | |
158 | + nm2 : String; | |
159 | + id_local: String; | |
160 | + end; | |
161 | + TVetorUON2 = array of TRegistroUON2; | |
162 | + | |
163 | +var VetorUON1 : TVetorUON1; | |
164 | + VetorUON1a : TVetorUON1a; | |
165 | + VetorUON2 : TVetorUON2; | |
166 | + | |
167 | + // Esse array é usado apenas para saber a uon1a, após a filtragem pelo uon1 | |
168 | + VetorUON1aFiltrado : array of String; | |
169 | + | |
170 | + // Esse array é usado apenas para saber a uon2, após a filtragem pelo uon1a | |
171 | + VetorUON2Filtrado : array of String; | |
172 | + | |
173 | +// Baixada de http://www.geocities.com/SiliconValley/Bay/1058/fdelphi.html | |
174 | +Function TfrmMapaCacic.Rat(OQue: String; Onde: String) : Integer; | |
175 | +// Procura uma string dentro de outra, da direita para esquerda | |
176 | +// Retorna a posição onde foi encontrada ou 0 caso não seja encontrada | |
177 | +var | |
178 | +Pos : Integer; | |
179 | +Tam1 : Integer; | |
180 | +Tam2 : Integer; | |
181 | +Achou : Boolean; | |
182 | +begin | |
183 | +Tam1 := Length(OQue); | |
184 | +Tam2 := Length(Onde); | |
185 | +Pos := Tam2-Tam1+1; | |
186 | +Achou := False; | |
187 | +while (Pos >= 1) and not Achou do | |
188 | + begin | |
189 | + if Copy(Onde, Pos, Tam1) = OQue then | |
190 | + begin | |
191 | + Achou := True | |
192 | + end | |
193 | + else | |
194 | + begin | |
195 | + Pos := Pos - 1; | |
196 | + end; | |
197 | + end; | |
198 | +Result := Pos; | |
199 | +end; | |
200 | + | |
201 | +procedure TfrmMapaCacic.Mensagem(p_strMsg : String; p_boolAlerta : boolean; p_intPausaSegundos : integer); | |
202 | +Begin | |
203 | + g_oCacic.writeDebugLog(p_strMsg); | |
204 | + if p_boolAlerta then | |
205 | + lbMensagens.Font.Color := clRed | |
206 | + else | |
207 | + lbMensagens.Font.Color := clBlack; | |
208 | + | |
209 | + lbMensagens.Caption := p_strMsg; | |
210 | + g_oCacic.writeDailyLog(lbMensagens.Caption); | |
211 | + Application.ProcessMessages; | |
212 | + if (p_intPausaSegundos > 0) then | |
213 | + sleep(p_intPausaSegundos); | |
214 | +End; | |
215 | + | |
216 | +procedure TfrmMapaCacic.Sair; | |
217 | +Begin | |
218 | + g_oCacic.Free(); | |
219 | + Application.Terminate; | |
220 | +End; | |
221 | + | |
222 | +procedure TfrmMapaCacic.Finalizar(p_pausa:boolean); | |
223 | +Begin | |
224 | + Mensagem('Finalizando MapaCacic...',false,0); | |
225 | + | |
226 | + g_oCacic.killFiles(g_oCacic.getLocalFolder + 'Temp','*.vbs'); | |
227 | + g_oCacic.killFiles(g_oCacic.getLocalFolder + 'Temp','*.txt'); | |
228 | + if p_pausa then sleep(2000); // Pausa de 2 segundos para conclusão de operações de arquivos. | |
229 | + Sair; | |
230 | +End; | |
231 | +// | |
232 | +function TfrmMapaCacic.LastPos(SubStr, S: string): Integer; | |
233 | +var | |
234 | + Found, Len, Pos: integer; | |
235 | +begin | |
236 | + Pos := Length(S); | |
237 | + Len := Length(SubStr); | |
238 | + Found := 0; | |
239 | + while (Pos > 0) and (Found = 0) do | |
240 | + begin | |
241 | + if Copy(S, Pos, Len) = SubStr then | |
242 | + Found := Pos; | |
243 | + Dec(Pos); | |
244 | + end; | |
245 | + LastPos := Found; | |
246 | +end; | |
247 | + | |
248 | +Function TfrmMapaCacic.ComunicaServidor(URL : String; Request : TStringList; MsgAcao: String) : String; | |
249 | +var Response_CS : TStringStream; | |
250 | + strAddress, | |
251 | + strTeWebManagerAddress, | |
252 | + strTeWebServicesFolder : String; | |
253 | + idHTTP1 : TIdHTTP; | |
254 | + intAux : integer; | |
255 | + tStringListAuxRequest : TStringList; | |
256 | +Begin | |
257 | + tStringListAuxRequest := TStringList.Create; | |
258 | + tStringListAuxRequest := Request; | |
259 | + | |
260 | + tStringListAuxRequest.Values['cs_cipher'] := '1'; | |
261 | + tStringListAuxRequest.Values['cs_compress'] := '0'; | |
262 | + | |
263 | + | |
264 | + strTeWebServicesFolder := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebServicesFolder', g_oCacic.getWinDir + 'chksis.ini')); | |
265 | + strTeWebManagerAddress := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress', g_oCacic.getWinDir + 'chksis.ini')); | |
266 | + | |
267 | + if (trim(strTeWebServicesFolder)='') then | |
268 | + strTeWebServicesFolder := '/ws/'; | |
269 | + | |
270 | + if (trim(strTeWebManagerAddress)='') then | |
271 | + strTeWebManagerAddress := Trim(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress',g_oCacic.getLocalFolder + 'GER_COLS.inf'))); | |
272 | + | |
273 | + strAddress := 'http://' + strTeWebManagerAddress + strTeWebServicesFolder + URL; | |
274 | + | |
275 | + if (trim(MsgAcao)='') then | |
276 | + MsgAcao := '>> Enviando informações iniciais ao Gerente WEB.'; | |
277 | + | |
278 | + g_oCacic.writeDailyLog(MsgAcao); | |
279 | + | |
280 | + Application.ProcessMessages; | |
281 | + | |
282 | + Response_CS := TStringStream.Create(''); | |
283 | + | |
284 | + g_oCacic.writeDebugLog('Iniciando comunicação com http://' + strTeWebManagerAddress + strTeWebServicesFolder + URL); | |
285 | + | |
286 | + Try | |
287 | + idHTTP1 := TIdHTTP.Create(nil); | |
288 | + idHTTP1.AllowCookies := true; | |
289 | + idHTTP1.ASCIIFilter := false; | |
290 | + idHTTP1.AuthRetries := 1; | |
291 | + idHTTP1.BoundPort := 0; | |
292 | + idHTTP1.HandleRedirects := false; | |
293 | + idHTTP1.ProxyParams.BasicAuthentication := false; | |
294 | + idHTTP1.ProxyParams.ProxyPort := 0; | |
295 | + idHTTP1.ReadTimeout := 0; | |
296 | + idHTTP1.RecvBufferSize := 32768; | |
297 | + idHTTP1.RedirectMaximum := 15; | |
298 | + idHTTP1.Request.UserAgent := g_oCacic.enCrypt('AGENTE_CACIC'); | |
299 | + idHTTP1.Request.Username := g_oCacic.enCrypt('USER_CACIC'); | |
300 | + idHTTP1.Request.Password := g_oCacic.enCrypt('PW_CACIC'); | |
301 | + idHTTP1.Request.Accept := 'text/html, */*'; | |
302 | + idHTTP1.Request.BasicAuthentication := true; | |
303 | + idHTTP1.Request.ContentLength := -1; | |
304 | + idHTTP1.Request.ContentRangeStart := 0; | |
305 | + idHTTP1.Request.ContentRangeEnd := 0; | |
306 | + idHTTP1.Request.ContentType := 'text/html'; | |
307 | + idHTTP1.SendBufferSize := 32768; | |
308 | + idHTTP1.Tag := 0; | |
309 | + | |
310 | + if boolDebugs then | |
311 | + Begin | |
312 | + g_oCacic.writeDebugLog('Valores de REQUEST para envio ao Gerente WEB:'); | |
313 | + for intAux := 0 to tStringListAuxRequest.count -1 do | |
314 | + g_oCacic.writeDebugLog('#'+inttostr(intAux)+': '+tStringListAuxRequest[intAux]); | |
315 | + End; | |
316 | + | |
317 | + IdHTTP1.Post(strAddress, tStringListAuxRequest, Response_CS); | |
318 | + idHTTP1.Free; | |
319 | + g_oCacic.writeDebugLog('Retorno: "'+Response_CS.DataString+'"'); | |
320 | + Except | |
321 | + Mensagem('ERRO! Comunicação impossível com o endereço ' + strAddress + ': '+Response_CS.DataString,true,intPausaPadrao); | |
322 | + result := '0'; | |
323 | + Exit; | |
324 | + end; | |
325 | + | |
326 | + Application.ProcessMessages; | |
327 | + Try | |
328 | + if (UpperCase(g_oCacic.xmlGetValue('Status', Response_CS.DataString)) <> 'OK') Then | |
329 | + Begin | |
330 | + Mensagem('PROBLEMAS DURANTE A COMUNICAÇÃO',true,intPausaPadrao); | |
331 | + g_oCacic.writeDailyLog('Endereço: ' + strAddress); | |
332 | + g_oCacic.writeDailyLog('Mensagem: ' + Response_CS.DataString); | |
333 | + result := '0'; | |
334 | + end | |
335 | + Else | |
336 | + Begin | |
337 | + result := Response_CS.DataString; | |
338 | + end; | |
339 | + Response_CS.Free; | |
340 | + Except | |
341 | + Begin | |
342 | + Mensagem('PROBLEMAS DURANTE A COMUNICAÇÃO',true,intPausaPadrao); | |
343 | + g_oCacic.writeDailyLog('Endereço: ' + strAddress); | |
344 | + g_oCacic.writeDailyLog('Mensagem: ' + Response_CS.DataString); | |
345 | + result := '0'; | |
346 | + End; | |
347 | + End; | |
348 | +end; | |
349 | + | |
350 | +Function TfrmMapaCacic.RetornaValorVetorUON1(id1 : string) : String; | |
351 | +var I : Integer; | |
352 | +begin | |
353 | + For I := 0 to (Length(VetorUON1)-1) Do | |
354 | + If (VetorUON1[I].id1 = id1) Then Result := VetorUON1[I].nm1; | |
355 | +end; | |
356 | + | |
357 | +Function TfrmMapaCacic.RetornaValorVetorUON1a(id1a : string) : String; | |
358 | +var I : Integer; | |
359 | +begin | |
360 | + For I := 0 to (Length(VetorUON1a)-1) Do | |
361 | + If (VetorUON1a[I].id1a = id1a) Then Result := VetorUON1a[I].nm1a; | |
362 | +end; | |
363 | + | |
364 | +Function TfrmMapaCacic.RetornaValorVetorUON2(id2, idLocal: string) : String; | |
365 | +var I : Integer; | |
366 | +begin | |
367 | + For I := 0 to (Length(VetorUON2)-1) Do | |
368 | + If (VetorUON2[I].id2 = id2) and | |
369 | + (VetorUON2[I].id_local = idLocal) Then Result := VetorUON2[I].nm2; | |
370 | +end; | |
371 | + | |
372 | +procedure TfrmMapaCacic.RecuperaValoresAnteriores(p_strConfigs : String); | |
373 | +begin | |
374 | + Mensagem('Recuperando Valores Anteriores...',false,intPausaPadrao div 3); | |
375 | + | |
376 | + strId_unid_organizacional_nivel1 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_unid_organizacional_nivel1',g_oCacic.getLocalFolder + g_oCacic.getInfFileName) ); | |
377 | + if (strId_unid_organizacional_nivel1='') then | |
378 | + strId_unid_organizacional_nivel1 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_UON1', p_strConfigs)); | |
379 | + | |
380 | + strId_unid_organizacional_nivel1a := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_unid_organizacional_nivel1a',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
381 | + if (strId_unid_organizacional_nivel1a='') then | |
382 | + strId_unid_organizacional_nivel1a := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_UON1a', p_strConfigs)); | |
383 | + | |
384 | + strId_unid_organizacional_nivel2 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_unid_organizacional_nivel2',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
385 | + if (strId_unid_organizacional_nivel2='') then | |
386 | + strId_unid_organizacional_nivel2 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_UON2', p_strConfigs)); | |
387 | + | |
388 | + strId_Local := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','id_local',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
389 | + if (strId_Local='') then | |
390 | + strId_Local := g_oCacic.deCrypt(g_oCacic.xmlGetValue('ID_LOCAL', p_strConfigs)); | |
391 | + | |
392 | + Try | |
393 | + cb_id_unid_organizacional_nivel1.ItemIndex := cb_id_unid_organizacional_nivel1.Items.IndexOf(RetornaValorVetorUON1(strId_unid_organizacional_nivel1)); | |
394 | + cb_id_unid_organizacional_nivel1Change(Nil); // Para filtrar os valores do combo2 de acordo com o valor selecionado no combo1 | |
395 | + cb_id_unid_organizacional_nivel1a.ItemIndex := cb_id_unid_organizacional_nivel1a.Items.IndexOf(RetornaValorVetorUON1(strId_unid_organizacional_nivel1)); | |
396 | + Except | |
397 | + end; | |
398 | + | |
399 | + Try | |
400 | + cb_id_unid_organizacional_nivel1a.ItemIndex := cb_id_unid_organizacional_nivel1a.Items.IndexOf(RetornaValorVetorUON1a(strId_unid_organizacional_nivel1a)); | |
401 | + cb_id_unid_organizacional_nivel1aChange(Nil); // Para filtrar os valores do combo3 de acordo com o valor selecionado no combo2 | |
402 | + cb_id_unid_organizacional_nivel2.ItemIndex := cb_id_unid_organizacional_nivel2.Items.IndexOf(RetornaValorVetorUON2(strId_unid_organizacional_nivel2,strId_Local)); | |
403 | + Except | |
404 | + end; | |
405 | + | |
406 | + lbEtiqueta1.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1', p_strConfigs)); | |
407 | + lbEtiqueta1a.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1a', p_strConfigs)); | |
408 | + | |
409 | + strTe_localizacao_complementar := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_localizacao_complementar',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
410 | + if (strTe_localizacao_complementar='') then strTe_localizacao_complementar := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_LOC_COMPL', p_strConfigs)); | |
411 | + | |
412 | + // Tentarei buscar informação gravada no Registry | |
413 | + strTe_info_patrimonio1 := g_oCacic.getValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio1'); | |
414 | + if (strTe_info_patrimonio1='') then strTe_info_patrimonio1 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio1',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
415 | + if (strTe_info_patrimonio1='') then strTe_info_patrimonio1 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO1', p_strConfigs)); | |
416 | + | |
417 | + strTe_info_patrimonio2 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio2',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
418 | + if (strTe_info_patrimonio2='') then strTe_info_patrimonio2 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO2', p_strConfigs)); | |
419 | + | |
420 | + strTe_info_patrimonio3 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio3',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
421 | + if (strTe_info_patrimonio3='') then strTe_info_patrimonio3 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO3', p_strConfigs)); | |
422 | + | |
423 | + // Tentarei buscar informação gravada no Registry | |
424 | + strTe_info_patrimonio4 := g_oCacic.getValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio4'); | |
425 | + if (strTe_info_patrimonio4='') then strTe_info_patrimonio4 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio4',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
426 | + | |
427 | + if (strTe_info_patrimonio4='') then strTe_info_patrimonio4 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO4', p_strConfigs)); | |
428 | + | |
429 | + strTe_info_patrimonio5 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio5',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
430 | + if (strTe_info_patrimonio5='') then strTe_info_patrimonio5 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO5', p_strConfigs)); | |
431 | + | |
432 | + strTe_info_patrimonio6 := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','te_info_patrimonio6',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
433 | + if (strTe_info_patrimonio6='') then strTe_info_patrimonio6 := g_oCacic.deCrypt(g_oCacic.xmlGetValue('TE_INFO6', p_strConfigs)); | |
434 | +end; | |
435 | + | |
436 | +procedure TfrmMapaCacic.MontaCombos(p_strConfigs : String); | |
437 | +var Parser : TXmlParser; | |
438 | + i : integer; | |
439 | + strAux, | |
440 | + strAux1, | |
441 | + strTagName, | |
442 | + strItemName : string; | |
443 | +begin | |
444 | + Mensagem('Montando Listas para Seleção de Unidades Organizacionais...',false,intPausaPadrao div 3); | |
445 | + | |
446 | + Parser := TXmlParser.Create; | |
447 | + Parser.Normalize := True; | |
448 | + Parser.LoadFromBuffer(PAnsiChar(p_strConfigs)); | |
449 | + g_oCacic.writeDebugLog('p_strConfigs: '+p_strConfigs); | |
450 | + Parser.StartScan; | |
451 | + i := -1; | |
452 | + strItemName := ''; | |
453 | + strTagName := ''; | |
454 | + While Parser.Scan DO | |
455 | + Begin | |
456 | + strItemName := UpperCase(Parser.CurName); | |
457 | + if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1') Then | |
458 | + Begin | |
459 | + i := i + 1; | |
460 | + SetLength(VetorUON1, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. | |
461 | + strTagName := 'IT1'; | |
462 | + end | |
463 | + else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1') then | |
464 | + strTagName := '' | |
465 | + else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT1')Then | |
466 | + Begin | |
467 | + strAux1 := g_oCacic.deCrypt(Parser.CurContent); | |
468 | + if (strItemName = 'ID1') then | |
469 | + Begin | |
470 | + VetorUON1[i].id1 := strAux1; | |
471 | + g_oCacic.writeDebugLog('Gravei VetorUON1.id1: "'+strAux1+'"'); | |
472 | + End | |
473 | + else if (strItemName = 'NM1') then | |
474 | + Begin | |
475 | + VetorUON1[i].nm1 := strAux1; | |
476 | + g_oCacic.writeDebugLog('Gravei VetorUON1.nm1: "'+strAux1+'"'); | |
477 | + End; | |
478 | + End; | |
479 | + End; | |
480 | + | |
481 | + // Código para montar o combo 2 | |
482 | + Parser.StartScan; | |
483 | + strTagName := ''; | |
484 | + strAux1 := ''; | |
485 | + | |
486 | + i := -1; | |
487 | + While Parser.Scan DO | |
488 | + Begin | |
489 | + strItemName := UpperCase(Parser.CurName); | |
490 | + if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1A') Then | |
491 | + Begin | |
492 | + i := i + 1; | |
493 | + SetLength(VetorUON1a, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. | |
494 | + strTagName := 'IT1A'; | |
495 | + end | |
496 | + else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1A') then | |
497 | + strTagName := '' | |
498 | + else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT1A')Then | |
499 | + Begin | |
500 | + strAux1 := g_oCacic.deCrypt(Parser.CurContent); | |
501 | + if (strItemName = 'ID1') then | |
502 | + Begin | |
503 | + VetorUON1a[i].id1 := strAux1; | |
504 | + g_oCacic.writeDebugLog('Gravei VetorUON1a.id1: "'+strAux1+'"'); | |
505 | + End | |
506 | + else if (strItemName = 'SG_LOC') then | |
507 | + Begin | |
508 | + strAux := ' ('+strAux1 + ')'; | |
509 | + End | |
510 | + else if (strItemName = 'ID1A') then | |
511 | + Begin | |
512 | + VetorUON1a[i].id1a := strAux1; | |
513 | + g_oCacic.writeDebugLog('Gravei VetorUON1a.id1a: "'+strAux1+'"'); | |
514 | + End | |
515 | + else if (strItemName = 'NM1A') then | |
516 | + Begin | |
517 | + VetorUON1a[i].nm1a := strAux1+strAux; | |
518 | + g_oCacic.writeDebugLog('Gravei VetorUON1a.nm1a: "'+strAux1+strAux+'"'); | |
519 | + End | |
520 | + else if (strItemName = 'ID_LOCAL') then | |
521 | + Begin | |
522 | + VetorUON1a[i].id_local := strAux1; | |
523 | + g_oCacic.writeDebugLog('Gravei VetorUON1a.id_local: "'+strAux1+'"'); | |
524 | + End; | |
525 | + | |
526 | + End; | |
527 | + end; | |
528 | + | |
529 | + // Código para montar o combo 3 | |
530 | + Parser.StartScan; | |
531 | + strTagName := ''; | |
532 | + i := -1; | |
533 | + | |
534 | + While Parser.Scan DO | |
535 | + Begin | |
536 | + strItemName := UpperCase(Parser.CurName); | |
537 | + if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT2') Then | |
538 | + Begin | |
539 | + i := i + 1; | |
540 | + SetLength(VetorUON2, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. | |
541 | + strTagName := 'IT2'; | |
542 | + end | |
543 | + else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT2') then | |
544 | + strTagName := '' | |
545 | + else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT2')Then | |
546 | + Begin | |
547 | + strAux1 := g_oCacic.deCrypt(Parser.CurContent); | |
548 | + if (strItemName = 'ID1A') then | |
549 | + Begin | |
550 | + VetorUON2[i].id1a := strAux1; | |
551 | + g_oCacic.writeDebugLog('Gravei VetorUON2.id1a: "'+strAux1+'"'); | |
552 | + End | |
553 | + else if (strItemName = 'ID2') then | |
554 | + Begin | |
555 | + VetorUON2[i].id2 := strAux1; | |
556 | + g_oCacic.writeDebugLog('Gravei VetorUON2.id2: "'+strAux1+'"'); | |
557 | + End | |
558 | + else if (strItemName = 'NM2') then | |
559 | + Begin | |
560 | + VetorUON2[i].nm2 := strAux1; | |
561 | + g_oCacic.writeDebugLog('Gravei VetorUON2.nm2: "'+strAux1+'"'); | |
562 | + End | |
563 | + else if (strItemName = 'ID_LOCAL') then | |
564 | + Begin | |
565 | + VetorUON2[i].id_local := strAux1; | |
566 | + g_oCacic.writeDebugLog('Gravei VetorUON2.id_local: "'+strAux1+'"'); | |
567 | + End; | |
568 | + | |
569 | + End; | |
570 | + end; | |
571 | + Parser.Free; | |
572 | + | |
573 | + // Como os itens do combo1 nunca mudam durante a execução do programa (ao contrario dos combo2 e 3), posso colocar o seu preenchimento aqui mesmo. | |
574 | + cb_id_unid_organizacional_nivel1.Items.Clear; | |
575 | + For i := 0 to Length(VetorUON1) - 1 Do | |
576 | + cb_id_unid_organizacional_nivel1.Items.Add(VetorUON1[i].nm1); | |
577 | + | |
578 | + if (Length(VetorUON1) = 0) then | |
579 | + Begin | |
580 | + frmMapaCacic.Mensagem('ATENÇÃO! Não encontrei Entidades, Linhas de Negócio ou Órgãos cadastrados para esta subrede.',true,intPausaPadrao * 2); | |
581 | + Finalizar(true); | |
582 | + End; | |
583 | + | |
584 | + For i := 0 to Length(VetorUON1) - 1 Do | |
585 | + Begin | |
586 | + g_oCacic.writeDebugLog('VetorUON1['+IntToStr(i)+'].id1='+VetorUON1[i].id1); | |
587 | + g_oCacic.writeDebugLog('VetorUON1['+IntToStr(i)+'].nm1='+VetorUON1[i].nm1); | |
588 | + End; | |
589 | + | |
590 | + For i := 0 to Length(VetorUON1a) - 1 Do | |
591 | + Begin | |
592 | + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].id1='+VetorUON1a[i].id1); | |
593 | + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].id1a='+VetorUON1a[i].id1a); | |
594 | + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].nm1a='+VetorUON1a[i].nm1a); | |
595 | + g_oCacic.writeDebugLog('VetorUON1a['+IntToStr(i)+'].id_local='+VetorUON1a[i].id_local); | |
596 | + End; | |
597 | + | |
598 | + For i := 0 to Length(VetorUON2) - 1 Do | |
599 | + Begin | |
600 | + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].id1a='+VetorUON2[i].id1a); | |
601 | + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].id2='+VetorUON2[i].id2); | |
602 | + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].nm2='+VetorUON2[i].nm2); | |
603 | + g_oCacic.writeDebugLog('VetorUON2['+IntToStr(i)+'].id_local='+VetorUON2[i].id_local); | |
604 | + End; | |
605 | +end; | |
606 | + | |
607 | + | |
608 | +procedure TfrmMapaCacic.cb_id_unid_organizacional_nivel1Change(Sender: TObject); | |
609 | +var i, j: Word; | |
610 | + strIdUON1 : String; | |
611 | +begin | |
612 | + g_oCacic.writeDebugLog('Nível 1 CHANGE'); | |
613 | + // Filtro os itens do combo2, de acordo com o item selecionado no combo1 | |
614 | + strIdUON1 := VetorUON1[cb_id_unid_organizacional_nivel1.ItemIndex].id1; | |
615 | + cb_id_unid_organizacional_nivel1a.Items.Clear; | |
616 | + cb_id_unid_organizacional_nivel2.Items.Clear; | |
617 | + cb_id_unid_organizacional_nivel1a.Enabled := false; | |
618 | + cb_id_unid_organizacional_nivel2.Enabled := false; | |
619 | + SetLength(VetorUON1aFiltrado, 0); | |
620 | + | |
621 | + g_oCacic.writeDebugLog('Tamanho de VetorUON1..: '+IntToStr(Length(VetorUON1))); | |
622 | + g_oCacic.writeDebugLog('ItemIndex de cb_nivel1: '+IntToStr(cb_id_unid_organizacional_nivel1.ItemIndex)); | |
623 | + g_oCacic.writeDebugLog('Tamanho de VetorUON1a.: '+IntToStr(Length(VetorUON1a))); | |
624 | + For i := 0 to Length(VetorUON1a) - 1 Do | |
625 | + Begin | |
626 | + Try | |
627 | + if VetorUON1a[i].id1 = strIdUON1 then | |
628 | + Begin | |
629 | + g_oCacic.writeDebugLog('Add em cb_nivel1a: '+VetorUON1a[i].nm1a); | |
630 | + cb_id_unid_organizacional_nivel1a.Items.Add(VetorUON1a[i].nm1a); | |
631 | + j := Length(VetorUON1aFiltrado); | |
632 | + SetLength(VetorUON1aFiltrado, j + 1); | |
633 | + VetorUON1aFiltrado[j] := VetorUON1a[i].id1a + '#' +VetorUON1a[i].id_local; | |
634 | + g_oCacic.writeDebugLog('VetorUON1aFiltrado['+IntToStr(j)+']= '+VetorUON1aFiltrado[j]); | |
635 | + end; | |
636 | + Except | |
637 | + End; | |
638 | + end; | |
639 | + if (cb_id_unid_organizacional_nivel1a.Items.Count > 0) then | |
640 | + Begin | |
641 | + cb_id_unid_organizacional_nivel1a.Enabled := true; | |
642 | + cb_id_unid_organizacional_nivel1a.ItemIndex := 0; | |
643 | + g_oCacic.writeDebugLog('Provocando CHANGE em nivel1a'); | |
644 | + cb_id_unid_organizacional_nivel1aChange(nil); | |
645 | + End; | |
646 | +end; | |
647 | + | |
648 | +procedure TfrmMapaCacic.cb_id_unid_organizacional_nivel1aChange( | |
649 | + Sender: TObject); | |
650 | +var i, j: Word; | |
651 | + strIdUON1a, | |
652 | + strIdLocal : String; | |
653 | + intAux : integer; | |
654 | + tstrAux : TStrings; | |
655 | +begin | |
656 | + g_oCacic.writeDebugLog('Nível 1a CHANGE'); | |
657 | + // Filtro os itens do combo2, de acordo com o item selecionado no combo1 | |
658 | + //intAux := IfThen(cb_id_unid_organizacional_nivel1a.Items.Count > 1,cb_id_unid_organizacional_nivel1a.ItemIndex+1,0); | |
659 | + intAux := cb_id_unid_organizacional_nivel1a.ItemIndex; | |
660 | + g_oCacic.writeDebugLog('cb_id_unid_organizacional_nivel1a.ItemIndex = '+intToStr(cb_id_unid_organizacional_nivel1a.ItemIndex)); | |
661 | + | |
662 | + g_oCacic.writeDebugLog('VetorUON1aFiltrado['+intToStr(cb_id_unid_organizacional_nivel1a.ItemIndex)+'] => '+VetorUON1aFiltrado[cb_id_unid_organizacional_nivel1a.ItemIndex]); | |
663 | + tstrAux := TStrings.Create; | |
664 | + tstrAux := g_oCacic.explode(VetorUON1aFiltrado[cb_id_unid_organizacional_nivel1a.ItemIndex],'#'); | |
665 | + | |
666 | + strIdUON1a := tstrAux[0]; | |
667 | + strIdLocal := tstrAux[1]; | |
668 | + | |
669 | + tstrAux.Free; | |
670 | + | |
671 | + g_oCacic.writeDebugLog('strIdLocal = '+strIdLocal); | |
672 | + cb_id_unid_organizacional_nivel2.Items.Clear; | |
673 | + cb_id_unid_organizacional_nivel2.Enabled := false; | |
674 | + SetLength(VetorUON2Filtrado, 0); | |
675 | + | |
676 | + g_oCacic.writeDebugLog('Tamanho de VetorUON1a..: '+IntToStr(Length(VetorUON1a))); | |
677 | + g_oCacic.writeDebugLog('ItemIndex de cb_nivel1a: '+IntToStr(cb_id_unid_organizacional_nivel1a.ItemIndex)); | |
678 | + g_oCacic.writeDebugLog('Tamanho de VetorUON2...: '+IntToStr(Length(VetorUON2))); | |
679 | + | |
680 | + For i := 0 to Length(VetorUON2) - 1 Do | |
681 | + Begin | |
682 | + Try | |
683 | + if (VetorUON2[i].id1a = strIdUON1a) and | |
684 | + (VetorUON2[i].id_local = strIdLocal) then | |
685 | + Begin | |
686 | + g_oCacic.writeDebugLog('Add em cb_nivel2: '+VetorUON2[i].nm2); | |
687 | + cb_id_unid_organizacional_nivel2.Items.Add(VetorUON2[i].nm2); | |
688 | + j := Length(VetorUON2Filtrado); | |
689 | + SetLength(VetorUON2Filtrado, j + 1); | |
690 | + VetorUON2Filtrado[j] := VetorUON2[i].id2 + '#' + VetorUON2[i].id_local; | |
691 | + g_oCacic.writeDebugLog('VetorUON2Filtrado['+IntToStr(j)+']= '+VetorUON2Filtrado[j]); | |
692 | + end; | |
693 | + Except | |
694 | + End; | |
695 | + end; | |
696 | + if (cb_id_unid_organizacional_nivel2.Items.Count > 0) then | |
697 | + Begin | |
698 | + cb_id_unid_organizacional_nivel2.Enabled := true; | |
699 | + cb_id_unid_organizacional_nivel2.ItemIndex := 0; | |
700 | + End; | |
701 | +end; | |
702 | + | |
703 | + | |
704 | +procedure TfrmMapaCacic.AtualizaPatrimonio(Sender: TObject); | |
705 | +var strIdUON1, | |
706 | + strIdUON1a, | |
707 | + strIdUON2, | |
708 | + strIdLocal, | |
709 | + strRetorno : String; | |
710 | + tstrListAux : TStringList; | |
711 | + tstrAux : TStrings; | |
712 | +begin | |
713 | + tstrAux := TStrings.Create; | |
714 | + tstrAux := g_oCacic.explode(VetorUON2Filtrado[cb_id_unid_organizacional_nivel2.ItemIndex],'#'); | |
715 | + Try | |
716 | + strIdUON1 := VetorUON1[cb_id_unid_organizacional_nivel1.ItemIndex].id1; | |
717 | + strIdUON2 := tstrAux[0]; | |
718 | + strIdLocal := tstrAux[1]; | |
719 | + Except | |
720 | + end; | |
721 | + | |
722 | + tstrAux := g_oCacic.explode(VetorUON1aFiltrado[cb_id_unid_organizacional_nivel1a.ItemIndex],'#'); | |
723 | + Try | |
724 | + strIdUON1a := tstrAux[0]; | |
725 | + Except | |
726 | + end; | |
727 | + | |
728 | + tstrAux.Free; | |
729 | + Mensagem('Enviando Informações Coletadas ao Banco de Dados...',false,intPausaPadrao div 3); | |
730 | + // Envio dos Dados Coletados ao Banco de Dados | |
731 | + tstrListAux := TStringList.Create; | |
732 | + tstrListAux.Values['te_node_address'] := g_oCacic.GetValueFromFile('TcpIp','TE_NODE_ADDRESS' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
733 | + tstrListAux.Values['id_so'] := g_oCacic.GetValueFromFile('Configs','ID_SO' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
734 | + tstrListAux.Values['te_so'] := g_oCacic.enCrypt(g_oCacic.getWindowsStrId()); | |
735 | + tstrListAux.Values['id_ip_rede'] := g_oCacic.GetValueFromFile('TcpIp','ID_IP_REDE' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
736 | + tstrListAux.Values['te_ip'] := g_oCacic.GetValueFromFile('TcpIp','TE_IP' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
737 | + tstrListAux.Values['te_nome_computador'] := g_oCacic.GetValueFromFile('TcpIp','TE_NOME_COMPUTADOR' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
738 | + tstrListAux.Values['te_workgroup'] := g_oCacic.GetValueFromFile('TcpIp','TE_WORKGROUP' , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
739 | + tstrListAux.Values['id_usuario'] := g_oCacic.enCrypt(frmMapaCacic.strId_usuario); | |
740 | + tstrListAux.Values['id_unid_organizacional_nivel1'] := g_oCacic.enCrypt(strIdUON1); | |
741 | + tstrListAux.Values['id_unid_organizacional_nivel1a']:= g_oCacic.enCrypt(strIdUON1A); | |
742 | + tstrListAux.Values['id_unid_organizacional_nivel2'] := g_oCacic.enCrypt(strIdUON2); | |
743 | + tstrListAux.Values['te_localizacao_complementar' ] := g_oCacic.enCrypt(ed_te_localizacao_complementar.Text); | |
744 | + tstrListAux.Values['te_info_patrimonio1' ] := g_oCacic.enCrypt(ed_te_info_patrimonio1.Text); | |
745 | + tstrListAux.Values['te_info_patrimonio2' ] := g_oCacic.enCrypt(ed_te_info_patrimonio2.Text); | |
746 | + tstrListAux.Values['te_info_patrimonio3' ] := g_oCacic.enCrypt(ed_te_info_patrimonio3.Text); | |
747 | + tstrListAux.Values['te_info_patrimonio4' ] := g_oCacic.enCrypt(ed_te_info_patrimonio4.Text); | |
748 | + tstrListAux.Values['te_info_patrimonio5' ] := g_oCacic.enCrypt(ed_te_info_patrimonio5.Text); | |
749 | + tstrListAux.Values['te_info_patrimonio6' ] := g_oCacic.enCrypt(ed_te_info_patrimonio6.Text); | |
750 | + | |
751 | + g_oCacic.writeDebugLog('Informações para contato com mapa_set_patrimonio:'); | |
752 | + g_oCacic.writeDebugLog('te_node_address: '+tstrListAux.Values['te_node_address']); | |
753 | + g_oCacic.writeDebugLog('id_so: '+tstrListAux.Values['id_so']); | |
754 | + g_oCacic.writeDebugLog('te_so: '+tstrListAux.Values['te_so']); | |
755 | + g_oCacic.writeDebugLog('id_ip_rede: '+tstrListAux.Values['id_ip_rede']); | |
756 | + g_oCacic.writeDebugLog('te_ip: '+tstrListAux.Values['te_ip']); | |
757 | + g_oCacic.writeDebugLog('te_nome_computador: '+tstrListAux.Values['te_nome_computador']); | |
758 | + g_oCacic.writeDebugLog('te_workgroup: '+tstrListAux.Values['te_workgroup']); | |
759 | + | |
760 | + strRetorno := frmMapaCacic.ComunicaServidor('mapa_set_patrimonio.php', tstrListAux, ''); | |
761 | + tstrListAux.Free; | |
762 | + | |
763 | + if not (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then | |
764 | + Mensagem('ATENÇÃO: PROBLEMAS NO ENVIO DAS INFORMAÇÕES COLETADAS AO BANCO DE DADOS...',true,intPausaPadrao) | |
765 | + else | |
766 | + Begin | |
767 | + Mensagem('Salvando Informações Coletadas em Base Local...',false,intPausaPadrao div 3); | |
768 | + g_oCacic.setValueToFile('Patrimonio','id_unid_organizacional_nivel1' , g_oCacic.enCrypt( strIdUON1), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
769 | + g_oCacic.setValueToFile('Patrimonio','id_unid_organizacional_nivel1a', g_oCacic.enCrypt(strIdUON1a), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
770 | + g_oCacic.setValueToFile('Patrimonio','id_unid_organizacional_nivel2' , g_oCacic.enCrypt(strIdUON2) , g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
771 | + g_oCacic.setValueToFile('Patrimonio','id_local' , g_oCacic.enCrypt(strIdLocal), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
772 | + g_oCacic.setValueToFile('Patrimonio','te_localizacao_complementar' , g_oCacic.enCrypt(ed_te_localizacao_complementar.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
773 | + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio1' , g_oCacic.enCrypt(ed_te_info_patrimonio1.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
774 | + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio2' , g_oCacic.enCrypt(ed_te_info_patrimonio2.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
775 | + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio3' , g_oCacic.enCrypt(ed_te_info_patrimonio3.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
776 | + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio4' , g_oCacic.enCrypt(ed_te_info_patrimonio4.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
777 | + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio5' , g_oCacic.enCrypt(ed_te_info_patrimonio5.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
778 | + g_oCacic.setValueToFile('Patrimonio','te_info_patrimonio6' , g_oCacic.enCrypt(ed_te_info_patrimonio6.Text), g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
779 | + g_oCacic.setValueToFile('Patrimonio','ultima_rede_obtida' , g_oCacic.GetValueFromFile('TcpIp','ID_IP_REDE',g_oCacic.getLocalFolder + 'GER_COLS.inf'),g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
780 | + g_oCacic.setValueToFile('Patrimonio','dt_ultima_renovacao' , g_oCacic.enCrypt(FormatDateTime('yyyymmddhhnnss', Now)),g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
781 | + | |
782 | + g_oCacic.setValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio1', ed_te_info_patrimonio1.Text); | |
783 | + g_oCacic.setValueRegistryKey('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio4', ed_te_info_patrimonio4.Text); | |
784 | + End; | |
785 | + Finalizar(true); | |
786 | +end; | |
787 | + | |
788 | +procedure TfrmMapaCacic.MontaInterface(p_strConfigs : String); | |
789 | +Begin | |
790 | + Mensagem('Montando Interface para Coleta de Informações...',false,intPausaPadrao div 3); | |
791 | + | |
792 | + lbEtiqueta1.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1', p_strConfigs)); | |
793 | + lbEtiqueta1.Visible := true; | |
794 | + cb_id_unid_organizacional_nivel1.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta1', p_strConfigs)); | |
795 | + cb_id_unid_organizacional_nivel1.Visible := true; | |
796 | + | |
797 | + lbEtiqueta1a.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta1a', p_strConfigs)); | |
798 | + lbEtiqueta1a.Visible := true; | |
799 | + cb_id_unid_organizacional_nivel1a.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta1a', p_strConfigs)); | |
800 | + cb_id_unid_organizacional_nivel1a.Visible := true; | |
801 | + | |
802 | + lbEtiqueta2.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta2', p_strConfigs)); | |
803 | + lbEtiqueta2.Visible := true; | |
804 | + cb_id_unid_organizacional_nivel2.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta2', p_strConfigs)); | |
805 | + cb_id_unid_organizacional_nivel2.Visible := true; | |
806 | + | |
807 | + lbEtiqueta3.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta3', p_strConfigs)); | |
808 | + lbEtiqueta3.Visible := true; | |
809 | + ed_te_localizacao_complementar.Text := strTe_localizacao_complementar; | |
810 | + ed_te_localizacao_complementar.Visible := true; | |
811 | + | |
812 | + g_oCacic.writeDebugLog('in_exibir_etiqueta4 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta4', p_strConfigs))+'"'); | |
813 | + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta4', p_strConfigs))) = 'S') then | |
814 | + begin | |
815 | + lbEtiqueta4.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta4', p_strConfigs)); | |
816 | + lbEtiqueta4.Visible := true; | |
817 | + ed_te_info_patrimonio1.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta4', p_strConfigs)); | |
818 | + ed_te_info_patrimonio1.Text := strTe_info_patrimonio1; | |
819 | + ed_te_info_patrimonio1.visible := True; | |
820 | + end; | |
821 | + | |
822 | + g_oCacic.writeDebugLog('in_exibir_etiqueta5 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta5', p_strConfigs))+'"'); | |
823 | + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta5', p_strConfigs))) = 'S') then | |
824 | + begin | |
825 | + lbEtiqueta5.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta5', p_strConfigs)); | |
826 | + lbEtiqueta5.Visible := true; | |
827 | + ed_te_info_patrimonio2.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta5', p_strConfigs)); | |
828 | + ed_te_info_patrimonio2.Text := strTe_info_patrimonio2; | |
829 | + ed_te_info_patrimonio2.visible := True; | |
830 | + end; | |
831 | + | |
832 | + g_oCacic.writeDebugLog('in_exibir_etiqueta6 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta6', p_strConfigs))+'"'); | |
833 | + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta6', p_strConfigs))) = 'S') then | |
834 | + begin | |
835 | + lbEtiqueta6.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta6', p_strConfigs)); | |
836 | + lbEtiqueta6.Visible := true; | |
837 | + ed_te_info_patrimonio3.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta6', p_strConfigs)); | |
838 | + ed_te_info_patrimonio3.Text := strTe_info_patrimonio3; | |
839 | + ed_te_info_patrimonio3.visible := True; | |
840 | + end; | |
841 | + | |
842 | + g_oCacic.writeDebugLog('in_exibir_etiqueta7 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta7', p_strConfigs))+'"'); | |
843 | + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta7', p_strConfigs))) = 'S') then | |
844 | + begin | |
845 | + lbEtiqueta7.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta7', p_strConfigs)); | |
846 | + lbEtiqueta7.Visible := true; | |
847 | + ed_te_info_patrimonio4.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta7', p_strConfigs)); | |
848 | + ed_te_info_patrimonio4.Text := strTe_info_patrimonio4; | |
849 | + ed_te_info_patrimonio4.visible := True; | |
850 | + end; | |
851 | + | |
852 | + g_oCacic.writeDebugLog('in_exibir_etiqueta8 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta8', p_strConfigs))+'"'); | |
853 | + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta8', p_strConfigs))) = 'S') then | |
854 | + begin | |
855 | + lbEtiqueta8.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta8', p_strConfigs)); | |
856 | + lbEtiqueta8.Visible := true; | |
857 | + ed_te_info_patrimonio5.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta8', p_strConfigs)); | |
858 | + ed_te_info_patrimonio5.Text := strTe_info_patrimonio5; | |
859 | + ed_te_info_patrimonio5.visible := True; | |
860 | + end; | |
861 | + | |
862 | + g_oCacic.writeDebugLog('in_exibir_etiqueta9 -> "'+g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta9', p_strConfigs))+'"'); | |
863 | + if (trim(g_oCacic.deCrypt(g_oCacic.xmlGetValue('in_exibir_etiqueta9', p_strConfigs))) = 'S') then | |
864 | + begin | |
865 | + lbEtiqueta9.Caption := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_etiqueta9', p_strConfigs)); | |
866 | + lbEtiqueta9.Visible := true; | |
867 | + ed_te_info_patrimonio6.Hint := g_oCacic.deCrypt(g_oCacic.xmlGetValue('te_help_etiqueta9', p_strConfigs)); | |
868 | + ed_te_info_patrimonio6.Text := strTe_info_patrimonio6; | |
869 | + ed_te_info_patrimonio6.visible := True; | |
870 | + end; | |
871 | + | |
872 | + Application.ProcessMessages; | |
873 | + Mensagem('',false,0); | |
874 | + btGravarInformacoes.Visible := true; | |
875 | +end; | |
876 | + | |
877 | +procedure TfrmMapaCacic.FormClose(Sender: TObject; var Action: TCloseAction); | |
878 | +begin | |
879 | + Finalizar(true); | |
880 | +end; | |
881 | + | |
882 | +procedure TfrmMapaCacic.CriaFormSenha(Sender: TObject); | |
883 | +begin | |
884 | + Application.CreateForm(TfrmAcesso, frmAcesso); | |
885 | +end; | |
886 | + | |
887 | +// Baixada de http://www.infoeng.hpg.ig.com.br/borland_delphi_dicas_2.htm | |
888 | +function TfrmMapaCacic.LetrasDrives: string; | |
889 | +var | |
890 | +Drives: DWord; | |
891 | +I, Tipo: byte; | |
892 | +v_Unidade : string; | |
893 | +begin | |
894 | +Result := ''; | |
895 | +Drives := GetLogicalDrives; | |
896 | +if Drives <> 0 then | |
897 | +for I := 65 to 90 do | |
898 | + if ((Drives shl (31 - (I - 65))) shr 31) = 1 then | |
899 | + Begin | |
900 | + v_Unidade := Char(I) + ':\'; | |
901 | + Tipo := GetDriveType(PChar(v_Unidade)); | |
902 | + case Tipo of | |
903 | + DRIVE_FIXED: Result := Result + Char(I); | |
904 | + end; | |
905 | + End; | |
906 | +end; | |
907 | +// By Muad Dib 2003 | |
908 | +// at http://www.planet-source-code.com. | |
909 | +// Excelente!!! | |
910 | +function TfrmMapaCacic.SearchFile(p_Drive,p_File:string) : boolean; | |
911 | +var sr:TSearchRec; | |
912 | + sDirList:TStringList; | |
913 | + i:integer; | |
914 | + strResSearch : String; | |
915 | +begin | |
916 | + Result := false; | |
917 | + strResSearch := ''; | |
918 | + if FindFirst(p_Drive+p_File,faAnyFile,sr) = 0 then | |
919 | + Begin | |
920 | + strResSearch := p_Drive+p_File; | |
921 | + Result := true; | |
922 | + End | |
923 | + else | |
924 | + Begin | |
925 | + repeat | |
926 | + until FindNext(sr)<>0; | |
927 | + FindClose(sr); | |
928 | + sDirList:= TStringList.Create; | |
929 | + try | |
930 | + GetSubDirs(p_Drive,sDirList); | |
931 | + for i:=0 to sDirList.Count-1 do | |
932 | + if (sDirList[i]<>'.') and (sDirList[i]<>'..') then | |
933 | + begin | |
934 | + //Application.ProcessMessages; | |
935 | + if (SearchFile(IncludeTrailingPathDelimiter(p_Drive+sDirList[i]),p_File)) then | |
936 | + Begin | |
937 | + Result := true; | |
938 | + Break; | |
939 | + End; | |
940 | + end; | |
941 | + finally | |
942 | + sDirList.Free; | |
943 | + End; | |
944 | + end; | |
945 | +end; | |
946 | +procedure TfrmMapaCacic.GetSubDirs(Folder:string; sList:TStringList); | |
947 | + var | |
948 | + sr:TSearchRec; | |
949 | +begin | |
950 | + if FindFirst(Folder+'*.*',faDirectory,sr)=0 then | |
951 | + try | |
952 | + repeat | |
953 | + if(sr.Attr and faDirectory)=faDirectory then | |
954 | + sList.Add(sr.Name); | |
955 | + until FindNext(sr)<>0; | |
956 | + finally | |
957 | + FindClose(sr); | |
958 | + end; | |
959 | +end; | |
960 | + | |
961 | +procedure TfrmMapaCacic.mapa; | |
962 | +var strConfigs : String; | |
963 | + tstrAUX : TStrings; | |
964 | +begin | |
965 | + tstrAUX := TStrings.Create; | |
966 | + | |
967 | + Try | |
968 | + strConfigs := g_oCacic.GetValueFromFile('Patrimonio','Configs',g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
969 | + gbLeiaComAtencao.Visible := true; | |
970 | + gbInformacoesSobreComputador.Visible := true; | |
971 | + MontaCombos(strConfigs); | |
972 | + RecuperaValoresAnteriores(strConfigs); | |
973 | + MontaInterface(strConfigs); | |
974 | + Application.ProcessMessages; | |
975 | + Except | |
976 | + End; | |
977 | +End; | |
978 | + | |
979 | +procedure TfrmMapaCacic.FormActivate(Sender: TObject); | |
980 | +var intAux : integer; | |
981 | + strLetrasDrives, | |
982 | + strRetorno, | |
983 | + v_strTeLocalFolder, | |
984 | + strAux : String; | |
985 | + Request_mapa : TStringList; | |
986 | +begin | |
987 | + if not boolFinalizar then | |
988 | + Begin | |
989 | + g_oCacic := TCACIC.Create(); | |
990 | + | |
991 | + g_oCacic.setBoolCipher(true); | |
992 | + frmMapaCacic.lbVersao.Caption := 'Versão: ' + g_oCacic.GetVersionInfo(ParamStr(0)); | |
993 | + | |
994 | + if (g_oCacic.isWindowsNTPlataform()) and (not g_oCacic.isWindowsAdmin()) then | |
995 | + MessageDLG(#13#10+'ATENÇÃO! Essa aplicação requer execução com nível administrativo.',mtError,[mbOK],0) | |
996 | + else | |
997 | + Begin | |
998 | + // Buscarei o caminho do Sistema em \WinDIR\chkSIS.ini | |
999 | + v_strTeLocalFolder := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeLocalFolder',g_oCacic.getWinDir + 'chksis.ini')); | |
1000 | + | |
1001 | + if not (v_strTeLocalFolder = '') then | |
1002 | + Begin | |
1003 | + g_oCacic.setLocalFolder(v_strTeLocalFolder); | |
1004 | + | |
1005 | + // A existência e bloqueio do arquivo abaixo evitará que o Agente Principal entre em ação | |
1006 | + AssignFile(v_Aguarde,g_oCacic.getLocalFolder + '\temp\aguarde_MAPACACIC.txt'); {Associa o arquivo a uma variável do tipo TextFile} | |
1007 | + {$IOChecks off} | |
1008 | + Reset(v_Aguarde); {Abre o arquivo texto} | |
1009 | + {$IOChecks on} | |
1010 | + if (IOResult <> 0) then // Arquivo não existe, será recriado. | |
1011 | + Rewrite (v_Aguarde); | |
1012 | + | |
1013 | + Append(v_Aguarde); | |
1014 | + Writeln(v_Aguarde,'Apenas um pseudo-cookie para o Agente Principal esperar o término de MapaCACIC'); | |
1015 | + Append(v_Aguarde); | |
1016 | + | |
1017 | + strAux := Trim(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + 'GER_COLS.inf'))); | |
1018 | + if not FileExists(g_oCacic.getLocalFolder + g_oCacic.getInfFileName) or | |
1019 | + (g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + g_oCacic.getInfFileName)) = '') or | |
1020 | + (strAux <> '') and (StrToInt64(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + g_oCacic.getInfFileName))) < StrToInt64(g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Patrimonio','dt_ultima_renovacao',g_oCacic.getLocalFolder + 'GER_COLS.inf')))) then | |
1021 | + CopyFile(PChar(g_oCacic.getLocalFolder + 'GER_COLS.inf'), PChar(g_oCacic.getLocalFolder + g_oCacic.getInfFileName), true); | |
1022 | + | |
1023 | + frmMapaCacic.edTeWebManagerAddress.Caption := g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress', g_oCacic.getLocalFolder + g_oCacic.getInfFileName)); | |
1024 | + | |
1025 | + frmMapaCacic.lbMensagens.Caption := 'Entrada de Dados para Autenticação no Módulo Gerente WEB Cacic'; | |
1026 | + if (g_oCacic.deCrypt( g_oCacic.GetValueFromFile('TcpIp','TE_NODE_ADDRESS' , g_oCacic.getLocalFolder + 'GER_COLS.inf'))='') then | |
1027 | + Begin | |
1028 | + frmMapaCacic.boolAcessoOK := false; | |
1029 | + MessageDLG(#13#10+'Atenção! É necessário executar as coletas do Sistema Cacic.' + #13#10 + #13#10 + | |
1030 | + 'Caso o Sistema Cacic já esteja instalado, clique com botão direito' + #13#10 + | |
1031 | + 'sobre o ícone da bandeja, escolha a opção "Executar Agora" e aguarde' + #13#10 + | |
1032 | + 'o fim do processo.',mtError,[mbOK],0); | |
1033 | + frmMapaCacic.Finalizar(false); | |
1034 | + End | |
1035 | + else | |
1036 | + Begin | |
1037 | + | |
1038 | + g_oCacic.checkDebugMode; | |
1039 | + g_oCacic.writeDebugLog('Versão do MapaCacic: '+frmMapaCacic.lbVersao.Caption); | |
1040 | + | |
1041 | + // Acessar... | |
1042 | + CriaFormSenha(nil); | |
1043 | + frmAcesso.ShowModal; | |
1044 | + | |
1045 | + if boolFinalizar then | |
1046 | + Finalizar(false) | |
1047 | + else if boolAcessoOK then | |
1048 | + Begin | |
1049 | + pnMensagens.Visible := true; | |
1050 | + Mensagem('Efetuando Comunicação com o Módulo Gerente WEB em "'+g_oCacic.deCrypt( g_oCacic.GetValueFromFile('Configs','TeWebManagerAddress',g_oCacic.getLocalFolder + 'GER_COLS.inf'))+'"...',false,intPausaPadrao div 3); | |
1051 | + frmAcesso.Free; | |
1052 | + | |
1053 | + // Povoamento com dados de configurações da interface patrimonial | |
1054 | + // Solicita ao servidor as configurações para a Coleta de Informações de Patrimônio | |
1055 | + Request_mapa := TStringList.Create; | |
1056 | + Request_mapa.Values['te_node_address'] := g_oCacic.GetValueFromFile('TcpIp','TE_NODE_ADDRESS' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); | |
1057 | + Request_mapa.Values['id_so'] := g_oCacic.GetValueFromFile('Configs','ID_SO' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); | |
1058 | + Request_mapa.Values['te_so'] := g_oCacic.enCrypt(g_oCacic.getWindowsStrId()); | |
1059 | + Request_mapa.Values['id_ip_rede'] := g_oCacic.GetValueFromFile('TcpIp','ID_IP_REDE' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); | |
1060 | + Request_mapa.Values['te_ip'] := g_oCacic.GetValueFromFile('TcpIp','TE_IP' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); | |
1061 | + Request_mapa.Values['te_nome_computador']:= g_oCacic.GetValueFromFile('TcpIp','TE_NOME_COMPUTADOR', g_oCacic.getLocalFolder + 'GER_COLS.inf'); | |
1062 | + Request_mapa.Values['te_workgroup'] := g_oCacic.GetValueFromFile('TcpIp','TE_WORKGROUP' , g_oCacic.getLocalFolder + 'GER_COLS.inf'); | |
1063 | + Request_mapa.Values['id_usuario'] := g_oCacic.enCrypt(frmMapaCacic.strId_usuario); | |
1064 | + | |
1065 | + strRetorno := frmMapaCacic.ComunicaServidor('mapa_get_patrimonio.php', Request_mapa, '.'); | |
1066 | + | |
1067 | + g_oCacic.writeDebugLog('Retorno: "'+strRetorno+'"'); | |
1068 | + | |
1069 | + if (g_oCacic.xmlGetValue('STATUS', strRetorno)='OK') then | |
1070 | + Begin | |
1071 | + Mensagem('Comunicação Efetuada com Sucesso! Salvando as Configurações Obtidas...',false,intPausaPadrao div 3); | |
1072 | + g_oCacic.setValueToFile('Patrimonio','Configs', strRetorno, g_oCacic.getLocalFolder + g_oCacic.getInfFileName); | |
1073 | + End | |
1074 | + else | |
1075 | + Begin | |
1076 | + Mensagem('PROBLEMAS NA COMUNICAÇÃO COM O MÓDULO GERENTE WEB...',true,intPausaPadrao); | |
1077 | + Finalizar(true); | |
1078 | + End; | |
1079 | + | |
1080 | + Request_mapa.Free; | |
1081 | + | |
1082 | + mapa; | |
1083 | + End; | |
1084 | + End; | |
1085 | + End | |
1086 | + else | |
1087 | + Begin | |
1088 | + frmMapaCacic.boolAcessoOK := false; | |
1089 | + MessageDLG(#13#10+'Atenção! É necessário reinstalar o CACIC nesta estação.' + #13#10 + #13#10 + | |
1090 | + 'A estrutura encontra-se corrompida.' + #13#10,mtError,[mbOK],0); | |
1091 | + frmMapaCacic.Finalizar(false); | |
1092 | + End; | |
1093 | + End; | |
1094 | + End; | |
1095 | +end; | |
1096 | + | |
1097 | +procedure TfrmMapaCacic.FormCreate(Sender: TObject); | |
1098 | +begin | |
1099 | + boolFinalizar := false; | |
1100 | +end; | |
1101 | + | |
1102 | +end. | ... | ... |
No preview for this file type
No preview for this file type
... | ... | @@ -0,0 +1,43 @@ |
1 | +-$A8 | |
2 | +-$B- | |
3 | +-$C+ | |
4 | +-$D+ | |
5 | +-$E- | |
6 | +-$F- | |
7 | +-$G+ | |
8 | +-$H+ | |
9 | +-$I+ | |
10 | +-$J- | |
11 | +-$K- | |
12 | +-$L+ | |
13 | +-$M- | |
14 | +-$N+ | |
15 | +-$O+ | |
16 | +-$P+ | |
17 | +-$Q- | |
18 | +-$R- | |
19 | +-$S- | |
20 | +-$T- | |
21 | +-$U- | |
22 | +-$V+ | |
23 | +-$W- | |
24 | +-$X+ | |
25 | +-$YD | |
26 | +-$Z1 | |
27 | +-cg | |
28 | +-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; | |
29 | +-H+ | |
30 | +-W+ | |
31 | +-M | |
32 | +-$M16384,1048576 | |
33 | +-K$00400000 | |
34 | +-E"C:\arariboia_mod_BINARIOS" | |
35 | +-LE"c:\program files\borland\delphi7\Projects\Bpl" | |
36 | +-LN"c:\program files\borland\delphi7\Projects\Bpl" | |
37 | +-U"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" | |
38 | +-O"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" | |
39 | +-I"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" | |
40 | +-R"C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion" | |
41 | +-w-UNSAFE_TYPE | |
42 | +-w-UNSAFE_CODE | |
43 | +-w-UNSAFE_CAST | ... | ... |
... | ... | @@ -0,0 +1,154 @@ |
1 | +[FileVersion] | |
2 | +Version=7.0 | |
3 | +[Compiler] | |
4 | +A=8 | |
5 | +B=0 | |
6 | +C=1 | |
7 | +D=1 | |
8 | +E=0 | |
9 | +F=0 | |
10 | +G=1 | |
11 | +H=1 | |
12 | +I=1 | |
13 | +J=0 | |
14 | +K=0 | |
15 | +L=1 | |
16 | +M=0 | |
17 | +N=1 | |
18 | +O=1 | |
19 | +P=1 | |
20 | +Q=0 | |
21 | +R=0 | |
22 | +S=0 | |
23 | +T=0 | |
24 | +U=0 | |
25 | +V=1 | |
26 | +W=0 | |
27 | +X=1 | |
28 | +Y=1 | |
29 | +Z=1 | |
30 | +ShowHints=1 | |
31 | +ShowWarnings=1 | |
32 | +UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; | |
33 | +NamespacePrefix= | |
34 | +SymbolDeprecated=1 | |
35 | +SymbolLibrary=1 | |
36 | +SymbolPlatform=1 | |
37 | +UnitLibrary=1 | |
38 | +UnitPlatform=1 | |
39 | +UnitDeprecated=1 | |
40 | +HResultCompat=1 | |
41 | +HidingMember=1 | |
42 | +HiddenVirtual=1 | |
43 | +Garbage=1 | |
44 | +BoundsError=1 | |
45 | +ZeroNilCompat=1 | |
46 | +StringConstTruncated=1 | |
47 | +ForLoopVarVarPar=1 | |
48 | +TypedConstVarPar=1 | |
49 | +AsgToTypedConst=1 | |
50 | +CaseLabelRange=1 | |
51 | +ForVariable=1 | |
52 | +ConstructingAbstract=1 | |
53 | +ComparisonFalse=1 | |
54 | +ComparisonTrue=1 | |
55 | +ComparingSignedUnsigned=1 | |
56 | +CombiningSignedUnsigned=1 | |
57 | +UnsupportedConstruct=1 | |
58 | +FileOpen=1 | |
59 | +FileOpenUnitSrc=1 | |
60 | +BadGlobalSymbol=1 | |
61 | +DuplicateConstructorDestructor=1 | |
62 | +InvalidDirective=1 | |
63 | +PackageNoLink=1 | |
64 | +PackageThreadVar=1 | |
65 | +ImplicitImport=1 | |
66 | +HPPEMITIgnored=1 | |
67 | +NoRetVal=1 | |
68 | +UseBeforeDef=1 | |
69 | +ForLoopVarUndef=1 | |
70 | +UnitNameMismatch=1 | |
71 | +NoCFGFileFound=1 | |
72 | +MessageDirective=1 | |
73 | +ImplicitVariants=1 | |
74 | +UnicodeToLocale=1 | |
75 | +LocaleToUnicode=1 | |
76 | +ImagebaseMultiple=1 | |
77 | +SuspiciousTypecast=1 | |
78 | +PrivatePropAccessor=1 | |
79 | +UnsafeType=0 | |
80 | +UnsafeCode=0 | |
81 | +UnsafeCast=0 | |
82 | +[Linker] | |
83 | +MapFile=0 | |
84 | +OutputObjs=0 | |
85 | +ConsoleApp=1 | |
86 | +DebugInfo=0 | |
87 | +RemoteSymbols=0 | |
88 | +MinStackSize=16384 | |
89 | +MaxStackSize=1048576 | |
90 | +ImageBase=4194304 | |
91 | +ExeDescription= | |
92 | +[Directories] | |
93 | +OutputDir=C:\arariboia_mod_BINARIOS | |
94 | +UnitOutputDir= | |
95 | +PackageDLLOutputDir= | |
96 | +PackageDCPOutputDir= | |
97 | +SearchPath=C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion | |
98 | +Packages=vcl;rtl;vclx;indy;inet;xmlrtl;vclie;inetdbbde;inetdbxpress;dbrtl;dsnap;dsnapcon;vcldb;soaprtl;VclSmp;dbexpress;dbxcds;inetdb;bdertl;vcldbx;webdsnap;websnap;adortl;ibxpress;teeui;teedb;tee;dss;visualclx;visualdbclx;vclactnband;vclshlctrls;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;dclOffice2k;MSI_D7_Rtl | |
99 | +Conditionals= | |
100 | +DebugSourceDirs=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes | |
101 | +UsePackages=0 | |
102 | +[Parameters] | |
103 | +RunParams= | |
104 | +HostApplication= | |
105 | +Launcher= | |
106 | +UseLauncher=0 | |
107 | +DebugCWD= | |
108 | +[Language] | |
109 | +ActiveLang= | |
110 | +ProjectLang= | |
111 | +RootDir=C:\Arquivos de programas\Borland\Delphi7\Bin\ | |
112 | +[Version Info] | |
113 | +IncludeVerInfo=1 | |
114 | +AutoIncBuild=0 | |
115 | +MajorVer=2 | |
116 | +MinorVer=6 | |
117 | +Release=0 | |
118 | +Build=2 | |
119 | +Debug=0 | |
120 | +PreRelease=0 | |
121 | +Special=0 | |
122 | +Private=0 | |
123 | +DLL=0 | |
124 | +Locale=1046 | |
125 | +CodePage=1252 | |
126 | +[Version Info Keys] | |
127 | +CompanyName=Dataprev - Emp. de TI da Prev.Social - UDSL/SSLC | |
128 | +FileDescription=Sistema CACIC - Módulo Avulso para Coleta de Informações Patrimoniais | |
129 | +FileVersion=2.6.0.2 | |
130 | +InternalName= | |
131 | +LegalCopyright= | |
132 | +LegalTrademarks= | |
133 | +OriginalFilename= | |
134 | +ProductName=MapaCACIC | |
135 | +ProductVersion=2.6-Beta-2 | |
136 | +Comments=Licença: GNU/LGPL | |
137 | +[HistoryLists\hlDebugSourcePath] | |
138 | +Count=2 | |
139 | +Item0=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes | |
140 | +Item1=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7 | |
141 | +[HistoryLists\hlUnitAliases] | |
142 | +Count=1 | |
143 | +Item0=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; | |
144 | +[HistoryLists\hlSearchPath] | |
145 | +Count=4 | |
146 | +Item0=C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion | |
147 | +Item1=C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP | |
148 | +Item2=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Ciphers;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes | |
149 | +Item3=C:\Arquivos de programas\Borland\Delphi7\Mitec\D7 | |
150 | +[HistoryLists\hlOutputDirectorry] | |
151 | +Count=3 | |
152 | +Item0=C:\arariboia_mod_BINARIOS | |
153 | +Item1=Z:\cacic2\repositorio | |
154 | +Item2=..\ | ... | ... |
... | ... | @@ -0,0 +1,60 @@ |
1 | +(** | |
2 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
3 | +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
4 | + | |
5 | +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
6 | + | |
7 | +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
8 | +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. | |
9 | + | |
10 | +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
11 | +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
12 | + | |
13 | +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
14 | +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
15 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
16 | +*) | |
17 | + | |
18 | +program MapaCacic; | |
19 | + | |
20 | +uses | |
21 | + Forms, | |
22 | + Windows, | |
23 | + main_mapa in 'main_mapa.pas' {frmMapaCacic}, | |
24 | + acesso in 'acesso.pas' {frmAcesso}, | |
25 | + CACIC_Library in '..\CACIC_Library.pas'; | |
26 | +// LibXmlParser in '..\LibXmlParser.pas'; | |
27 | + | |
28 | +{$R *.res} | |
29 | + | |
30 | +const | |
31 | + CACIC_APP_NAME = 'MapaCacic'; | |
32 | + | |
33 | +var | |
34 | + hwind:HWND; | |
35 | + oCacic : TCACIC; | |
36 | + | |
37 | +begin | |
38 | + oCacic := TCACIC.Create(); | |
39 | + | |
40 | + if( oCacic.isAppRunning( CACIC_APP_NAME ) ) | |
41 | + then begin | |
42 | + hwind := 0; | |
43 | + repeat // The string 'My app' must match your App Title (below) | |
44 | + hwind:=Windows.FindWindowEx(0,hwind,'TApplication', CACIC_APP_NAME ); | |
45 | + until (hwind<>Application.Handle); | |
46 | + IF (hwind<>0) then | |
47 | + begin | |
48 | + Windows.ShowWindow(hwind,SW_SHOWNORMAL); | |
49 | + Windows.SetForegroundWindow(hwind); | |
50 | + end; | |
51 | + FreeMemory(0); | |
52 | + end | |
53 | + else | |
54 | + begin | |
55 | + Application.Initialize; | |
56 | + Application.CreateForm(TfrmMapaCacic, frmMapaCacic); | |
57 | + Application.Run; | |
58 | + end; | |
59 | + oCacic.Free(); | |
60 | +end. | ... | ... |
... | ... | @@ -0,0 +1,92 @@ |
1 | +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
2 | + <PropertyGroup> | |
3 | + <ProjectGuid>{f5ef289b-8ae5-459f-a58d-b460febcbefd}</ProjectGuid> | |
4 | + <MainSource>mapacacic.dpr</MainSource> | |
5 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
6 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
7 | + <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> | |
8 | + <DCC_DependencyCheckOutputName>..\mapacacic.exe</DCC_DependencyCheckOutputName> | |
9 | + </PropertyGroup> | |
10 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
11 | + <Version>7.0</Version> | |
12 | + <DCC_DebugInformation>False</DCC_DebugInformation> | |
13 | + <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> | |
14 | + <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> | |
15 | + <DCC_ExeOutput>..\</DCC_ExeOutput> | |
16 | + <DCC_UnitSearchPath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_UnitSearchPath> | |
17 | + <DCC_ResourcePath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_ResourcePath> | |
18 | + <DCC_ObjPath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_ObjPath> | |
19 | + <DCC_IncludePath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_IncludePath> | |
20 | + <DCC_Define>RELEASE</DCC_Define> | |
21 | + </PropertyGroup> | |
22 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
23 | + <Version>7.0</Version> | |
24 | + <DCC_ExeOutput>..\</DCC_ExeOutput> | |
25 | + <DCC_UnitSearchPath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_UnitSearchPath> | |
26 | + <DCC_ResourcePath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_ResourcePath> | |
27 | + <DCC_ObjPath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_ObjPath> | |
28 | + <DCC_IncludePath>C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\Mitec\v1010_Delphi7;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\NTFileSecurity;C:\Arquivos de programas\Borland\Delphi7\Comps_CACIC\PJVersion</DCC_IncludePath> | |
29 | + <DCC_Define>DEBUG</DCC_Define> | |
30 | + </PropertyGroup> | |
31 | + <ProjectExtensions> | |
32 | + <Borland.Personality>Delphi.Personality</Borland.Personality> | |
33 | + <Borland.ProjectType>VCLApplication</Borland.ProjectType> | |
34 | + <BorlandProject> | |
35 | +<BorlandProject xmlns=""> <Delphi.Personality> <Parameters> | |
36 | + <Parameters Name="DebugSourceDirs">C:\Arquivos de programas\Borland\Delphi7\Mitec\D7;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP;C:\Arquivos de programas\Borland\Delphi7\CriptografiaDCP\Hashes</Parameters> | |
37 | + <Parameters Name="UseLauncher">False</Parameters> | |
38 | + <Parameters Name="LoadAllSymbols">True</Parameters> | |
39 | + <Parameters Name="LoadUnspecifiedSymbols">False</Parameters> | |
40 | + </Parameters> | |
41 | + <Language> | |
42 | + <Language Name="RootDir">C:\Arquivos de programas\Borland\Delphi7\Bin\</Language> | |
43 | + </Language> | |
44 | + <VersionInfo> | |
45 | + <VersionInfo Name="IncludeVerInfo">True</VersionInfo> | |
46 | + <VersionInfo Name="AutoIncBuild">False</VersionInfo> | |
47 | + <VersionInfo Name="MajorVer">2</VersionInfo> | |
48 | + <VersionInfo Name="MinorVer">6</VersionInfo> | |
49 | + <VersionInfo Name="Release">0</VersionInfo> | |
50 | + <VersionInfo Name="Build">0</VersionInfo> | |
51 | + <VersionInfo Name="Debug">False</VersionInfo> | |
52 | + <VersionInfo Name="PreRelease">False</VersionInfo> | |
53 | + <VersionInfo Name="Special">False</VersionInfo> | |
54 | + <VersionInfo Name="Private">False</VersionInfo> | |
55 | + <VersionInfo Name="DLL">False</VersionInfo> | |
56 | + <VersionInfo Name="Locale">1046</VersionInfo> | |
57 | + <VersionInfo Name="CodePage">1252</VersionInfo> | |
58 | + </VersionInfo> | |
59 | + <VersionInfoKeys> | |
60 | + <VersionInfoKeys Name="CompanyName">Dataprev - Emp. de TI da Prev.Social - UDSL/SSLC</VersionInfoKeys> | |
61 | + <VersionInfoKeys Name="FileDescription">Sistema CACIC - Módulo Avulso para Coleta de Informações Patrimoniais</VersionInfoKeys> | |
62 | + <VersionInfoKeys Name="FileVersion">2.5.9.0</VersionInfoKeys> | |
63 | + <VersionInfoKeys Name="InternalName"></VersionInfoKeys> | |
64 | + <VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys> | |
65 | + <VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys> | |
66 | + <VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys> | |
67 | + <VersionInfoKeys Name="ProductName">MapaCACIC</VersionInfoKeys> | |
68 | + <VersionInfoKeys Name="ProductVersion">2.6.0.0</VersionInfoKeys> | |
69 | + <VersionInfoKeys Name="Comments">Licença: GNU/LGPL</VersionInfoKeys> | |
70 | + </VersionInfoKeys> | |
71 | + <Source> | |
72 | + <Source Name="MainSource">mapacacic.dpr</Source> | |
73 | + </Source> | |
74 | + </Delphi.Personality> </BorlandProject></BorlandProject> | |
75 | + </ProjectExtensions> | |
76 | + <ItemGroup /> | |
77 | + <ItemGroup> | |
78 | + <DelphiCompile Include="mapacacic.dpr"> | |
79 | + <MainSource>MainSource</MainSource> | |
80 | + </DelphiCompile> | |
81 | + <DCCReference Include="..\CACIC_Library.pas" /> | |
82 | + <DCCReference Include="acesso.pas"> | |
83 | + <Form>frmAcesso</Form> | |
84 | + </DCCReference> | |
85 | + <DCCReference Include="LibXmlParser.pas" /> | |
86 | + <DCCReference Include="main_mapa.pas"> | |
87 | + <Form>frmMapaCacic</Form> | |
88 | + </DCCReference> | |
89 | + <DCCReference Include="xml.pas" /> | |
90 | + </ItemGroup> | |
91 | + <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" /> | |
92 | +</Project> | |
0 | 93 | \ No newline at end of file | ... | ... |
No preview for this file type
No preview for this file type