From 3d86e0187e37600e4897389f48a1e0bef2e1eb01 Mon Sep 17 00:00:00 2001 From: anderson.peterle@previdencia.gov.br Date: Thu, 10 Mar 2011 19:33:14 +0000 Subject: [PATCH] Exclusão para posterior reposição com versão 2.6-Beta-2 --- USBdetectClass.pas | 164 -------------------------------------------------------------------------------------------------------------------------------------------------------------------- cacic2.dpr | 67 ------------------------------------------------------------------- cacic2.res | Bin 4880 -> 0 bytes frmsenha.dfm | 204 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ main.dfm | 1841 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- main.pas | 2638 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 6 files changed, 0 insertions(+), 4914 deletions(-) delete mode 100644 USBdetectClass.pas delete mode 100755 cacic2.dpr delete mode 100755 cacic2.res delete mode 100755 frmsenha.dfm delete mode 100755 main.dfm delete mode 100755 main.pas diff --git a/USBdetectClass.pas b/USBdetectClass.pas deleted file mode 100644 index ae9dd5f..0000000 --- a/USBdetectClass.pas +++ /dev/null @@ -1,164 +0,0 @@ -unit USBdetectClass; -// Código Original obtido em http://www.delphi3000.com/articles/article_4841.asp?SK= -interface -uses Windows, Messages, SysUtils, Classes; - -type - { Event Types } - TOnUsbChangeEvent = procedure(AObject : TObject; - const ADevType,AVendorID, - AProductID : string) of object; - - { USB Class } - TUsbClass = class(TObject) - private - FHandle : HWND; - FOnUsbRemoval, - FOnUsbInsertion : TOnUsbChangeEvent; - procedure GetUsbInfo(const ADeviceString : string; - out ADevType,AVendorID, - AProductID : string); - procedure WinMethod(var AMessage : TMessage); - procedure RegisterUsbHandler; - procedure WMDeviceChange(var AMessage : TMessage); - procedure Split(const Delimiter: Char;Input: string;const Strings: TStrings); - public - constructor Create; - destructor Destroy; override; - property OnUsbInsertion : TOnUsbChangeEvent read FOnUsbInsertion - write FOnUsbInsertion; - property OnUsbRemoval : TOnUsbChangeEvent read FOnUsbRemoval - write FOnUsbRemoval; - end; - - - -// ----------------------------------------------------------------------------- -implementation - -type - // Win API Definitions - PDevBroadcastDeviceInterface = ^DEV_BROADCAST_DEVICEINTERFACE; - DEV_BROADCAST_DEVICEINTERFACE = record - dbcc_size : DWORD; - dbcc_devicetype : DWORD; - dbcc_reserved : DWORD; - dbcc_classguid : TGUID; - dbcc_name : char; - end; - -const - // Miscellaneous - GUID_DEVINTF_USB_DEVICE : TGUID = '{A5DCBF10-6530-11D2-901F-00C04FB951ED}'; - USB_INTERFACE = $00000005; // Device interface class - USB_INSERTION = $8000; // System detected a new device - USB_REMOVAL = $8004; // Device is gone - -constructor TUsbClass.Create; -begin - inherited Create; - FHandle := AllocateHWnd(WinMethod); - RegisterUsbHandler; -end; - -destructor TUsbClass.Destroy; -begin - DeallocateHWnd(FHandle); - inherited Destroy; -end; - -procedure TUsbClass.GetUsbInfo(const ADeviceString : string; - out ADevType,AVendorID, - AProductID : string); -var sWork,sKey1 : string; - tstrAUX1,tstrAUX2 : TStringList; -begin - ADevType := ''; - AVendorID := ''; - AProductID := ''; - - if ADeviceString <> '' then - Begin - sWork := copy(ADeviceString,pos('#',ADeviceString) + 1,1026); - sKey1 := copy(sWork,1,pos('#',sWork) - 1); - - tstrAUX1 := TStringList.Create; - tstrAUX2 := TStringList.Create; - - Split('&',sKey1,tstrAUX1); - - Split('_',tstrAUX1[0],tstrAUX2); - AVendorID := tstrAUX2[1]; - - Split('_',tstrAUX1[1],tstrAUX2); - AProductID := tstrAUX2[1]; - - tstrAUX1.Free; - tstrAUX2.Free; - End; -end; - -procedure TUsbClass.Split(const Delimiter: Char; - Input: string; - const Strings: TStrings) ; -begin - Assert(Assigned(Strings)) ; - Strings.Clear; - Strings.Delimiter := Delimiter; - Strings.DelimitedText := Input; -end; - -procedure TUsbClass.WMDeviceChange(var AMessage : TMessage); -var iDevType : integer; - sDevString,sDevType, - sVendorID,sProductID : string; - pData : PDevBroadcastDeviceInterface; -begin - if (AMessage.wParam = USB_INSERTION) or - (AMessage.wParam = USB_REMOVAL) then - Begin - pData := PDevBroadcastDeviceInterface(AMessage.LParam); - iDevType := pData^.dbcc_devicetype; - - // Se for um dispositivo USB... - if iDevType = USB_INTERFACE then - Begin - sDevString := PChar(@pData^.dbcc_name); - - GetUsbInfo(sDevString,sDevType,sVendorID,sProductID); - - // O evento é disparado conforme a mensagem - if (AMessage.wParam = USB_INSERTION) and Assigned(FOnUsbInsertion) then - FOnUsbInsertion(self,sDevType,sVendorID,sProductID); - if (AMessage.wParam = USB_REMOVAL) and Assigned(FOnUsbRemoval) then - FOnUsbRemoval(self,sDevType,sVendorID,sProductID); - End; - End; -end; - -procedure TUsbClass.WinMethod(var AMessage : TMessage); -begin - if (AMessage.Msg = WM_DEVICECHANGE) then - WMDeviceChange(AMessage) - else - AMessage.Result := DefWindowProc(FHandle,AMessage.Msg, - AMessage.wParam,AMessage.lParam); -end; - - -procedure TUsbClass.RegisterUsbHandler; -var rDbi : DEV_BROADCAST_DEVICEINTERFACE; - iSize : integer; -begin - iSize := SizeOf(DEV_BROADCAST_DEVICEINTERFACE); - ZeroMemory(@rDbi,iSize); - rDbi.dbcc_size := iSize; - rDbi.dbcc_devicetype := USB_INTERFACE; - rDbi.dbcc_reserved := 0; - rDbi.dbcc_classguid := GUID_DEVINTF_USB_DEVICE; - rDbi.dbcc_name := #0; - RegisterDeviceNotification(FHandle,@rDbi,DEVICE_NOTIFY_WINDOW_HANDLE); -end; - - -end. diff --git a/cacic2.dpr b/cacic2.dpr deleted file mode 100755 index 7140fe9..0000000 --- a/cacic2.dpr +++ /dev/null @@ -1,67 +0,0 @@ -(** ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil - -Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais - -O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. - -Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer -MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. - -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 -Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -*) - -program cacic2; - -uses - Forms, - Windows, - main in 'main.pas' {FormularioGeral}, - frmSenha in 'frmsenha.pas' {formSenha}, - frmConfiguracoes in 'frmConfiguracoes.pas' {FormConfiguracoes}, - frmLog in 'frmLog.pas' {FormLog}, - LibXmlParser, - WinVNC in 'winvnc.pas', - CACIC_Library in 'CACIC_Library.pas', - USBdetectClass in 'USBdetectClass.pas'; - -{$R *.res} - -const - CACIC_APP_NAME = 'cacic2'; - -var - hwind:HWND; - oCacic : TCACIC; - -begin - oCacic := TCACIC.Create(); - - if( oCacic.isAppRunning( CACIC_APP_NAME ) ) - then begin - hwind := 0; - repeat // The string 'My app' must match your App Title (below) - hwind:=Windows.FindWindowEx(0,hwind,'TApplication', CACIC_APP_NAME ); - until (hwind<>Application.Handle); - IF (hwind<>0) then - begin - Windows.ShowWindow(hwind,SW_SHOWNORMAL); - Windows.SetForegroundWindow(hwind); - end; - FreeMemory(0); - Halt(0); - end; - - oCacic.Free(); - - // Preventing application button showing in the task bar - SetWindowLong(Application.Handle, GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW ); - Application.Initialize; - Application.Title := 'cacic2'; - Application.CreateForm(TFormularioGeral, FormularioGeral); - Application.Run; -end. diff --git a/cacic2.res b/cacic2.res deleted file mode 100755 index 77e46dc..0000000 Binary files a/cacic2.res and /dev/null differ diff --git a/frmsenha.dfm b/frmsenha.dfm deleted file mode 100755 index 7ce2d09..0000000 --- a/frmsenha.dfm +++ /dev/null @@ -1,204 +0,0 @@ -object formSenha: TformSenha - Left = 361 - Top = 279 - BorderIcons = [biSystemMenu] - BorderStyle = bsDialog - Caption = 'Senha' - ClientHeight = 126 - ClientWidth = 244 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Icon.Data = { - 0000010001003030000000000000A80E00001600000028000000300000006000 - 00000100080000000000800A0000000000000000000000000000000000000000 - 0000FFFFFF001F59FD0070E1360077C7CB0027636C000017B900376F0B000012 - 5B00A3FFFF0030C8F9004B71BB006494F800499C4A006DC183001B382D001954 - A6003B938700002BF30036A2D9004DBCB100092D87008EF2D20025375E007ED7 - F70000092E001C50D3004E9E1F0080E4910063B55900112608005F9DA0003955 - 8E003055450061ABD000244D04003778F4005781D90063B5FE005FBC32003B85 - 5B000534CA0074C7A9005D8F7E004282260017223B0073D463002D58260045B3 - F9003875D50081DFB500416F73002F477700083CFF00338FC3002667870092F3 - F3002EB8E7000021D500001DA000132127002757BC00021C780083DADC00447E - 45004262A400080E15005899B5003D9B9A00020245006EBEE00069ACB7005398 - ED000C3CA2002E6C57007ADA79002842470053A830001F3D15004F8486000F48 - BC001D2C49004C8BC10047AEA0006DA2FF006ECE4F00226197004390D400012E - DD0016388600264C320075CD910030515900113562000B31B60058A5F900549C - D80069CD300030797F0002114500325B7F0094FADE00274F190056AE24005078 - C9006DA99C005E8DE900326B1C0047963900559095007ACDE1007BD6A2003F8E - 5700357D6C003C6C96002D6BFB0089E9C3004082ED0071BDC0003B66660089E9 - FF007FD4BD000032FD0087E0EA00326EE7000024B00010244C001E333A002E5C - 14000026C10065BD490072C29A001941AD0016499800001B8E0084DCCB004893 - 27003C8539002A3F6900205C8E0076CBF1000C1B0B00172E16004F8FDF0098FD - FC00478054001854B8003D791D0032596F00164DFD002C6E6E0064A7AB004181 - D6000C151F000333EE004188CA0042746500294D28002FADDC001C3B05003466 - 2900354F85003EAEEE006699F40035878500365C630030C0F00072D741008FEE - EB0053B13B004669B00034628A00519C3F003C96960002061000131D3000000B - 3A0060B150000129CE0087E3CF0073C1D4004D94F80063C32C004E9F2A003D5C - 99002C6D7B0085E6AA0076D86F001E4B3E005693AB002C64990074D850001D3D - 6300408E3F00679AFE00345951003A8964000B3AB700172B21005EA7D8000407 - 0600316310005AB32B005A88E200B1FFFF00539DF700233C3A0005237D00144C - AF00537ED00053898D0018320600002FE7007ED2D80071D45A00296355001C59 - A4000007240088E3E100102F810068ACA60042934B005F91F000265630004B7F - 7E000E2A4400418D35000E1724006BD335001246F6002662FE0076C4C1006FC6 - 8D001247A1002C57860032611C006CBAD50036B1E700050F33005690E6004894 - DA0075C5DF0073C89F0087E9B8000021B5002B494C003F9ADA009DFFFE005A97 - 9800112111007DCFC6006ABDFE000630D5004260AD004F9D34003AA5E0000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000003E08000000000000000000000000 - 0000000000000000000000000000000000000000000000008608000000000000 - 00087A5800000000000000000000000000000000000000000000000000000000 - 0000000000000000D47A630000000000B0D47A7A7D0000000000000000000000 - 0000000000000000000000000000000000000000000000B27A7A810000000000 - 867A7A7AB2000000000000000000000000000000000000000000000000000000 - 00000000000000587A7A7A08000000B07A7A7A7AD40000000000000000000000 - 00000000000000000000000000000000000000000000867A7A7A7AD400000063 - 587A7A7A12860000000000000000000000000000000000000000000000000000 - 000000000000F47A7A7A7A581900005CEA817AFCC55900000000000000000000 - 00000000000000000000000000000000000000000000595ED47AF4AB7F00003F - A8943BC069DC0000000000000000000000000000000000000000000000000000 - 000000000000DC2BDB8633F76D003CDAF7387797CC3F00000000000000000000 - 000000173434348A00000000000000000000000000A538CC4F3390F79700003F - F790F790F73F4C0000000000000017A1AA68CBDEC25454C26A250BB834000000 - 0000000000E038F7A8F790F71F0000F80990F790F73F000000000000200B0C54 - 5454C2C2C2C2C2C2C2545454C2D1B83400000000003338F7F790F709A500000F - 1FF7F790097600000000B8CB5454C2C2C2C2C25454C25454C2C2C2C2C25454C2 - 0B170000003CD50990F790F8C600001E2CD29009E721C800A1D15454C2C2C2C2 - C2C2546820202041CB54C2C2C2C2C2C254DEAA000000C33F09A8E093F900008D - B72C334F402399AAC254C2C2C2C2C2C2C2C220B8AA0BAAAA204154C2C2C2C2C2 - C2C2542500C8C991D29C882C00000000660388881B5AFD4857DEC2C2C2C2C2C2 - 54A141CBC2C254C22520B854C2C2C2C2C2C2EFF08F2D80B788B7034E00000000 - F94D03E41B510CF639FF6AC2C2C2C2C2CB8A6AC2C2C2C2C2C2CB3468C2C2C2C2 - C2EFED398F257F67E4032C0000000000004E27B69DBEA29BF6A6FFEFC2C2C2C2 - DECBC2C2C2C2C2C2C2C2CBCBC2C2C20C8FEDA6575730C0EBE4B78E0000000000 - 00429F9351489EA657F6A6ED8FC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C20C8F - A6A69B570A9EEF7F93D3000000000000992541F96AC28F9EA65757A6398F0CC2 - C2C2C2C2C2C2C2C2C2C2C2C2C2DEF00A399BF60A9E8F540B8D0BA10000000000 - 68C20CCBC2C2C28F9E0AF69B36EFC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2EF36 - 9BF60A138FC2C2C2CBC2A38A00000041C2C2C2C2C2C2C2C28F9EA6F0DEC2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2CBF60A13EFC2C2C2C2C2C2C2A35100AFC2 - C2C2C2C2C2C2C2C2C2EF9BDEC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - EF9BDEC2C2C2C2C2C2C2C2C2CB002DC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C22DAFC2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2AF0041C2C2C2C2C2C2C2C2C2C20CCB25D1680B - AA4125C2C2C2C2C2C2C22541AA0B68D125CB0CC2C2C2C2C2C2C2C2C2AA000000 - 4154C2C2C2C2C2C2C2C2682020B841AA0B0B0CC2C2C2C2C2C2C20C0B0BAA41B8 - 2020D1C2C2C2C2C2C2C2DE1700000000426A0CC2C2C2C2C2C2C2C25454C2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C25454C2C2C2C2C2C2C2A3510000000000 - 00AFB825CB6A0CC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - C2C2C2C20CDECBCBAA17C80000000000000000009951A1AA682525CBCBCB6A6A - DEDE0C0CC2C2C2C20C0CDE6A6ACBCBCB2525D1AA2017AFAE0000000000000000 - 000000000000000000C842E3AF2D51178A34A120B8CBCBB820348A17512DAFE3 - 42AE000000000000000000000000000000000000000000000000000000000000 - 0000000000343400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000002D17000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000C8AF00000000000000000000000000000000000000000000000000 - 00AE19D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9EED9D9D9D9D9D9D9D9D9 - D9D9D9D9D9D9D9D9D919AE00000000000063F4F4F4F4F4F4F4F4F4F4F4F4F4F4 - F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F43BB00000000000 - 00003E15CF3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E - 3E3E3E3E3E3E3ECF1508000000000000000000BC531414141414141414141414 - 1414141414141414141414141414141414141414141414110F00000000000000 - 00000000A444AD44ADAD44ADADADAD44AD44ADAD44ADAD44AD44ADAD44AD44AD - AD44AD4444AD449600000000000000000000000000002F4C7E63D321CE080F1E - 77E308668D770899664C7F081E9DF563E1D3217F455A00000000000000000000 - 00000000D4D7821F3D7D6B0E1FFC05C9B3643A6CA0DA5E5DCA1F723ADFB14784 - E90783BD067100B30000000000000000000000007A37A787CD3A70BB870210B7 - 16227A71FEF731C5612A8C3AB9A7FA7529E21CF1E55688160000000000000000 - 000000007AD86174263AC4D61673C54D32EC35374D90F058B68378B256A7795F - 81DD4BB402D088740400000000000000000000B27A92B6F3FB3A71556524C5A9 - 6FB4358BCAA8609ACAE87829D8E432268170BB040250B7320400000000000000 - 000000007A56E4745F3A702E87E6D0B7742235B94D90982961F2183A37A779B5 - 29C11C6E951088160000000000000000000000007A96BFFA75B2891CD5953788 - 65527A0DACF71A85E4E7C7124AD67B7C5088BA469A62B7650000000000000000 - 0000000029001D000049005B43B22800B300004D0087B2004DD500B2001DB400 - 8B008300002800FA000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FFFFFFFF0000F3FFFFFFFFCF0000E3FFFFFFFFC70000C1FFFFFFFF870000C1FF - FFFFFF83000081FFFFFFFF03000080FFFFFFFF01000080FFFFFFFF01000080FF - FFFFFF01000000FFF83FFE010000807F0001FE01000080FC00003E01000080F0 - 00000E01000080400000070100008000000002030000C000000000030000C000 - 000000070000E000000000070000E0000000000F0000C000000000070000C000 - 0000000300008000000000010000000000000001000000000000000000000000 - 0000000000008000000000010000C00000000003000080000000000500008000 - 0000000300008000000000030000C000000000030000C000000000030000C000 - 000000070000E000000000070000E000000000070000E000000000070000F000 - 0000000F0000F8000000001F0000FC000000003F0000FF00000000FF0000FC00 - 000000BF0000FC000000003F0000FC000000001F0000F8000000001F0000FC00 - 0000003F0000FC000000003F0000FD685A4A56BF0000FFFFFFFFFFFF0000} - OldCreateOrder = False - Position = poScreenCenter - OnClose = FormClose - PixelsPerInch = 96 - TextHeight = 13 - object Lb_Texto_Senha: TLabel - Left = 8 - Top = 7 - Width = 234 - Height = 26 - Caption = - 'Essa op'#231#227'o requer que seja informada a senha que foi configurada' + - ' pelo administrador do CACIC. ' - WordWrap = True - end - object Lb_Senha: TLabel - Left = 10 - Top = 48 - Width = 34 - Height = 13 - Caption = 'Senha:' - end - object Lb_Msg_Erro_Senha: TLabel - Left = 91 - Top = 68 - Width = 3 - Height = 13 - Alignment = taCenter - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clRed - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - ParentColor = False - ParentFont = False - end - object EditSenha: TEdit - Left = 50 - Top = 41 - Width = 185 - Height = 21 - PasswordChar = '*' - TabOrder = 0 - end - object Bt_OK_Senha: TButton - Left = 34 - Top = 92 - Width = 83 - Height = 25 - Caption = '&OK' - Default = True - TabOrder = 1 - OnClick = Bt_OK_SenhaClick - end - object Bt_Cancelar_Senha: TButton - Left = 134 - Top = 92 - Width = 83 - Height = 25 - Cancel = True - Caption = '&Cancelar' - TabOrder = 2 - OnClick = Bt_Cancelar_SenhaClick - end - object Tm_Senha: TTimer - Interval = 3000 - OnTimer = Tm_SenhaTimer - Top = 72 - end -end diff --git a/main.dfm b/main.dfm deleted file mode 100755 index f4e5450..0000000 --- a/main.dfm +++ /dev/null @@ -1,1841 +0,0 @@ -object FormularioGeral: TFormularioGeral - Left = 300 - Top = 107 - HorzScrollBar.Visible = False - VertScrollBar.Visible = False - BiDiMode = bdLeftToRight - BorderIcons = [] - BorderStyle = bsSingle - Caption = 'CACIC - Informa'#231#245'es Gerais' - ClientHeight = 597 - ClientWidth = 716 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [] - Icon.Data = { - 0000010001003030000000000000A80E00001600000028000000300000006000 - 00000100080000000000800A0000000000000000000000000000000000000000 - 0000FFFFFF001F59FD0070E1360077C7CB0027636C000017B900376F0B000012 - 5B00A3FFFF0030C8F9004B71BB006494F800499C4A006DC183001B382D001954 - A6003B938700002BF30036A2D9004DBCB100092D87008EF2D20025375E007ED7 - F70000092E001C50D3004E9E1F0080E4910063B55900112608005F9DA0003955 - 8E003055450061ABD000244D04003778F4005781D90063B5FE005FBC32003B85 - 5B000534CA0074C7A9005D8F7E004282260017223B0073D463002D58260045B3 - F9003875D50081DFB500416F73002F477700083CFF00338FC3002667870092F3 - F3002EB8E7000021D500001DA000132127002757BC00021C780083DADC00447E - 45004262A400080E15005899B5003D9B9A00020245006EBEE00069ACB7005398 - ED000C3CA2002E6C57007ADA79002842470053A830001F3D15004F8486000F48 - BC001D2C49004C8BC10047AEA0006DA2FF006ECE4F00226197004390D400012E - DD0016388600264C320075CD910030515900113562000B31B60058A5F900549C - D80069CD300030797F0002114500325B7F0094FADE00274F190056AE24005078 - C9006DA99C005E8DE900326B1C0047963900559095007ACDE1007BD6A2003F8E - 5700357D6C003C6C96002D6BFB0089E9C3004082ED0071BDC0003B66660089E9 - FF007FD4BD000032FD0087E0EA00326EE7000024B00010244C001E333A002E5C - 14000026C10065BD490072C29A001941AD0016499800001B8E0084DCCB004893 - 27003C8539002A3F6900205C8E0076CBF1000C1B0B00172E16004F8FDF0098FD - FC00478054001854B8003D791D0032596F00164DFD002C6E6E0064A7AB004181 - D6000C151F000333EE004188CA0042746500294D28002FADDC001C3B05003466 - 2900354F85003EAEEE006699F40035878500365C630030C0F00072D741008FEE - EB0053B13B004669B00034628A00519C3F003C96960002061000131D3000000B - 3A0060B150000129CE0087E3CF0073C1D4004D94F80063C32C004E9F2A003D5C - 99002C6D7B0085E6AA0076D86F001E4B3E005693AB002C64990074D850001D3D - 6300408E3F00679AFE00345951003A8964000B3AB700172B21005EA7D8000407 - 0600316310005AB32B005A88E200B1FFFF00539DF700233C3A0005237D00144C - AF00537ED00053898D0018320600002FE7007ED2D80071D45A00296355001C59 - A4000007240088E3E100102F810068ACA60042934B005F91F000265630004B7F - 7E000E2A4400418D35000E1724006BD335001246F6002662FE0076C4C1006FC6 - 8D001247A1002C57860032611C006CBAD50036B1E700050F33005690E6004894 - DA0075C5DF0073C89F0087E9B8000021B5002B494C003F9ADA009DFFFE005A97 - 9800112111007DCFC6006ABDFE000630D5004260AD004F9D34003AA5E0000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000003E08000000000000000000000000 - 0000000000000000000000000000000000000000000000008608000000000000 - 00087A5800000000000000000000000000000000000000000000000000000000 - 0000000000000000D47A630000000000B0D47A7A7D0000000000000000000000 - 0000000000000000000000000000000000000000000000B27A7A810000000000 - 867A7A7AB2000000000000000000000000000000000000000000000000000000 - 00000000000000587A7A7A08000000B07A7A7A7AD40000000000000000000000 - 00000000000000000000000000000000000000000000867A7A7A7AD400000063 - 587A7A7A12860000000000000000000000000000000000000000000000000000 - 000000000000F47A7A7A7A581900005CEA817AFCC55900000000000000000000 - 00000000000000000000000000000000000000000000595ED47AF4AB7F00003F - A8943BC069DC0000000000000000000000000000000000000000000000000000 - 000000000000DC2BDB8633F76D003CDAF7387797CC3F00000000000000000000 - 000000173434348A00000000000000000000000000A538CC4F3390F79700003F - F790F790F73F4C0000000000000017A1AA68CBDEC25454C26A250BB834000000 - 0000000000E038F7A8F790F71F0000F80990F790F73F000000000000200B0C54 - 5454C2C2C2C2C2C2C2545454C2D1B83400000000003338F7F790F709A500000F - 1FF7F790097600000000B8CB5454C2C2C2C2C25454C25454C2C2C2C2C25454C2 - 0B170000003CD50990F790F8C600001E2CD29009E721C800A1D15454C2C2C2C2 - C2C2546820202041CB54C2C2C2C2C2C254DEAA000000C33F09A8E093F900008D - B72C334F402399AAC254C2C2C2C2C2C2C2C220B8AA0BAAAA204154C2C2C2C2C2 - C2C2542500C8C991D29C882C00000000660388881B5AFD4857DEC2C2C2C2C2C2 - 54A141CBC2C254C22520B854C2C2C2C2C2C2EFF08F2D80B788B7034E00000000 - F94D03E41B510CF639FF6AC2C2C2C2C2CB8A6AC2C2C2C2C2C2CB3468C2C2C2C2 - C2EFED398F257F67E4032C0000000000004E27B69DBEA29BF6A6FFEFC2C2C2C2 - DECBC2C2C2C2C2C2C2C2CBCBC2C2C20C8FEDA6575730C0EBE4B78E0000000000 - 00429F9351489EA657F6A6ED8FC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C20C8F - A6A69B570A9EEF7F93D3000000000000992541F96AC28F9EA65757A6398F0CC2 - C2C2C2C2C2C2C2C2C2C2C2C2C2DEF00A399BF60A9E8F540B8D0BA10000000000 - 68C20CCBC2C2C28F9E0AF69B36EFC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2EF36 - 9BF60A138FC2C2C2CBC2A38A00000041C2C2C2C2C2C2C2C28F9EA6F0DEC2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2CBF60A13EFC2C2C2C2C2C2C2A35100AFC2 - C2C2C2C2C2C2C2C2C2EF9BDEC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - EF9BDEC2C2C2C2C2C2C2C2C2CB002DC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C22DAFC2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2AF0041C2C2C2C2C2C2C2C2C2C20CCB25D1680B - AA4125C2C2C2C2C2C2C22541AA0B68D125CB0CC2C2C2C2C2C2C2C2C2AA000000 - 4154C2C2C2C2C2C2C2C2682020B841AA0B0B0CC2C2C2C2C2C2C20C0B0BAA41B8 - 2020D1C2C2C2C2C2C2C2DE1700000000426A0CC2C2C2C2C2C2C2C25454C2C2C2 - C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C25454C2C2C2C2C2C2C2A3510000000000 - 00AFB825CB6A0CC2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2C2 - C2C2C2C20CDECBCBAA17C80000000000000000009951A1AA682525CBCBCB6A6A - DEDE0C0CC2C2C2C20C0CDE6A6ACBCBCB2525D1AA2017AFAE0000000000000000 - 000000000000000000C842E3AF2D51178A34A120B8CBCBB820348A17512DAFE3 - 42AE000000000000000000000000000000000000000000000000000000000000 - 0000000000343400000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000002D17000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000C8AF00000000000000000000000000000000000000000000000000 - 00AE19D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9D9EED9D9D9D9D9D9D9D9D9 - D9D9D9D9D9D9D9D9D919AE00000000000063F4F4F4F4F4F4F4F4F4F4F4F4F4F4 - F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F4F43BB00000000000 - 00003E15CF3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E3E - 3E3E3E3E3E3E3ECF1508000000000000000000BC531414141414141414141414 - 1414141414141414141414141414141414141414141414110F00000000000000 - 00000000A444AD44ADAD44ADADADAD44AD44ADAD44ADAD44AD44ADAD44AD44AD - AD44AD4444AD449600000000000000000000000000002F4C7E63D321CE080F1E - 77E308668D770899664C7F081E9DF563E1D3217F455A00000000000000000000 - 00000000D4D7821F3D7D6B0E1FFC05C9B3643A6CA0DA5E5DCA1F723ADFB14784 - E90783BD067100B30000000000000000000000007A37A787CD3A70BB870210B7 - 16227A71FEF731C5612A8C3AB9A7FA7529E21CF1E55688160000000000000000 - 000000007AD86174263AC4D61673C54D32EC35374D90F058B68378B256A7795F - 81DD4BB402D088740400000000000000000000B27A92B6F3FB3A71556524C5A9 - 6FB4358BCAA8609ACAE87829D8E432268170BB040250B7320400000000000000 - 000000007A56E4745F3A702E87E6D0B7742235B94D90982961F2183A37A779B5 - 29C11C6E951088160000000000000000000000007A96BFFA75B2891CD5953788 - 65527A0DACF71A85E4E7C7124AD67B7C5088BA469A62B7650000000000000000 - 0000000029001D000049005B43B22800B300004D0087B2004DD500B2001DB400 - 8B008300002800FA000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000000000000000000FFFF - FFFFFFFF0000F3FFFFFFFFCF0000E3FFFFFFFFC70000C1FFFFFFFF870000C1FF - FFFFFF83000081FFFFFFFF03000080FFFFFFFF01000080FFFFFFFF01000080FF - FFFFFF01000000FFF83FFE010000807F0001FE01000080FC00003E01000080F0 - 00000E01000080400000070100008000000002030000C000000000030000C000 - 000000070000E000000000070000E0000000000F0000C000000000070000C000 - 0000000300008000000000010000000000000001000000000000000000000000 - 0000000000008000000000010000C00000000003000080000000000500008000 - 0000000300008000000000030000C000000000030000C000000000030000C000 - 000000070000E000000000070000E000000000070000E000000000070000F000 - 0000000F0000F8000000001F0000FC000000003F0000FF00000000FF0000FC00 - 000000BF0000FC000000003F0000FC000000001F0000F8000000001F0000FC00 - 0000003F0000FC000000003F0000FD685A4A56BF0000FFFFFFFFFFFF0000} - OldCreateOrder = False - ParentBiDiMode = False - Position = poDesktopCenter - OnCloseQuery = FormCloseQuery - OnCreate = FormCreate - PixelsPerInch = 96 - TextHeight = 13 - object Panel3: TPanel - Left = 648 - Top = -1 - Width = 68 - Height = 597 - Color = clGray - TabOrder = 3 - object pnVersao: TPanel - Left = 6 - Top = 578 - Width = 61 - Height = 16 - BevelInner = bvLowered - BevelOuter = bvLowered - Caption = 'v. 2.6.0.xxx' - Color = clBackground - Font.Charset = DEFAULT_CHARSET - Font.Color = clWhite - Font.Height = -9 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object bt_Fechar_Infos_Gerais: TBitBtn - Left = 6 - Top = 252 - Width = 61 - Height = 33 - Caption = 'Fechar' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -9 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 1 - TabStop = False - OnClick = Bt_Fechar_InfosGeraisClick - Glyph.Data = { - E6040000424DE604000000000000360000002800000014000000140000000100 - 180000000000B0040000120B0000120B00000000000000000000FFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFA39C989C969D96909D918B98928B908C827AFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFC0BCBCB4B4D19B9AD85657CD6364D96364D95657CD9998D2ADA9BE9D958EFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB7B4C18B8BD5 - 5A5AD88081E48B8BE58D8DE48D8DE48B8BE57777E24646C98E8DC8A7A0A1FFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFB6B4C27D7DCB9B9BE26E6ED254 - 54D35A5AD55959D55959D55959D55454D39B9BE26868CC6262B5A8A2A3FFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4848A78888D8F0F0FBBCBCE64242BA2525 - C42E2EC62E2EC62525C48888D8E2E2F5DBDBF13939B07574ADA59E98FFFFFFFF - FFFFFFFFFFFFFFFF9291B52020943332A6BCBCE6DEDEF4B2B2DF2625B10000AE - 0000AE6E6ED2D8D8F1DBDBF38080CC10109505068DA8A5B3FFFFFFFFFFFFFFFF - FFFFFFFF37378A00007D0000852828A2BCBCE6DEDEF4B2B2DF1F1FAA5A5AC8D4 - D4F0DBDBF38080CC01019100008800007D7C7AA8FFFFFFFFFFFFFFFFFFD0CFD6 - 20207300007200007F0000852828A2BBBBE3D8D8F1BBBBE3CBCBECD9D9F28080 - CC01018F00008600007F000070515193BCB8B7FFFFFFFFFFFFBBBAC60E0E611D - 1D7B0E0E7C03037D00007B272799C3C3E5D3D3EBD6D6ED8484C300008300007F - 0000790000700000640A0A61C1BEC0FFFFFFFFFFFFBBBAC63838786564A06564 - A056569E4242977A7ABBD3D3EBD9D9EED9D9EEAFAFD12E2E8A14148116167B0C - 0C6D000058060751CAC8C9FFFFFFFFFFFFCECDD38383A48A8AAE8383AD8181B2 - B8B8D4F1F1F7EDEDF2CBCBE1DADAEAF1F1F7D3D3E48181B27E7EAD7E7EAD5454 - 871B1B53CFCCCBFFFFFFFFFFFFFFFFFF7D7D929F9FB79D9DBAC3C3D5F3F3F4F1 - F1F7D3D3E49999C0ABABCCE6E6EEF6F6F8DDDDE79D9DBAA2A2BB8A8BA2848295 - DBD8D8FFFFFFFFFFFFFFFFFF8B8B96D8D8DDD5D5DEF6F6F8F5F5F6DDDDE7B4B4 - CBB4B4CBB1B1C9C3C3D5EDEDF2F9F8F8E3E3EABEBECCB5B5BFADABB1FFFFFFFF - FFFFFFFFFFFFFFFFFFFFFF898896FEFEFEFBFBFBE6E6EEC9C9D5CAC9D5CBCBD6 - CBCBD6C8C7D3D5D5DEF3F2F3F9F9FAF0F0F2848290FFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFAEAEB8FFFFFFE5E3E8DBDBE0DBDADFDBDADFDBDADFDC - DBDFDCDBE0EBEAECF9F9FA858594FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFA4A4AFF4F4F5ECECEEF3F3F4F4F3F4F3F3F4F3F2F3E4E3 - E7E6E6E99493A0FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFB1B1BAB1B1BAD8D8DDE3E3E7E3E3E7D2D2D7A9A9B3C0C0C6 - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFC8C8CDCAC9CEFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - FFFFFFFFFFFFFFFFFFFF} - Spacing = 1 - end - end - object Pn_InfosGerais: TPanel - Left = 0 - Top = 0 - Width = 647 - Height = 597 - BevelOuter = bvNone - Color = clHighlight - TabOrder = 0 - object Pn_SisMoni: TPanel - Left = 4 - Top = 200 - Width = 640 - Height = 133 - Caption = 'Pn_SisMoni' - TabOrder = 0 - DesignSize = ( - 640 - 133) - object Lb_SisMoni: TLabel - Left = 5 - Top = 4 - Width = 273 - Height = 13 - Alignment = taCenter - Caption = 'Sistemas Monitorados Instalados Nesta Esta'#231#227'o' - Font.Charset = DEFAULT_CHARSET - Font.Color = clHotLight - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold, fsUnderline] - ParentFont = False - end - object listSistemasMonitorados: TListView - Left = 5 - Top = 19 - Width = 632 - Height = 110 - Anchors = [akLeft, akTop, akRight, akBottom] - BiDiMode = bdLeftToRight - Color = clSilver - Columns = < - item - Caption = 'Nome do Sistema Monitorado' - Width = 295 - end - item - Caption = 'Licen'#231'a' - Width = 200 - end - item - Caption = 'Vers'#227'o/Configura'#231#227'o' - Width = 130 - end> - DragMode = dmAutomatic - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [] - FlatScrollBars = True - GridLines = True - HotTrackStyles = [htUnderlineHot] - ReadOnly = True - ParentBiDiMode = False - ParentFont = False - TabOrder = 0 - TabStop = False - ViewStyle = vsReport - end - end - object Pn_TCPIP: TPanel - Left = 4 - Top = 49 - Width = 640 - Height = 149 - Caption = 'Pn_TCPIP' - TabOrder = 1 - object Lb_TCPIP: TLabel - Left = 5 - Top = 4 - Width = 136 - Height = 14 - Alignment = taCenter - Caption = 'Configura'#231#245'es de TCP/IP' - Font.Charset = DEFAULT_CHARSET - Font.Color = clHotLight - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold, fsUnderline] - ParentFont = False - end - object GB_InfosTCPIP: TGroupBox - Left = 5 - Top = 19 - Width = 631 - Height = 126 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - DesignSize = ( - 631 - 126) - object ST_VL_MacAddress: TStaticText - Left = 436 - Top = 23 - Width = 16 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '12' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 29 - end - object ST_LB_MacAddress: TStaticText - Left = 350 - Top = 23 - Width = 88 - Height = 18 - Caption = 'Endere'#231'o MAC:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 28 - end - object ST_LB_NomeHost: TStaticText - Left = 60 - Top = 8 - Width = 88 - Height = 18 - Caption = 'Nome do HOST:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object ST_VL_NomeHost: TStaticText - Left = 145 - Top = 8 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '1' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 1 - end - object ST_LB_IpEstacao: TStaticText - Left = 15 - Top = 23 - Width = 133 - Height = 18 - Caption = 'Endere'#231'o IP da Esta'#231#227'o:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object ST_LB_IpRede: TStaticText - Left = 29 - Top = 40 - Width = 119 - Height = 18 - Caption = 'Endere'#231'o IP da Rede:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - end - object ST_LB_DominioDNS: TStaticText - Left = 5 - Top = 57 - Width = 143 - Height = 18 - Caption = 'Servidor de Dom'#237'nio DNS:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - end - object ST_LB_DnsPrimario: TStaticText - Left = 20 - Top = 73 - Width = 128 - Height = 18 - Caption = 'Servidor DNS Prim'#225'rio:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - end - object ST_LB_DnsSecundario: TStaticText - Left = 295 - Top = 73 - Width = 143 - Height = 18 - Caption = 'Servidor DNS Secund'#225'rio:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object ST_LB_Gateway: TStaticText - Left = 53 - Top = 89 - Width = 95 - Height = 18 - Caption = 'Gateway Padr'#227'o:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 7 - end - object ST_LB_Mascara: TStaticText - Left = 316 - Top = 40 - Width = 122 - Height = 18 - Caption = 'M'#225'scara de SubRede:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 8 - end - object ST_LB_ServidorDHCP: TStaticText - Left = 352 - Top = 89 - Width = 86 - Height = 18 - Caption = 'Servidor DHCP:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 9 - end - object ST_LB_WinsPrimario: TStaticText - Left = 14 - Top = 106 - Width = 134 - Height = 18 - Caption = 'Servidor Wins Prim'#225'rio:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 10 - end - object ST_LB_WinsSecundario: TStaticText - Left = 289 - Top = 106 - Width = 149 - Height = 18 - Caption = 'Servidor Wins Secund'#225'rio:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 11 - end - object ST_VL_IpEstacao: TStaticText - Left = 145 - Top = 23 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '2' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 12 - end - object ST_VL_DNSPrimario: TStaticText - Left = 145 - Top = 73 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '5' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 13 - end - object ST_VL_DNSSecundario: TStaticText - Left = 436 - Top = 73 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '6' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 14 - end - object ST_VL_Gateway: TStaticText - Left = 145 - Top = 89 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '7' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 15 - end - object ST_VL_Mascara: TStaticText - Left = 436 - Top = 40 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '8' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 16 - end - object ST_VL_ServidorDHCP: TStaticText - Left = 436 - Top = 89 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '9' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 17 - end - object ST_VL_WinsPrimario: TStaticText - Left = 145 - Top = 106 - Width = 16 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '10' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 18 - end - object ST_VL_WinsSecundario: TStaticText - Left = 436 - Top = 106 - Width = 16 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '11' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 19 - end - object ST_VL_DominioDNS: TStaticText - Left = 145 - Top = 57 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '4' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 20 - end - object ST_VL_IpRede: TStaticText - Left = 145 - Top = 40 - Width = 10 - Height = 18 - Alignment = taRightJustify - Anchors = [akRight] - Caption = '3' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 21 - end - object Pn_Linha1_TCPIP: TPanel - Tag = 36 - Left = 3 - Top = 22 - Width = 627 - Height = 2 - TabOrder = 22 - end - object Pn_Linha2_TCPIP: TPanel - Tag = 36 - Left = 3 - Top = 39 - Width = 627 - Height = 2 - TabOrder = 23 - end - object Pn_Linha3_TCPIP: TPanel - Tag = 36 - Left = 3 - Top = 56 - Width = 627 - Height = 2 - TabOrder = 24 - end - object Pn_Linha4_TCPIP: TPanel - Tag = 36 - Left = 3 - Top = 71 - Width = 627 - Height = 2 - TabOrder = 25 - end - object Pn_Linha6_TCPIP: TPanel - Tag = 36 - Left = 3 - Top = 104 - Width = 627 - Height = 2 - TabOrder = 26 - end - object Pn_Linha5_TCPIP: TPanel - Tag = 36 - Left = 3 - Top = 87 - Width = 627 - Height = 2 - TabOrder = 27 - end - end - end - object pnColetasRealizadasNestaData: TPanel - Left = 4 - Top = 335 - Width = 640 - Height = 129 - Caption = 'Pn_SisMoni' - TabOrder = 2 - DesignSize = ( - 640 - 129) - object lbColetasRealizadasNestaData: TLabel - Left = 5 - Top = 4 - Width = 177 - Height = 13 - Alignment = taCenter - Caption = 'Coletas Realizadas Nesta Data' - Font.Charset = DEFAULT_CHARSET - Font.Color = clHotLight - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold, fsUnderline] - ParentFont = False - end - object teDataColeta: TLabel - Left = 187 - Top = 4 - Width = 3 - Height = 14 - Alignment = taCenter - Caption = '.' - Font.Charset = DEFAULT_CHARSET - Font.Color = clBlack - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - end - object listaColetas: TListView - Left = 5 - Top = 19 - Width = 631 - Height = 105 - Anchors = [akLeft, akTop, akRight, akBottom] - BiDiMode = bdLeftToRight - Color = clSilver - Columns = < - item - Caption = 'M'#243'dulo de Coleta' - Width = 250 - end - item - Caption = 'Hora In'#237'cio' - Width = 60 - end - item - Caption = 'Hora Fim' - Width = 60 - end - item - Caption = 'Status Final' - Width = 240 - end> - DragMode = dmAutomatic - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -12 - Font.Name = 'Arial Narrow' - Font.Style = [] - FlatScrollBars = True - GridLines = True - HotTrackStyles = [htUnderlineHot] - ReadOnly = True - ParentBiDiMode = False - ParentFont = False - TabOrder = 0 - TabStop = False - ViewStyle = vsReport - end - end - object pnInformacoesPatrimoniais: TPanel - Left = 4 - Top = 466 - Width = 640 - Height = 128 - Caption = 'Pn_TCPIP' - TabOrder = 3 - object lbInformacoesPatrimoniais: TLabel - Left = 5 - Top = 4 - Width = 142 - Height = 14 - Alignment = taCenter - Caption = 'Informa'#231#245'es Patrimoniais' - Font.Charset = DEFAULT_CHARSET - Font.Color = clHotLight - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold, fsUnderline] - ParentFont = False - end - object lbSemInformacoesPatrimoniais: TLabel - Left = 157 - Top = 4 - Width = 228 - Height = 14 - Alignment = taCenter - Caption = '(Informa'#231#245'es Patrimoniais ainda n'#227'o coletadas)' - Font.Charset = DEFAULT_CHARSET - Font.Color = clRed - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - Visible = False - end - object gpInfosPatrimoniais: TGroupBox - Left = 5 - Top = 19 - Width = 631 - Height = 106 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - DesignSize = ( - 631 - 106) - object st_vl_etiqueta9: TStaticText - Left = 510 - Top = 90 - Width = 16 - Height = 18 - Anchors = [akRight] - Caption = '10' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 24 - end - object st_lb_Etiqueta9: TStaticText - Left = 355 - Top = 90 - Width = 150 - Height = 13 - Alignment = taRightJustify - AutoSize = False - Caption = 'S'#233'rie da Impressora:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 18 - end - object st_vl_Etiqueta3: TStaticText - Left = 146 - Top = 58 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '4' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 17 - end - object st_lb_Etiqueta3: TStaticText - Left = 3 - Top = 57 - Width = 140 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'Se'#231#227'o:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 16 - end - object st_vl_etiqueta4: TStaticText - Left = 510 - Top = 9 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '5' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 19 - end - object st_vl_etiqueta5: TStaticText - Left = 510 - Top = 26 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '6' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 20 - end - object st_vl_etiqueta6: TStaticText - Left = 510 - Top = 42 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '7' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 21 - end - object st_vl_etiqueta7: TStaticText - Left = 510 - Top = 59 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '8' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 22 - end - object st_vl_etiqueta8: TStaticText - Left = 510 - Top = 74 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '9' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 23 - end - object st_lb_Etiqueta6: TStaticText - Left = 355 - Top = 42 - Width = 150 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'PIB do Monitor:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 5 - end - object st_lb_Etiqueta5: TStaticText - Left = 355 - Top = 25 - Width = 150 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'S'#233'rie da CPU:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 14 - end - object st_lb_Etiqueta4: TStaticText - Left = 355 - Top = 9 - Width = 150 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'PIB da CPU:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 15 - end - object st_lb_Etiqueta1: TStaticText - Left = 3 - Top = 8 - Width = 140 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'Entidade:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object st_vl_Etiqueta1: TStaticText - Left = 146 - Top = 8 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '1' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 1 - end - object st_lb_Etiqueta1a: TStaticText - Left = 3 - Top = 24 - Width = 140 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'Linha de Neg'#243'cio:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 2 - end - object st_lb_Etiqueta2: TStaticText - Left = 3 - Top = 41 - Width = 140 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = #211'rg'#227'o:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - end - object st_lb_Etiqueta7: TStaticText - Left = 355 - Top = 58 - Width = 150 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'S'#233'rie do Monitor:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 4 - end - object st_lb_Etiqueta8: TStaticText - Left = 355 - Top = 73 - Width = 150 - Height = 18 - Alignment = taRightJustify - AutoSize = False - Caption = 'PIB da Impressora:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 6 - end - object st_vl_Etiqueta1a: TStaticText - Left = 146 - Top = 24 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '2' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 7 - end - object st_vl_Etiqueta2: TStaticText - Left = 146 - Top = 42 - Width = 10 - Height = 18 - Anchors = [akRight] - Caption = '3' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 8 - end - object Panel6: TPanel - Tag = 36 - Left = 3 - Top = 22 - Width = 627 - Height = 2 - TabOrder = 9 - end - object Panel7: TPanel - Tag = 36 - Left = 3 - Top = 39 - Width = 627 - Height = 2 - TabOrder = 10 - end - object Panel8: TPanel - Tag = 36 - Left = 3 - Top = 56 - Width = 627 - Height = 2 - TabOrder = 11 - end - object Panel9: TPanel - Tag = 36 - Left = 3 - Top = 72 - Width = 627 - Height = 2 - TabOrder = 12 - end - object Panel11: TPanel - Tag = 36 - Left = 3 - Top = 87 - Width = 627 - Height = 2 - TabOrder = 13 - end - end - end - object pnServidores: TPanel - Left = 4 - Top = 3 - Width = 640 - Height = 44 - TabOrder = 4 - object lbServidores: TLabel - Left = 5 - Top = 1 - Width = 147 - Height = 13 - AutoSize = False - Caption = 'Servidores' - Font.Charset = DEFAULT_CHARSET - Font.Color = clHotLight - Font.Height = -11 - Font.Name = 'MS Sans Serif' - Font.Style = [fsBold, fsUnderline] - ParentFont = False - end - object GroupBox1: TGroupBox - Left = 5 - Top = 15 - Width = 631 - Height = 26 - Color = clSilver - Font.Charset = DEFAULT_CHARSET - Font.Color = clSilver - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentColor = False - ParentFont = False - TabOrder = 0 - DesignSize = ( - 631 - 26) - object staticNmServidorUpdates: TStaticText - Left = 289 - Top = 8 - Width = 140 - Height = 14 - AutoSize = False - Caption = 'Atualiza'#231#227'o de Vers'#245'es:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 3 - end - object staticVlServidorUpdates: TStaticText - Left = 427 - Top = 8 - Width = 200 - Height = 12 - Anchors = [akRight] - AutoSize = False - Caption = '2' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 4 - end - object staticNmServidorAplicacao: TStaticText - Left = 3 - Top = 8 - Width = 86 - Height = 14 - AutoSize = False - Caption = 'Aplica'#231#227'o WEB:' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [fsBold] - ParentFont = False - TabOrder = 0 - end - object staticVlServidorAplicacao: TStaticText - Left = 88 - Top = 8 - Width = 200 - Height = 12 - Anchors = [akRight] - AutoSize = False - Caption = '1' - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Arial' - Font.Style = [] - ParentFont = False - TabOrder = 1 - end - object Panel4: TPanel - Tag = 36 - Left = 3 - Top = 23 - Width = 627 - Height = 2 - TabOrder = 2 - end - end - end - end - object Panel1: TPanel - Left = 645 - Top = 0 - Width = 5 - Height = 597 - Color = clGreen - TabOrder = 1 - end - object Panel2: TPanel - Left = 650 - Top = 0 - Width = 3 - Height = 597 - Color = clYellow - TabOrder = 2 - end - object Timer_Nu_Intervalo: TTimer - Enabled = False - Interval = 5000 - OnTimer = ExecutaCacic - Left = 674 - Top = 30 - end - object Timer_Nu_Exec_Apos: TTimer - Enabled = False - Interval = 1 - OnTimer = ExecutaCacic - Left = 674 - Top = 2 - end - object Popup_Menu_Contexto: TPopupMenu - MenuAnimation = [maLeftToRight, maRightToLeft, maTopToBottom, maBottomToTop] - OnPopup = Popup_Menu_ContextoPopup - Left = 674 - Top = 86 - object Mnu_LogAtividades: TMenuItem - Caption = 'Log de Atividades' - Hint = - 'Exibe as atividades desempenhadas pelos agentes do CACIC nesta d' + - 'ata.' - OnClick = ExibirLogAtividades - end - object Mnu_Configuracoes: TMenuItem - Caption = 'Configura'#231#245'es' - Hint = - 'Permite a reconfigura'#231#227'o de endere'#231'o do Servidor de Aplica'#231#227'o e ' + - 'Servidor de Atualiza'#231#245'es' - OnClick = ExibirConfiguracoes - end - object Mnu_ExecutarAgora: TMenuItem - Caption = 'Executar Agora' - Hint = - 'Ordena ao Agente Principal que inicie as a'#231#245'es fora do intervalo' + - ' previamente configurado no m'#243'dulo Gerente WEB' - OnClick = ExecutaCacic - end - object Mnu_InfosTCP: TMenuItem - Caption = 'Informa'#231#245'es Gerais' - Hint = - 'Exibe um resumo de informa'#231#245'es relevantes coletadas neste comput' + - 'ador' - OnClick = Mnu_InfosTCPClick - end - object Mnu_InfosPatrimoniais: TMenuItem - Caption = 'Informa'#231#245'es &Patrimoniais' - Hint = - 'Caso a op'#231#227'o de coleta autom'#225'tica esteja ativa no m'#243'dulo Gerente' + - ' WEB, esta op'#231#227'o executar'#225' o M'#243'dulo Coletor de Informa'#231#245'es Patri' + - 'moniais' - OnClick = Mnu_InfosPatrimoniaisClick - end - object Mnu_SuporteRemoto: TMenuItem - Caption = 'Ativar Suporte Remoto Seguro' - Hint = - 'Caso a op'#231#227'o de Suporte Remoto Seguro esteja ativa no m'#243'dulo Ger' + - 'ente WEB para esta subrede, esta op'#231#227'o executar'#225' o M'#243'dulo Servid' + - 'or de Suporte Remoto Seguro' - OnClick = Mnu_SuporteRemotoClick - end - object Mnu_FinalizarCacic: TMenuItem - Caption = 'Finalizar o CACIC' - Hint = - 'Ordenar'#225' ao Agente Principal que auto-finalize-se. '#201' necess'#225'rio ' + - 'conhecer a senha configurada previamente no m'#243'dulo Gerente WEB.' - OnClick = Sair - end - end - object Timer_InicializaTray: TTimer - Interval = 60000 - OnTimer = Timer_InicializaTrayTimer - Left = 674 - Top = 58 - end - object imgList_Icones: TImageList - ShareImages = True - Left = 674 - Top = 114 - Bitmap = { - 494C010104000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 - 0000000000003600000028000000400000003000000001002000000000000030 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000000000000000021C7800000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000125B000000000000000000C0C4D7FF000000000000 - 00001E1E1EFF0000000000000000000000000000000000000000000000000000 - 00000000000000000000F0F1F5FF0000000000000000C0C4D7FF000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000F0F1F5FF0000000000000000404040FF000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000000000000032FD00000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000032FD0000000000404B7BFF0032FDFF000000000000 - 00001E1E1EFFB9B9B9FF00000000000000000000000000000000000000000000 - 000000000000405EDCFF002BDCFF00000000404B7BFF0032FDFF000000000000 - 00000000000000000000000000001E1E1EFF1E1E1EFF1E1E1EFF000000000000 - 000000000000405EDCFF002BDCFF0000000000000000003AFFFF000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000025B6FF223172FF00000000305159000032FD00163886000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000163886000032FD001E333A000C32A8FF0131F6FFC0C7E3FF0000 - 00001E1E1EFF1E1E1EFFC0C0C0FF000000000000000000000000000000000000 - 000000000000032FDBFF002EF0FFC0C3CCFF0C32A8FF0131F6FFC0C7E3FF0000 - 000000000000000000001E1E1EFF0000FFFF0000FFFF1E1E1EFF000000000000 - 000000000000032FDBFF002EF0FFC0C3CCFF1A2179FF0037FFFF313476FF0000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000002CFFFF0028FCFF0000000083DADC009DFFFE0083DADC000000 - 00000000000025375E005078C900679AFE00679AFE004B71BB00000000000000 - 00000000000092F3F3009DFFFE005F9DA00098F8F7FF6AB1B3FFB8D3D3FF0000 - 00001E1E1EFF62F6FFFF1E1E1EFF2E4065FFAFBFDEFFD0D7E8FF000000000000 - 000000000000A6FCFCFF88E3E3FFD7E9EAFF98F8F7FF6AB1B3FFB8D3D3FF0000 - 000000000000CCD2DDFF1E1E1EFF0000FFFF0000FFFF1E1E1EFF000000000000 - 000000000000A6FCFCFF88E3E3FFD7E9EAFF7DD0CEFF365860FF72BCB8FF438D - C6FF64C9FCFF95DFF9FFA7E2EDFFA7E0EAFFA7DFE8FFA5E0E8FF88D2F4FF61C7 - F4FF0000000096F6EAFFA5FFF8FF000000001126080098FDFC0030554500354F - 85006DA2FF00679AFE00679AFE0039558E004262A400679AFE00679AFE006DA2 - FF0000000000345951008FEEEB0011211100487E6AFF9BFEFDFFA8B9B8FFD2DB - EEFF1E1E1EFF4AE9F4FF5EEDFFFF1E1E1EFF5074B9FF679AFEFF6BA0FFFF3B59 - 95FF000000008FE6E7FF8AE5E4FFC4C9C6FF487E6AFF9BFEFDFFA8B9B8FFD2DB - EEFF689CFAFF679AFEFF6394F3FF2F4673FF334C7DFF679AFEFF6BA0FFFF3B59 - 95FF000000008FE6E7FF8AE5E4FFC4C9C6FF3D5D53FFA5FFFFFF5B9699FF617B - 9AFFF1B982FFF8CBA2FFF9E2C6FFBEC1B1FFC2C7BDFFD6CFC0FFFFDDC0FF8381 - 88FF00000000A8FFFFFF82D4D8FF000000000000000070E136001D2C49002EB8 - E700679AFE00679AFE002A3F6900679AFE00679AFE002F477700679AFE00679A - FE002EB8E7001E333A0070E1360000000000587251FF51A42AFF41639EFF5097 - E8FF1E1E1EFF45E8F2FF5EEAFFFF5FEEFFFF1E1E1EFF4F72B0FF679AFEFF6498 - FAFF4B93DFFF468F25FF61C330FF00000000587251FF51A42AFF41639EFF5097 - E8FF679AFEFF679AFEFF1E1E1EFF0000FFFF0000FFFF1E1E1EFF679AFEFF6498 - FAFF4B93DFFF468F25FF61C330FF00000000000000004A9526FF355159FF4E9B - E7FFECC195FFD0ECFDFFE0EDF2FF7EB1C8FF8EBDD2FF86BCD5FFAED1E2FF9A98 - B8FF4775CCFF4DA11BFF4C9820FF00000000000000004262A400679AFE0030C0 - F00030C0F0006494F800679AFE00679AFE00679AFE00679AFE005F91F0002EB8 - E70030C8F9006DA2FF004B71BB0000000000D2D2D4FF2F5B1EFF3FA2E2FF3F99 - D9FF42A0E3FF1E1E1EFF5EEAFFFF5EEAFFFF61F2FFFF1E1E1EFF4E72B8FF33B5 - E9FF33B9EDFF36577FFFA3AEB5FF00000000D2D2D4FF2F5B1EFF3FA2E2FF3F99 - D9FF42A0E3FF679AFEFF1E1E1EFF0000FFFF0000FFFF1E1E1EFF5F95F3FF33B5 - E9FF33B9EDFF36577FFFA3AEB5FF0000000000000000315F23FF449BEAFF4389 - CEFF93A8B1FFFFE8BFFFE0EAE9FF8CC6DAFF95CADDFFDDDDCFFFEED7BDFF30AF - E0FF2DBDE9FF375848FF0000000000000000679AFE00679AFE00679AFE00679A - FE005F91F000679AFE00679AFE00679AFE00679AFE00679AFE00679AFE005690 - E600679AFE00679AFE00679AFE005A88E2006090EEFF679AFEFF679AFEFF40A1 - E1FF5C93EFFF1E1E1EFF5FEDFFFF5EEAFFFF5EEAFFFF60F1FFFF1E1E1EFF2C8D - B1FF6498FAFF679AFEFF679AFEFFCBD0DAFF6090EEFF679AFEFF679AFEFF40A1 - E1FF5C93EFFF679AFEFF1E1E1EFF0000FFFF0000FFFF1E1E1EFF679AFEFF38B0 - EAFF6498FAFF679AFEFF679AFEFFCBD0DAFF4568ACFF699EFFFF669AFFFF4998 - E4FF5785DDFFC5B4B0FFFEE4C3FFFFE0B7FFFFE3BCFFF3D5BAFF7F9BE3FF2CB1 - DEFF6C96FFFF699EFFFF6FA6FFFF000000004262A400679AFE00679AFE00679A - FE005A88E2005078C9004262A400679AFE00679AFE005781D9004B71BB005781 - D900679AFE00679AFE00679AFE004669B0006597F9FF679AFEFF679AFEFF1E1E - 1EFF55EBFFFF55EAFFFF5EEAFFFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E - 1EFF5F8DE7FF679AFEFF679AFEFF526385FF6597F9FF679AFEFF679AFEFF679A - FEFF6394F6FF6090EFFF1E1E1EFF0000FFFF0000FFFF0000FFFF1E1E1EFF6395 - F7FF679AFEFF679AFEFF679AFEFF526385FF5680D6FF6698FFFF6699FFFF6699 - FFFF6A9FFFFF699DFFFF8C95B7FFFFEAC1FFFBDAB3FF689DFFFF6A9FFFFF6A9F - FFFF6699FFFF6699FFFF6DA4FFFF181F2AFF000000003D5C99005E8DE900679A - FE00679AFE00679AFE00679AFE00679AFE00679AFE00679AFE00679AFE00679A - FE00679AFE005A88E20025375E000000000004070BFF6190F0FF6698FCFF1E1E - 1EFF4FE9F5FF5EEAFFFF5EEAFFFF5FEEFFFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E - 1EFF1E1E1EFF6496F7FF263A5EFFD0D0D0FF04070BFF6190F0FF6698FCFF679A - FEFF6BA0FFFF679AFEFF679AFEFF2F4F90FF0000FFFF0000FFFF0000FFFF1E1E - 1EFF6699FDFF6496F7FF263A5EFFD0D0D0FF262626FF679AF0FF6FA6FFFF6BA1 - FFFF5F8FEFFF9997A5FFF7DCBFFF8EBCD9FF9EBFCFFFE2C4ACFF5E84D3FF6495 - F9FF6EA5FFFF699EFFFF141B29FF000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 000000000000000000000000000000000000404040FF000000FF000000FF0203 - 03FF034F5EFF5EEBFFFF5EEAFFFF5EEAFFFF23E2F8FF1F2228FF0F1626FF0206 - 0CFF000000FF000000FF000000FF00000000404040FF000000FF000000FF0203 - 03FF0000FFFF0000FFFF1E1E1EFF476BB2FF2A3F6AFF0000FFFF0000FFFF1E1E - 1EFF000000FF000000FF000000FF000000005A5A5AFF000000FF000000FF0000 - 00FF675B54FFFFDEB4FFE1F1F6FF8EC1D0FF9BCADAFFF3E1CCFFE7CBB3FF0000 - 00FF000000FF000000FF000000FF000000000000000000092E00000724000007 - 2400000724000007240000072400000724000007240000072400000724000007 - 2400000724000007240000092E000000000000000000000109FF000109FF0001 - 09FF1E1E1EFF5AEFFDFF5EEAFFFF5EEAFFFF5EEAFFFF149DADFF0D0D0EFF0001 - 09FF000109FF000109FF000105FF0000000000000000000109FF000109FF0001 - 09FF0000FFFF0000FFFF1E1E1EFF1E1E1EFF000109FF1E1E1EFF0000FFFF1E1E - 1EFF000109FF000109FF000105FF0000000000000000000207FF000104FF0001 - 04FFFBC78DFFFAECC8FFFAE8C0FFFEDEA9FFFCE3B8FFFAE6C3FFFFF8DAFF644A - 35FF000104FF000104FF525256FF0000000000000000000000004DBCB1004DBC - B1004DBCB1004DBCB1004DBCB1004DBCB1004DBCB1004DBCB1004DBCB1004DBC - B1004DBCB1004DBCB1000000000000000000000000001B3C7DFF144486FF1444 - 86FF1E1E1EFF0AA2B7FF5EEAFFFF5EEAFFFF5EEAFFFF5EEAFFFF10353AFF1E1E - 1EFF144486FF134081FFD0D2E0FF00000000000000001B3C7DFF144486FF1444 - 86FF0000FFFF0000FFFF0000FFFF1E1E1EFF1E1E1EFF0000FFFF0000FFFF1E1E - 1EFF1E1E1EFF134081FFD0D2E0FF0000000000000000424857FF317D92FF2C72 - A8FF3599D9FF4DB1EAFF5CBBF0FF5CBAEDFF5BB9ECFF5BB9EBFF429FDAFF2A87 - C5FF2D7288FF20566AFF00000000000000000000000000000000296355002757 - BC006DC1830027636C00325B7F0034662900113562003C6C960060B150001247 - A1005693AB0000000000000000000000000000000000000000005E8A57FF061C - 62FF355B54FF1D311FFF5DEEFFFF5EEAFFFF5EEAFFFF5EEAFFFF2AC4D5FF1D1F - 1CFF0B165DFFE9FAF5FF000000000000000000000000000000005E8A57FF061C - 62FF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF1E1E - 1EFF1E1E1EFFE9FAF5FF00000000000000000000000000000000346A29FF326A - B6FF61A7D4FF53A5D9FF51A5D9FF4FA5D9FF50A5D9FF50A4D9FF5BA5D7FF65A7 - D3FF01168FFF83BEBEFF000000000000000000000000000000001854B8006ABD - FE006ECE4F000B3AB70073C1D4005AB32B000333EE0089E9FF006BD335000026 - C10077C7CB004E9F2A00000000000000000000000000D0D7F5FF54AE4DFF1946 - E0FF88ECB6FF418E54FF54F0FFFF5EEAFFFF5EEAFFFF5EEAFFFF5EEAFFFF1768 - 74FF1E1E1EFF78D39AFF000000000000000000000000D0D7F5FF54AE4DFF1946 - E0FF5FA87CFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E - 1EFF1E1E1EFF78D39AFF00000000000000000000000000000000266A74FF3A79 - FFFF89EA7FFF1F5E6EFF3370FFFF89ED84FF2E7452FF1F54FFFF8EF0A4FF357F - 52FF1B4EFDFF83E1B0FF00000000000000000000000000000000000000000000 - 000075CD91003B855B000000000000000000000000000000000063B55900205C - 8E000000000000000000000000000000000000000000000000006BC061FF1E4A - CFFF77CBC0FF639D64FF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E - 1EFF555555FF1E1E1EFF000000000000000000000000000000006BC061FF1E4A - CFFF77CBC0FF639D64FF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E1EFF1E1E - 1EFF557FEFFF88E1B9FF000000000000000000000000000000004F8F44FF1B3D - C0FF7ABCB0FF519442FF1B3CBAFF71B6BAFF60A549FF1538ABFF6BA9C5FF63A7 - 47FF1338A6FF89C4C9FF0000000000000000424D3E000000000000003E000000 - 2800000040000000300000000100010000000000800100000000000000000000 - 000000000000000000000000FFFFFF0000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 0000000000000000000000000000000000000000000000000000000000000000 - 00000000000000000000000000000000BFFDB7FDBFFDBFFFBFFD33F93E39BFF9 - 1FF811F81C381FF9183810381838000900080008000800098001000100018001 - 8001000100018003000000000000000100000000000000000001000000000001 - 80010001000100018001800180018001C003800180018003C007C003C003C003 - C00380038003C003F3CFC003C003C00300000000000000000000000000000000 - 000000000000} - end -end diff --git a/main.pas b/main.pas deleted file mode 100755 index 447c157..0000000 --- a/main.pas +++ /dev/null @@ -1,2638 +0,0 @@ -(** ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil - -Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais - -O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. - -Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer -MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. - -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 -Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ---------------------------------------------------------------------------------------------------------------------------------------------------------------- -*) - -unit main; - -interface - -uses - Windows, - Messages, - Forms, - Menus, - Classes, - SysUtils, - Controls, - StdCtrls, - ExtCtrls, - ShellAPI, - registry, - dialogs, - PJVersionInfo, - ComCtrls, - IdBaseComponent, - IdComponent, - Buttons, - CACIC_Library, - ImgList, - Graphics, - USBdetectClass; - - //IdTCPServer; - //IdFTPServer; - -const - WM_MYMESSAGE = WM_USER+100; - -// Declaração das variáveis globais. -var - p_Shell_Command, - p_Shell_Path, - v_versao, - v_DataCacic2DAT, - v_Tamanho_Arquivo, - strConfigsPatrimonio : string; - -var - BatchFile : TStringList; - -var - v_tstrCipherOpened : TStrings; - -var - g_intTaskBarAtual, - g_intTaskBarAnterior : integer; - -var - boolDebugs, - boolWinIniChange : Boolean; - -var - g_oCacic: TCACIC; - -type - TFormularioGeral = class(TForm) - Pn_InfosGerais: TPanel; - Pn_SisMoni: TPanel; - Lb_SisMoni: TLabel; - Pn_TCPIP: TPanel; - Lb_TCPIP: TLabel; - GB_InfosTCPIP: TGroupBox; - ST_VL_MacAddress: TStaticText; - ST_LB_MacAddress: TStaticText; - ST_LB_NomeHost: TStaticText; - ST_VL_NomeHost: TStaticText; - ST_LB_IpEstacao: TStaticText; - ST_LB_IpRede: TStaticText; - ST_LB_DominioDNS: TStaticText; - ST_LB_DnsPrimario: TStaticText; - ST_LB_DnsSecundario: TStaticText; - ST_LB_Gateway: TStaticText; - ST_LB_Mascara: TStaticText; - ST_LB_ServidorDHCP: TStaticText; - ST_LB_WinsPrimario: TStaticText; - ST_LB_WinsSecundario: TStaticText; - ST_VL_IpEstacao: TStaticText; - ST_VL_DNSPrimario: TStaticText; - ST_VL_DNSSecundario: TStaticText; - ST_VL_Gateway: TStaticText; - ST_VL_Mascara: TStaticText; - ST_VL_ServidorDHCP: TStaticText; - ST_VL_WinsPrimario: TStaticText; - ST_VL_WinsSecundario: TStaticText; - ST_VL_DominioDNS: TStaticText; - ST_VL_IpRede: TStaticText; - Pn_Linha1_TCPIP: TPanel; - Pn_Linha2_TCPIP: TPanel; - Pn_Linha3_TCPIP: TPanel; - Pn_Linha4_TCPIP: TPanel; - Pn_Linha6_TCPIP: TPanel; - Pn_Linha5_TCPIP: TPanel; - Timer_Nu_Intervalo: TTimer; - Timer_Nu_Exec_Apos: TTimer; - Popup_Menu_Contexto: TPopupMenu; - Mnu_LogAtividades: TMenuItem; - Mnu_Configuracoes: TMenuItem; - Mnu_ExecutarAgora: TMenuItem; - Mnu_InfosTCP: TMenuItem; - Mnu_InfosPatrimoniais: TMenuItem; - Mnu_FinalizarCacic: TMenuItem; - listSistemasMonitorados: TListView; - pnColetasRealizadasNestaData: TPanel; - lbColetasRealizadasNestaData: TLabel; - listaColetas: TListView; - teDataColeta: TLabel; - pnInformacoesPatrimoniais: TPanel; - lbInformacoesPatrimoniais: TLabel; - gpInfosPatrimoniais: TGroupBox; - st_lb_Etiqueta5: TStaticText; - st_lb_Etiqueta1: TStaticText; - st_vl_Etiqueta1: TStaticText; - st_lb_Etiqueta1a: TStaticText; - st_lb_Etiqueta2: TStaticText; - st_lb_Etiqueta7: TStaticText; - st_lb_Etiqueta6: TStaticText; - st_lb_Etiqueta8: TStaticText; - st_vl_Etiqueta1a: TStaticText; - st_vl_Etiqueta2: TStaticText; - Panel6: TPanel; - Panel7: TPanel; - Panel8: TPanel; - Panel9: TPanel; - Panel11: TPanel; - st_lb_Etiqueta4: TStaticText; - st_lb_Etiqueta3: TStaticText; - st_vl_Etiqueta3: TStaticText; - st_lb_Etiqueta9: TStaticText; - st_vl_etiqueta4: TStaticText; - st_vl_etiqueta5: TStaticText; - st_vl_etiqueta6: TStaticText; - st_vl_etiqueta7: TStaticText; - st_vl_etiqueta8: TStaticText; - st_vl_etiqueta9: TStaticText; - Mnu_SuporteRemoto: TMenuItem; - lbSemInformacoesPatrimoniais: TLabel; - pnServidores: TPanel; - lbServidores: TLabel; - GroupBox1: TGroupBox; - staticVlServidorUpdates: TStaticText; - staticNmServidorUpdates: TStaticText; - staticNmServidorAplicacao: TStaticText; - staticVlServidorAplicacao: TStaticText; - Panel4: TPanel; - Panel1: TPanel; - Panel2: TPanel; - Panel3: TPanel; - pnVersao: TPanel; - bt_Fechar_Infos_Gerais: TBitBtn; - Timer_InicializaTray: TTimer; - imgList_Icones: TImageList; - procedure RemoveIconesMortos; - procedure ChecaCONFIGS; - procedure CriaFormSenha(Sender: TObject); - procedure FormCreate(Sender: TObject); - function ChecaGERCOLS : boolean; - procedure Sair(Sender: TObject); - procedure MinimizaParaTrayArea(Sender: TObject); - procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); - procedure ExecutaCacic(Sender: TObject); - procedure SetaVariaveisGlobais; - procedure Log_Diario(strMsg : String); - procedure Log_DEBUG(p_msg : string); - procedure ExibirLogAtividades(Sender: TObject); - procedure ExibirConfiguracoes(Sender: TObject); - procedure Mnu_InfosPatrimoniaisClick(Sender: TObject); - procedure HabilitaTCP; - procedure HabilitaPatrimonio; - procedure HabilitaSuporteRemoto; - procedure Matar(v_dir,v_files: string); - Procedure DelValorReg(Chave: String); - - function GetRootKey(strRootKey: String): HKEY; - function FindWindowByTitle(WindowTitle: string): Hwnd; - function GetValorChaveRegIni(p_SectionName, p_KeyName, p_IniFileName : String) : String; - Function RemoveZerosFimString(Texto : String) : String; - procedure Mnu_InfosTCPClick(Sender: TObject); - procedure Bt_Fechar_InfosGeraisClick(Sender: TObject); - function Get_File_Size(sFileToExamine: string; bInKBytes: Boolean): string; - function Posso_Rodar : boolean; -{ - procedure IdHTTPServerCACICCommandGet(AThread: TIdPeerThread; - ARequestInfo: TIdHTTPRequestInfo; - AResponseInfo: TIdHTTPResponseInfo); - - procedure IdFTPServer1UserLogin(ASender: TIdFTPServerThread; - const AUsername, APassword: String; var AAuthenticated: Boolean); -} - procedure Mnu_SuporteRemotoClick(Sender: TObject); - procedure Popup_Menu_ContextoPopup(Sender: TObject); - procedure Timer_InicializaTrayTimer(Sender: TObject); - private - FUsb : TUsbClass; - ShutdownEmExecucao : Boolean; - IsMenuOpen : Boolean; - NotifyStruc : TNotifyIconData; {Estrutura do tray icon} - procedure UsbIN(ASender : TObject; const ADevType,AVendorID,ADeviceID : string); - procedure UsbOUT(ASender : TObject; const ADevType,AVendorID,ADeviceID : string); - procedure InicializaTray; - procedure Finaliza; - procedure VerificaDebugs; - procedure MontaVetoresPatrimonio(p_strConfigs : String); - Function RetornaValorVetorUON1(id1 : string) : String; - Function RetornaValorVetorUON1a(id1a : string) : String; - Function RetornaValorVetorUON2(id2, idLocal: string) : String; - procedure Invoca_GerCols(p_acao:string; boolShowInfo : Boolean = true); - function GetVersionInfo(p_File: string):string; - function VerFmt(const MS, LS: DWORD): string; - procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND; - procedure TrayMessage(var Msg: TMessage); message WM_MYMESSAGE; {The tray procedure to look for mouse input} - // A procedure WMQueryEndSession é usada para detectar o - // Shutdown do Windows e "derrubar" o Cacic. - procedure WMQueryEndSession(var Msg : TWMQueryEndSession); Message WM_QUERYENDSESSION; - procedure WMMENUSELECT(var msg: TWMMENUSELECT); message WM_MENUSELECT; - protected - procedure WndProc(var Message: TMessage); override; - public - Function Implode(p_Array : TStrings ; p_Separador : String) : String; - function GetFolderDate(Folder: string): TDateTime; - Function CipherClose : String; - Procedure CipherCloseGenerico(p_TstrCipherOpened : TStrings; p_StrFileName : String); - Function CipherOpen : TStrings; - Procedure CipherOpenGenerico(var p_TstrCipherOpened : TStrings; p_StrFileName : String); - Function Explode(Texto, Separador : String) : TStrings; - Function GetValorDatMemoria(p_Chave : String; p_tstrCipherOpened : TStrings) : String; - Procedure SetValorDatMemoria(p_Chave : string; p_Valor : String; p_tstrCipherOpened : TStrings); - function URLDecode(const S: string): string; - Function XML_RetornaValor(Tag : String; Fonte : String): String; - Procedure EqualizaInformacoesPatrimoniais; - Function SetValorChaveRegEdit(Chave: String; Dado: Variant): Variant; - end; - -var FormularioGeral : TFormularioGeral; - boolServerON : Boolean; - -implementation - - -{$R *.dfm} - -Uses StrUtils, - Inifiles, - frmConfiguracoes, - frmSenha, - frmLog, - Math, - LibXmlParser, - WinVNC; - -// Estruturas de dados para armazenar os itens da uon1, uon1a e uon2 -type - TRegistroUON1 = record - id1 : String; - nm1 : String; - end; - TVetorUON1 = array of TRegistroUON1; - - TRegistroUON1a = record - id1 : String; - id1a : String; - nm1a : String; - id_local: String; - end; - - TVetorUON1a = array of TRegistroUON1a; - - TRegistroUON2 = record - id1a : String; - id2 : String; - nm2 : String; - id_local: String; - end; - TVetorUON2 = array of TRegistroUON2; - -var VetorUON1 : TVetorUON1; - VetorUON1a : TVetorUON1a; - VetorUON2 : TVetorUON2; - -Function TFormularioGeral.RetornaValorVetorUON1(id1 : string) : String; -var I : Integer; -begin - For I := 0 to (Length(VetorUON1)-1) Do - If (VetorUON1[I].id1 = id1) Then Result := VetorUON1[I].nm1; -end; - -Function TFormularioGeral.RetornaValorVetorUON1a(id1a : string) : String; -var I : Integer; -begin - For I := 0 to (Length(VetorUON1a)-1) Do - If (VetorUON1a[I].id1a = id1a) Then Result := VetorUON1a[I].nm1a; -end; - -Function TFormularioGeral.RetornaValorVetorUON2(id2, idLocal: string) : String; -var I : Integer; -begin - For I := 0 to (Length(VetorUON2)-1) Do - If (VetorUON2[I].id2 = id2) and - (VetorUON2[I].id_local = idLocal) Then Result := VetorUON2[I].nm2; -end; - -procedure TFormularioGeral.WndProc(var Message: TMessage); -begin - case Message.Msg of - WM_WININICHANGE : - Begin - // Esta mensagem é recebida quando efetuado LogOff/LogOn em máquinas com VISTA, - boolWinIniChange := true; - End; - end; - inherited; -end; - -// Início de Procedimentos para monitoramento de dispositivos USB - Anderson Peterle - 02/2010 -procedure TFormularioGeral.UsbIN(ASender : TObject; const ADevType,AVendorID,ADeviceID : string); -begin - // Envio de valores ao Gerente WEB - // Formato: USBinfo=I_ddmmyyyyhhnnss_ADeviceID - // Os valores serão armazenados localmente (cacic2.dat) se for impossível o envio. - Log_Debug('<< USB INSERIDO .:. Vendor ID => ' + AVendorID + ' .:. Device ID = ' + ADeviceID); - Invoca_GerCols('USBinfo=I_'+FormatDateTime('yyyymmddhhnnss', now) + '_' + AVendorID + '_' + ADeviceID,false); -end; - - -procedure TFormularioGeral.UsbOUT(ASender : TObject; const ADevType,AVendorID,ADeviceID : string); -begin - // Envio de valores ao Gerente WEB - // Formato: USBinfo=O_ddmmyyyyhhnnss_ADeviceID - // Os valores serão armazenados localmente (cacic2.dat) se for impossível o envio. - Log_Debug('>> USB REMOVIDO .:. Vendor ID => ' + AVendorID + ' .:. Device ID = ' + ADeviceID); - Invoca_GerCols('USBinfo=O_'+FormatDateTime('yyyymmddhhnnss', now) + '_' + AVendorID + '_' + ADeviceID,false); -end; - -// Fim de Procedimentos para monitoramento de dispositivos USB - Anderson Peterle - 02/2010 - -procedure TFormularioGeral.MontaVetoresPatrimonio(p_strConfigs : String); -var Parser : TXmlParser; - i : integer; - strAux, - strAux1, - strTagName, - strItemName : string; -begin - - Parser := TXmlParser.Create; - Parser.Normalize := True; - Parser.LoadFromBuffer(PAnsiChar(p_strConfigs)); - log_DEBUG('MontaVetores.p_strConfigs: '+p_strConfigs); - - // Código para montar o vetor UON1 - Parser.StartScan; - i := -1; - strItemName := ''; - strTagName := ''; - While Parser.Scan DO - Begin - strItemName := UpperCase(Parser.CurName); - if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1') Then - Begin - i := i + 1; - SetLength(VetorUON1, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. - strTagName := 'IT1'; - end - else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1') then - strTagName := '' - else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT1')Then - Begin - strAux1 := g_oCacic.deCrypt(Parser.CurContent); - if (strItemName = 'ID1') then - Begin - VetorUON1[i].id1 := strAux1; - log_DEBUG('Gravei VetorUON1.id1: "'+strAux1+'"'); - End - else if (strItemName = 'NM1') then - Begin - VetorUON1[i].nm1 := strAux1; - log_DEBUG('Gravei VetorUON1.nm1: "'+strAux1+'"'); - End; - End; - End; - - // Código para montar o vetor UON1a - Parser.StartScan; - strTagName := ''; - strAux1 := ''; - i := -1; - While Parser.Scan DO - Begin - strItemName := UpperCase(Parser.CurName); - if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1A') Then - Begin - i := i + 1; - SetLength(VetorUON1a, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. - strTagName := 'IT1A'; - end - else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1A') then - strTagName := '' - else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT1A')Then - Begin - strAux1 := g_oCacic.deCrypt(Parser.CurContent); - if (strItemName = 'ID1') then - Begin - VetorUON1a[i].id1 := strAux1; - log_DEBUG('Gravei VetorUON1a.id1: "'+strAux1+'"'); - End - else if (strItemName = 'SG_LOC') then - Begin - strAux := ' ('+strAux1 + ')'; - End - else if (strItemName = 'ID1A') then - Begin - VetorUON1a[i].id1a := strAux1; - log_DEBUG('Gravei VetorUON1a.id1a: "'+strAux1+'"'); - End - else if (strItemName = 'NM1A') then - Begin - VetorUON1a[i].nm1a := strAux1+strAux; - log_DEBUG('Gravei VetorUON1a.nm1a: "'+strAux1+strAux+'"'); - End - else if (strItemName = 'ID_LOCAL') then - Begin - VetorUON1a[i].id_local := strAux1; - log_DEBUG('Gravei VetorUON1a.id_local: "'+strAux1+'"'); - End; - - End; - end; - - // Código para montar o vetor UON2 - Parser.StartScan; - strTagName := ''; - i := -1; - While Parser.Scan DO - Begin - strItemName := UpperCase(Parser.CurName); - if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT2') Then - Begin - i := i + 1; - SetLength(VetorUON2, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. - strTagName := 'IT2'; - end - else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT2') then - strTagName := '' - else if (Parser.CurPartType in [ptContent, ptCData]) and (strTagName='IT2')Then - Begin - strAux1 := g_oCacic.deCrypt(Parser.CurContent); - if (strItemName = 'ID1A') then - Begin - VetorUON2[i].id1a := strAux1; - log_DEBUG('Gravei VetorUON2.id1a: "'+strAux1+'"'); - End - else if (strItemName = 'ID2') then - Begin - VetorUON2[i].id2 := strAux1; - log_DEBUG('Gravei VetorUON2.id2: "'+strAux1+'"'); - End - else if (strItemName = 'NM2') then - Begin - VetorUON2[i].nm2 := strAux1; - log_DEBUG('Gravei VetorUON2.nm2: "'+strAux1+'"'); - End - else if (strItemName = 'ID_LOCAL') then - Begin - VetorUON2[i].id_local := strAux1; - log_DEBUG('Gravei VetorUON2.id_local: "'+strAux1+'"'); - End; - - End; - end; - Parser.Free; -end; - - -function Pode_Coletar : boolean; -var v_JANELAS_EXCECAO, - v_plural1, - v_plural2 : string; - tstrJANELAS : TStrings; - h : hwnd; - v_contador, intContaJANELAS, intAux : integer; -Begin - // Se eu conseguir matar os arquivos abaixo é porque srCACICsrv, Ger_Cols, Ini_Cols e mapaCACIC já finalizaram suas atividades... - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_SRCACIC.txt'); - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_GER.txt'); - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_INI.txt'); - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_MAPACACIC.txt'); - intContaJANELAS := 0; - h := 0; - - if (not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_GER.txt') and - not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_SRCACIC.txt') and - not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_INI.txt') and - not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_MAPACACIC.txt')) then - Begin - FormularioGeral.CipherOpen; - // Verificação das janelas abertas para que não aconteça coletas caso haja aplicações pesadas rodando (configurado no Módulo Gerente) - v_JANELAS_EXCECAO := FormularioGeral.getValorDatMemoria('Configs.TE_JANELAS_EXCECAO',v_tstrCipherOpened); - - FormularioGeral.log_DEBUG('Verificando Janelas para Exceção...'); - tstrJANELAS := TStrings.Create; - if (v_JANELAS_EXCECAO <> '') then - Begin - tstrJANELAS := FormularioGeral.explode(trim(v_JANELAS_EXCECAO),','); - if (tstrJANELAS.Count > 0) then - for intAux := 0 to tstrJANELAS.Count-1 Do - Begin - - h := FormularioGeral.FindWindowByTitle(tstrJANELAS[intAux]); - if h <> 0 then intContaJANELAS := 1; - break; - End; - End; - - // Caso alguma janela tenha algum nome de aplicação cadastrada como "crítica" ou "pesada"... - if (intContaJANELAS > 0) then - Begin - FormularioGeral.log_diario('EXECUÇÃO DE ATIVIDADES ADIADA!'); - v_contador := 0; - v_plural1 := ''; - v_plural2 := 'ÃO'; - for intAux := 0 to tstrJANELAS.Count-1 Do - Begin - h := FormularioGeral.FindWindowByTitle(tstrJANELAS[intAux]); - if h <> 0 then - Begin - v_contador := v_contador + 1; - FormularioGeral.log_diario('-> Aplicação/Janela ' + inttostr(v_contador) + ': ' + tstrJANELAS[intAux]); - End; - End; - if (v_contador > 1) then - Begin - v_plural1 := 'S'; - v_plural2 := 'ÕES'; - End; - FormularioGeral.log_diario('-> PARA PROCEDER, FINALIZE A' + v_plural1 + ' APLICAÇ' + v_plural2 + ' LISTADA' + v_plural1 + ' ACIMA.'); - - // Número de minutos para iniciar a execução (60.000 milisegundos correspondem a 1 minuto). Acrescento 1, pois se for zero ele não executa. - FormularioGeral.Timer_Nu_Exec_Apos.Enabled := False; - FormularioGeral.Timer_Nu_Exec_Apos.Interval := strtoint(FormularioGeral.getValorDatMemoria('Configs.NU_EXEC_APOS',v_tstrCipherOpened)) * 60000; - FormularioGeral.Timer_Nu_Exec_Apos.Enabled := True; - End; - End; - - if (intContaJANELAS = 0) and - (h = 0) and - (not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_GER.txt')) and - (not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_SRCACIC.txt')) and - (not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_MAPACACIC.txt')) and - (not FileExists(g_oCacic.getCacicPath + 'temp\aguarde_INI.txt')) then - Result := true - else - Begin - FormularioGeral.log_DEBUG('Ação NEGADA!'); - if (intContaJANELAS=0) then - Begin - if (FileExists(g_oCacic.getCacicPath + 'temp\aguarde_SRCACIC.txt')) then - FormularioGeral.log_DEBUG('Suporte Remoto em atividade.'); - - if (FileExists(g_oCacic.getCacicPath + 'temp\aguarde_GER.txt')) then - FormularioGeral.log_DEBUG('Gerente de Coletas em atividade.'); - - if (FileExists(g_oCacic.getCacicPath + 'temp\aguarde_INI.txt')) then - FormularioGeral.log_DEBUG('Inicializador de Coletas em atividade.'); - - if (FileExists(g_oCacic.getCacicPath + 'temp\aguarde_MAPACACIC.txt')) then - FormularioGeral.log_DEBUG('Módulo Avulso para Coleta de Patrimônio em atividade.'); - End - else - FormularioGeral.CipherClose; - Result := false; - End; - -End; - -function TFormularioGeral.GetFolderDate(Folder: string): TDateTime; -var - Rec: TSearchRec; - Found: Integer; - Date: TDateTime; -begin - - if (Folder[Length(folder)] = '\') then - Folder := Copy(Folder,0,Length(Folder)-1); - - Result := 0; - Found := FindFirst(Folder, faDirectory, Rec); - try - if Found = 0 then - begin - Date := FileDateToDateTime(Rec.Time); - Result := Date; - end; - finally - FindClose(Rec); - end; -end; - -Function TFormularioGeral.Implode(p_Array : TStrings ; p_Separador : String) : String; -var intAux : integer; - strAux : string; -Begin - strAux := ''; - For intAux := 0 To p_Array.Count -1 do - Begin - if (strAux<>'') then strAux := strAux + p_Separador; - strAux := strAux + p_Array[intAux]; - End; - Implode := strAux; -end; - -Function TFormularioGeral.CipherClose : String; -var v_DatFile : TextFile; - intAux : integer; - v_strCipherOpenImploded , - v_strCipherClosed : string; -begin - - log_DEBUG('Fechando '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - if boolDebugs then - for intAux := 0 to (v_tstrCipherOpened.Count-1) do - log_DEBUG('Posição ['+inttostr(intAux)+']='+v_tstrCipherOpened[intAux]); - - try - FileSetAttr (g_oCacic.getCacicPath + g_oCacic.getDatFileName,0); // Retira os atributos do arquivo para evitar o erro FILE ACCESS DENIED em máquinas 2000 - - log_DEBUG('Localizando arquivo: '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - AssignFile(v_DatFile,g_oCacic.getCacicPath + g_oCacic.getDatFileName); {Associa o arquivo a uma variável do tipo TextFile} - {$IOChecks off} - log_DEBUG('Abrindo arquivo: '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - ReWrite(v_DatFile); {Abre o arquivo texto} - {$IOChecks on} - log_DEBUG('Append(2) no arquivo: '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - Append(v_DatFile); - log_DEBUG('Criando vetor para criptografia.'); - v_strCipherOpenImploded := Implode(v_tstrCipherOpened,g_oCacic.getSeparatorKey); - - log_DEBUG('Salvando a string "'+v_strCipherOpenImploded+'" em '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - v_strCipherClosed := g_oCacic.enCrypt(v_strCipherOpenImploded); - Writeln(v_DatFile,v_strCipherClosed); {Grava a string Texto no arquivo texto} - CloseFile(v_DatFile); - except - log_diario('ERRO NA GRAVAÇÃO DO ARQUIVO DE CONFIGURAÇÕES.('+ g_oCacic.getCacicPath + g_oCacic.getDatFileName+')'); - end; - log_DEBUG(g_oCacic.getCacicPath + g_oCacic.getDatFileName+' fechado com sucesso!'); -end; - -Procedure TFormularioGeral.CipherCloseGenerico(p_TstrCipherOpened : TStrings; p_StrFileName : String); -var v_DatFile : TextFile; - intAux : integer; - v_strCipherOpenImploded , - v_strCipherClosed : string; -begin - - log_DEBUG('Fechando '+p_StrFileName); - if boolDebugs then - for intAux := 0 to (p_TstrCipherOpened.Count-1) do - log_DEBUG('Posição ['+inttostr(intAux)+']='+p_TstrCipherOpened[intAux]); - - try - FileSetAttr (p_StrFileName,0); // Retira os atributos do arquivo para evitar o erro FILE ACCESS DENIED em máquinas 2000 - - log_DEBUG('Localizando arquivo: '+p_StrFileName); - AssignFile(v_DatFile,p_StrFileName); {Associa o arquivo a uma variável do tipo TextFile} - {$IOChecks off} - log_DEBUG('Abrindo arquivo: '+p_StrFileName); - ReWrite(v_DatFile); {Abre o arquivo texto} - {$IOChecks on} - log_DEBUG('Append(2) no arquivo: '+p_StrFileName); - Append(v_DatFile); - log_DEBUG('Criando vetor para criptografia.'); - v_strCipherOpenImploded := Implode(p_TstrCipherOpened,g_oCacic.getSeparatorKey); - - log_DEBUG('Salvando a string "'+v_strCipherOpenImploded+'" em '+p_StrFileName); - v_strCipherClosed := g_oCacic.enCrypt(v_strCipherOpenImploded); - Writeln(v_DatFile,v_strCipherClosed); {Grava a string Texto no arquivo texto} - CloseFile(v_DatFile); - except - log_diario('ERRO NA GRAVAÇÃO DO ARQUIVO DE CONFIGURAÇÕES.('+ p_StrFileName+')'); - end; - log_DEBUG(p_StrFileName+' fechado com sucesso!'); -end; - -function TFormularioGeral.Get_File_Size(sFileToExamine: string; bInKBytes: Boolean): string; -var - SearchRec: TSearchRec; - sgPath: string; - inRetval, I1: Integer; -begin - sgPath := ExpandFileName(sFileToExamine); - try - inRetval := FindFirst(ExpandFileName(sFileToExamine), faAnyFile, SearchRec); - if inRetval = 0 then - I1 := SearchRec.Size - else - I1 := -1; - finally - SysUtils.FindClose(SearchRec); - end; - Result := trim(IntToStr(I1)); -end; - -Function TFormularioGeral.CipherOpen : TStrings; -var v_DatFile : TextFile; - v_strCipherOpened, - v_strCipherClosed : string; -begin - - if (v_DataCacic2DAT = '') or (v_DataCacic2DAT <> FormatDateTime('ddmmyyyyhhnnsszzz', GetFolderDate(g_oCacic.getCacicPath + g_oCacic.getDatFileName))) then - Begin - v_DataCacic2DAT := FormatDateTime('ddmmyyyyhhnnsszzz', GetFolderDate(g_oCacic.getCacicPath + g_oCacic.getDatFileName)); - log_DEBUG('Abrindo '+g_oCacic.getCacicPath + g_oCacic.getDatFileName +' - DateTime '+g_oCacic.getCacicPath + g_oCacic.getDatFileName+' => '+v_DataCacic2DAT); - v_strCipherOpened := ''; - - v_Tamanho_Arquivo := Get_File_Size(g_oCacic.getCacicPath + g_oCacic.getDatFileName,true); - - if (v_Tamanho_Arquivo = '0') or - (v_Tamanho_Arquivo = '-1') then FormularioGeral.Matar(g_oCacic.getCacicPath,g_oCacic.getDatFileName); - - if FileExists(g_oCacic.getCacicPath + g_oCacic.getDatFileName) then - begin - log_DEBUG(g_oCacic.getCacicPath + g_oCacic.getDatFileName+' já existe!'); - AssignFile(v_DatFile,g_oCacic.getCacicPath + g_oCacic.getDatFileName); - log_DEBUG('Abrindo '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - - {$IOChecks off} - Reset(v_DatFile); - {$IOChecks on} - - log_DEBUG('Verificação de Existência.'); - if (IOResult <> 0)then // Arquivo não existe, será recriado. - begin - log_DEBUG('Recriando "'+g_oCacic.getCacicPath + g_oCacic.getDatFileName+'"'); - Rewrite (v_DatFile); - log_DEBUG('Inserindo Primeira Linha.'); - Append(v_DatFile); - end; - - log_DEBUG('Lendo '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - - Readln(v_DatFile,v_strCipherClosed); - - log_DEBUG('Povoando Variável'); - while not EOF(v_DatFile) do Readln(v_DatFile,v_strCipherClosed); - log_DEBUG('Fechando '+g_oCacic.getCacicPath + g_oCacic.getDatFileName); - CloseFile(v_DatFile); - log_DEBUG('Chamando Criptografia de conteúdo'); - v_strCipherOpened:= g_oCacic.deCrypt(v_strCipherClosed); - end; - if (trim(v_strCipherOpened)<>'') then - v_tstrCipherOpened := explode(v_strCipherOpened,g_oCacic.getSeparatorKey) - else - Begin - v_tstrCipherOpened := explode('Configs.ID_SO'+g_oCacic.getSeparatorKey+ g_oCacic.getWindowsStrId() +g_oCacic.getSeparatorKey+ - 'Configs.Endereco_WS'+g_oCacic.getSeparatorKey+'/cacic2/ws/',g_oCacic.getSeparatorKey); - log_DEBUG(g_oCacic.getCacicPath + g_oCacic.getDatFileName+' Inexistente. Criado o DAT em memória.'); - End; - - Result := v_tstrCipherOpened; - - if Result.Count mod 2 = 0 then - Result.Add(''); - - End - else log_DEBUG(g_oCacic.getCacicPath + g_oCacic.getDatFileName + ' ainda não alterado! Não foi necessário reabrí-lo.'); -end; - -Procedure TFormularioGeral.CipherOpenGenerico(var p_TstrCipherOpened : TStrings; p_StrFileName : String); -var v_DatFile : TextFile; - strClosedAUX, - strOpenedAUX : String; -begin - if FileExists(p_StrFileName) then - begin - log_DEBUG(p_StrFileName+' já existe!'); - AssignFile(v_DatFile,p_StrFileName); - log_DEBUG('Abrindo '+p_StrFileName); - - {$IOChecks off} - Reset(v_DatFile); - {$IOChecks on} - - log_DEBUG('Verificação de Existência.'); - if (IOResult <> 0)then // Arquivo não existe, será recriado. - begin - log_DEBUG('Recriando "'+p_StrFileName+'"'); - Rewrite (v_DatFile); - log_DEBUG('Inserindo Primeira Linha.'); - Append(v_DatFile); - end; - - log_DEBUG('Lendo '+p_StrFileName); - - Readln(v_DatFile,strClosedAUX); - - log_DEBUG('Povoando Variável'); - while not EOF(v_DatFile) do Readln(v_DatFile,strClosedAUX); - log_DEBUG('Fechando '+p_StrFileName); - CloseFile(v_DatFile); - log_DEBUG('Chamando Criptografia de conteúdo'); - strOpenedAUX := g_oCacic.deCrypt(strClosedAUX); - end; - if (trim(strOpenedAUX)<>'') then - p_TstrCipherOpened := explode(strOpenedAUX,g_oCacic.getSeparatorKey) - else - Begin - p_TstrCipherOpened := explode('Configs.ID_SO'+g_oCacic.getSeparatorKey+ g_oCacic.getWindowsStrId() +g_oCacic.getSeparatorKey+ - 'Configs.Endereco_WS'+g_oCacic.getSeparatorKey+'/cacic2/ws/',g_oCacic.getSeparatorKey+'Patrimonio.dt_ultima_renovacao'+g_oCacic.getSeparatorKey+ '0'); - log_DEBUG(p_StrFileName+' Inexistente. Criado o DAT em memória.'); - End; - - if p_TstrCipherOpened.Count mod 2 = 0 then - p_TstrCipherOpened.Add(''); -end; - -Procedure TFormularioGeral.SetValorDatMemoria(p_Chave : string; p_Valor : String; p_tstrCipherOpened : TStrings); -var v_Aux : string; -begin - v_Aux := RemoveZerosFimString(p_Valor); - log_DEBUG('Gravando Chave: "'+p_Chave+'" em MemoryDAT => "'+v_Aux+'"'); - - if (p_tstrCipherOpened.IndexOf(p_Chave)<>-1) then - p_tstrCipherOpened[p_tstrCipherOpened.IndexOf(p_Chave)+1] := v_Aux - else - Begin - p_tstrCipherOpened.Add(p_Chave); - p_tstrCipherOpened.Add(v_Aux); - End; -end; - -Function TFormularioGeral.GetValorDatMemoria(p_Chave : String; p_tstrCipherOpened : TStrings) : String; -begin - if (p_tstrCipherOpened.IndexOf(p_Chave)<>-1) then - Result := trim(p_tstrCipherOpened[p_tstrCipherOpened.IndexOf(p_Chave)+1]) - else - Result := ''; - log_DEBUG('Resgatando Chave: "'+p_Chave+'" de MemoryDAT => "'+Result+'"'); -end; - -function TFormularioGeral.SetValorChaveRegEdit(Chave: String; Dado: Variant): Variant; -var RegEditSet: TRegistry; - RegDataType: TRegDataType; - strRootKey, strKey, strValue : String; - ListaAuxSet : TStrings; - I : Integer; -begin - ListaAuxSet := g_oCacic.explode(Chave, '\'); - strRootKey := ListaAuxSet[0]; - For I := 1 To ListaAuxSet.Count - 2 Do - strKey := strKey + ListaAuxSet[I] + '\'; - strValue := ListaAuxSet[ListaAuxSet.Count - 1]; - - RegEditSet := TRegistry.Create; - try - log_DEBUG('Em TFormularioGeral.SetValorChaveRegEdit: Abrindo Registry para Escrita => Root: "'+strRootKey+ '" Key: "'+strKey+'"'); - RegEditSet.Access := KEY_WRITE; - RegEditSet.Rootkey := GetRootKey(strRootKey); - - if RegEditSet.OpenKey(strKey, True) then - Begin - RegDataType := RegEditSet.GetDataType(strValue); - - // Sempre será String - RegDataType := rdString; - - if RegDataType = rdString then - begin - RegEditSet.WriteString(strValue, Dado); - end - else if RegDataType = rdExpandString then - begin - RegEditSet.WriteExpandString(strValue, Dado); - end - else if RegDataType = rdInteger then - begin - RegEditSet.WriteInteger(strValue, Dado); - end - else - begin - RegEditSet.WriteString(strValue, Dado); - end; - - end; - finally - RegEditSet.CloseKey; - end; - ListaAuxSet.Free; - RegEditSet.Free; -end; - -function TFormularioGeral.VerFmt(const MS, LS: DWORD): string; - // Format the version number from the given DWORDs containing the info -begin - Result := Format('%d.%d.%d.%d', - [HiWord(MS), LoWord(MS), HiWord(LS), LoWord(LS)]) -end; - -function TFormularioGeral.GetVersionInfo(p_File: string):string; -var PJVersionInfo1: TPJVersionInfo; -begin - PJVersionInfo1 := TPJVersionInfo.Create(nil); - PJVersionInfo1.FileName := PChar(p_File); - Result := VerFmt(PJVersionInfo1.FixedFileInfo.dwFileVersionMS, PJVersionInfo1.FixedFileInfo.dwFileVersionLS); - PJVersionInfo1.Free; -end; - -Procedure TFormularioGeral.RemoveIconesMortos; -var - TrayWindow : HWnd; - WindowRect : TRect; - SmallIconWidth : Integer; - SmallIconHeight : Integer; - CursorPos : TPoint; - Row : Integer; - Col : Integer; -begin - { Get tray window handle and bounding rectangle } - TrayWindow := FindWindowEx(FindWindow('Shell_TrayWnd',NIL),0,'TrayNotifyWnd',NIL); - if not GetWindowRect(TrayWindow,WindowRect) then - Exit; - { Get small icon metrics } - SmallIconWidth := GetSystemMetrics(SM_CXSMICON); - SmallIconHeight := GetSystemMetrics(SM_CYSMICON); - { Save current mouse position } - GetCursorPos(CursorPos); - { Sweep the mouse cursor over each icon in the tray in both dimensions } - with WindowRect do - begin - for Row := 0 to (Bottom - Top) DIV SmallIconHeight do - begin - for Col := 0 to (Right - Left) DIV SmallIconWidth do - begin - SetCursorPos(Left + Col * SmallIconWidth, Top + Row * SmallIconHeight); - Sleep(0); - end; - end; - end; - { Restore mouse position } - SetCursorPos(CursorPos.X,CursorPos.Y); - { Redraw tray window (to fix bug in multi-line tray area) } - RedrawWindow(TrayWindow,NIL,0,RDW_INVALIDATE OR RDW_ERASE OR RDW_UPDATENOW); -End; - -Procedure TFormularioGeral.DelValorReg(Chave: String); -var RegDelValorReg: TRegistry; - strRootKey, strKey, strValue : String; - ListaAuxDel : TStrings; - I : Integer; -begin - ListaAuxDel := FormularioGeral.Explode(Chave, '\'); - strRootKey := ListaAuxDel[0]; - For I := 1 To ListaAuxDel.Count - 2 Do strKey := strKey + ListaAuxDel[I] + '\'; - strValue := ListaAuxDel[ListaAuxDel.Count - 1]; - RegDelValorReg := TRegistry.Create; - - try - RegDelValorReg.Access := KEY_WRITE; - RegDelValorReg.Rootkey := FormularioGeral.GetRootKey(strRootKey); - - if RegDelValorReg.OpenKey(strKey, True) then - RegDelValorReg.DeleteValue(strValue); - finally - RegDelValorReg.CloseKey; - end; - RegDelValorReg.Free; - ListaAuxDel.Free; -end; - -function TFormularioGeral.GetRootKey(strRootKey: String): HKEY; -begin - /// Encontrar uma maneira mais elegante de fazer esses testes. - if Trim(strRootKey) = 'HKEY_LOCAL_MACHINE' Then Result := HKEY_LOCAL_MACHINE - else if Trim(strRootKey) = 'HKEY_CLASSES_ROOT' Then Result := HKEY_CLASSES_ROOT - else if Trim(strRootKey) = 'HKEY_CURRENT_USER' Then Result := HKEY_CURRENT_USER - else if Trim(strRootKey) = 'HKEY_USERS' Then Result := HKEY_USERS - else if Trim(strRootKey) = 'HKEY_CURRENT_CONFIG' Then Result := HKEY_CURRENT_CONFIG - else if Trim(strRootKey) = 'HKEY_DYN_DATA' Then Result := HKEY_DYN_DATA; -end; - - -procedure TFormularioGeral.WMMENUSELECT(var msg: TWMMENUSELECT); -begin - inherited; - IsMenuOpen := not ((msg.MenuFlag and $FFFF > 0) and - (msg.Menu = 0)); -end; - -// Verifico a existência do Gerente de Coletas, caso não exista, o chksis.exe fará download! -function TFormularioGeral.ChecaGERCOLS : boolean; -Begin - Result := true; - - log_DEBUG('Verificando existência e tamanho do Gerente de Coletas...'); - v_Tamanho_Arquivo := Get_File_Size(g_oCacic.getCacicPath + 'modulos\ger_cols.exe',true); - - log_DEBUG('Resultado: #'+v_Tamanho_Arquivo); - - if (v_Tamanho_Arquivo = '0') or (v_Tamanho_Arquivo = '-1') then - Begin - Result := false; - - Matar(g_oCacic.getCacicPath + 'modulos\','ger_cols.exe'); - - InicializaTray; - - log_diario('Acionando recuperador de Módulo Gerente de Coletas.'); - log_DEBUG('Recuperador de Módulo Gerente de Coletas: '+g_oCacic.getWinDir + 'chksis.exe'); - g_oCacic.createSampleProcess(g_oCacic.getWinDir + 'chksis.exe',false,SW_HIDE); - - sleep(30000); // 30 segundos de espera para download do ger_cols.exe - v_Tamanho_Arquivo := Get_File_Size(g_oCacic.getCacicPath + 'modulos\ger_cols.exe',true); - if not(v_Tamanho_Arquivo = '0') and not(v_Tamanho_Arquivo = '-1') then - Begin - log_diario('Módulo Gerente de Coletas RECUPERADO COM SUCESSO!'); - InicializaTray; - Result := True; - End - else - log_diario('Módulo Gerente de Coletas NÃO RECUPERADO!'); - End; -End; - -procedure ExibirConfiguracoes(Sender: TObject); -begin - // SJI = Senha Já Informada... - // Esse valor é inicializado com "N" - if (FormularioGeral.getValorDatMemoria('Configs.SJI',v_tstrCipherOpened)='') and - (FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor',v_tstrCipherOpened)<>'') then - begin - FormularioGeral.CriaFormSenha(nil); - formSenha.ShowModal; - end; - - if (FormularioGeral.getValorDatMemoria('Configs.SJI',v_tstrCipherOpened)<>'') or - (FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor',v_tstrCipherOpened)='') then - begin - Application.CreateForm(TFormConfiguracoes, FormConfiguracoes); - FormConfiguracoes.ShowModal; - end; -end; - -procedure TFormularioGeral.CriaFormSenha(Sender: TObject); -begin - // Caso ainda não exista senha para administração do CACIC, define ADMINCACIC como inicial. - if (getValorDatMemoria('Configs.TE_SENHA_ADM_AGENTE',v_tstrCipherOpened)='') Then - Begin - SetValorDatMemoria('Configs.TE_SENHA_ADM_AGENTE', 'ADMINCACIC',v_tstrCipherOpened); - End; - - Application.CreateForm(TFormSenha, FormSenha); -end; - -procedure TFormularioGeral.ChecaCONFIGS; -var strAux : string; -Begin - - // Verifico se o endereço do servidor do cacic foi configurado. - if (GetValorDatMemoria('Configs.EnderecoServidor',v_tstrCipherOpened)='') then - Begin - strAux := getValorChaveRegIni('Cacic2','ip_serv_cacic',g_oCacic.getWinDir + 'chksis.ini'); - - if (strAux='') then - begin - strAux := 'ATENÇÃO: Endereço do servidor do CACIC ainda não foi configurado.'; - log_diario(strAux); - log_diario('Ativando módulo de configuração de endereço de servidor.'); - MessageDlg(strAux + #13#10 + 'Por favor, informe o endereço do servidor do CACIC na tela que será exibida a seguir.', mtWarning, [mbOk], 0); - ExibirConfiguracoes(Nil); - end - else SetValorDatMemoria('Configs.EnderecoServidor',strAux,v_tstrCipherOpened); - End; - -end; - -// Dica baixada de http://procedure.blig.ig.com.br/ -procedure TFormularioGeral.Matar(v_dir,v_files: string); -var -SearchRec: TSearchRec; -Result: Integer; -begin - Result:=FindFirst(v_dir+v_files, faAnyFile, SearchRec); - while result=0 do - begin - log_DEBUG('Tentativa de Exclusão de "'+v_dir + SearchRec.Name+'"'); - DeleteFile(PAnsiChar(v_dir+SearchRec.Name)); - Result:=FindNext(SearchRec); - end; -end; - -procedure TFormularioGeral.HabilitaTCP; -Begin - FormularioGeral.EqualizaInformacoesPatrimoniais; - // Desabilita/Habilita a opção de Informações de TCP/IP - Mnu_InfosTCP.Enabled := (getValorDatMemoria('TcpIp.TE_NOME_HOST' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_IP' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.ID_IP_REDE' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_DOMINIO_DNS' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_DNS_PRIMARIO' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_DNS_SECUNDARIO' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_GATEWAY' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_MASCARA' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_SERV_DHCP' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_WINS_PRIMARIO' ,v_tstrCipherOpened) + - getValorDatMemoria('TcpIp.TE_WINS_SECUNDARIO',v_tstrCipherOpened) <> ''); -End; - -Function TFormularioGeral.Explode(Texto, Separador : String) : TStrings; -var - strItem : String; - ListaAuxUTILS : TStrings; - NumCaracteres, - TamanhoSeparador, - I : Integer; -Begin - ListaAuxUTILS := TStringList.Create; - strItem := ''; - NumCaracteres := Length(Texto); - TamanhoSeparador := Length(Separador); - I := 1; - While I <= NumCaracteres Do - Begin - If (Copy(Texto,I,TamanhoSeparador) = Separador) or (I = NumCaracteres) Then - Begin - if (I = NumCaracteres) then strItem := strItem + Texto[I]; - ListaAuxUTILS.Add(trim(strItem)); - strItem := ''; - I := I + (TamanhoSeparador-1); - end - Else - strItem := strItem + Texto[I]; - - I := I + 1; - End; - Explode := ListaAuxUTILS; -end; -Function TFormularioGeral.RemoveZerosFimString(Texto : String) : String; -var I : Integer; - strAux : string; -Begin - strAux := ''; - if (Length(trim(Texto))>0) then - For I := Length(Texto) downto 0 do - if (ord(Texto[I])<>0) Then - strAux := Texto[I] + strAux; - Result := trim(strAux); -end; - -procedure TFormularioGeral.HabilitaPatrimonio; -Begin - // Desabilita/Habilita a opção de Informações Patrimoniais - Mnu_InfosPatrimoniais.Enabled := (getValorDatMemoria('Configs.CS_COLETA_PATRIMONIO',v_tstrCipherOpened) = 'S'); -End; - -procedure TFormularioGeral.HabilitaSuporteRemoto; -Begin - // Desabilita/Habilita a opção de Suporte Remoto - Mnu_SuporteRemoto.Enabled := (getValorDatMemoria('Configs.CS_SUPORTE_REMOTO',v_tstrCipherOpened) = 'S') and (FileExists(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe')); -End; - - -//Para buscar do Arquivo INI... -// Marreta devido a limitações do KERNEL w9x no tratamento de arquivos texto e suas seções -function TFormularioGeral.getValorChaveRegIni(p_SectionName, p_KeyName, p_IniFileName : String) : String; -var - FileText : TStringList; - i, j, v_Size_Section, v_Size_Key : integer; - v_SectionName, v_KeyName : string; - begin - Result := ''; - if (FileExists(p_IniFileName)) then - Begin - v_SectionName := '[' + p_SectionName + ']'; - v_Size_Section := strLen(PChar(v_SectionName)); - v_KeyName := p_KeyName + '='; - v_Size_Key := strLen(PChar(v_KeyName)); - FileText := TStringList.Create; - try - FileText.LoadFromFile(p_IniFileName); - For i := 0 To FileText.Count - 1 Do - Begin - if (LowerCase(Trim(PChar(Copy(FileText[i],1,v_Size_Section)))) = LowerCase(Trim(PChar(v_SectionName)))) then - Begin - For j := i to FileText.Count - 1 Do - Begin - if (LowerCase(Trim(PChar(Copy(FileText[j],1,v_Size_Key)))) = LowerCase(Trim(PChar(v_KeyName)))) then - Begin - Result := trim(PChar(Copy(FileText[j],v_Size_Key + 1,strLen(PChar(FileText[j]))-v_Size_Key))); - Break; - End; - End; - End; - if (Result <> '') then break; - End; - finally - FileText.Free; - end; - end - else Result := ''; - - log_DEBUG('Resgatei '+p_SectionName+'/'+p_KeyName+' de '+p_IniFileName+' => "'+Result+'"'); - end; - -procedure TFormularioGeral.log_DEBUG(p_msg:string); -Begin - if boolDebugs then log_diario('(v.'+getVersionInfo(ParamStr(0))+') DEBUG - '+p_msg); -End; - -function TFormularioGeral.Posso_Rodar : boolean; -Begin - result := false; - - log_debug('Verificando concomitância de sessões'); - // Se eu conseguir matar o arquivo abaixo é porque não há outra sessão deste agente aberta... (POG? Nããão! :) ) - FormularioGeral.Matar(g_oCacic.getCacicPath,'aguarde_CACIC.txt'); - if (not (FileExists(g_oCacic.getCacicPath + 'aguarde_CACIC.txt'))) then - result := true; -End; - -procedure TFormularioGeral.VerificaDebugs; -Begin - boolDebugs := false; - if DirectoryExists(g_oCacic.getCacicPath + 'Temp\Debugs') then - Begin - if (FormatDateTime('ddmmyyyy', GetFolderDate(g_oCacic.getCacicPath + 'Temp\Debugs')) = FormatDateTime('ddmmyyyy', date)) then - Begin - boolDebugs := true; - log_DEBUG('Pasta "' + g_oCacic.getCacicPath + 'Temp\Debugs" com data '+FormatDateTime('dd-mm-yyyy', GetFolderDate(g_oCacic.getCacicPath + 'Temp\Debugs'))+' encontrada. DEBUG ativado.'); - End; - End; -End; - -procedure TFormularioGeral.FormCreate(Sender: TObject); -var strAux, - v_ip_serv_cacic, - strFraseVersao : string; - intAux : integer; - v_Aguarde : TextFile; - v_SystemDrive : TStrings; -begin - - // Criação do objeto para monitoramento de dispositivos USB - FUsb := TUsbClass.Create; - FUsb.OnUsbInsertion := UsbIN; - FUsb.OnUsbRemoval := UsbOUT; - - // Essas variáveis ajudarão a controlar o redesenho do ícone no systray, - // evitando o "roubo" do foco. - g_intTaskBarAtual := 0; - g_intTaskBarAnterior := 0; - boolWinIniChange := false; - - // Não mostrar o formulário... - Application.ShowMainForm:=false; - - g_oCacic := TCACIC.Create; - - g_oCacic.setBoolCipher(true); - - //g_oCacic.showTrayIcon(false); - - - Try - g_oCacic.setCacicPath(getValorChaveRegIni('Cacic2','cacic_dir',g_oCacic.getWinDir + 'chksis.ini')) ; - - if not DirectoryExists(g_oCacic.getCacicPath + 'Temp') then - begin - ForceDirectories(g_oCacic.getCacicPath + 'Temp'); - Log_Diario('Criando pasta '+g_oCacic.getCacicPath + 'Temp'); - end; - - if not DirectoryExists(g_oCacic.getCacicPath + 'Modulos') then - begin - ForceDirectories(g_oCacic.getCacicPath + 'Modulos'); - Log_Diario('Criando pasta '+g_oCacic.getCacicPath + 'Modulos'); - end; - - VerificaDebugs; - - log_DEBUG('Pasta do Sistema: "' + g_oCacic.getCacicPath + '"'); - - if Posso_Rodar then - Begin - // Uma forma fácil de evitar que outra sessão deste agente seja iniciada! (POG? Nããããooo!) :)))) - AssignFile(v_Aguarde,g_oCacic.getCacicPath + 'aguarde_CACIC.txt'); {Associa o arquivo a uma variável do tipo TextFile} - {$IOChecks off} - Reset(v_Aguarde); {Abre o arquivo texto} - {$IOChecks on} - if (IOResult <> 0) then // Arquivo não existe, será recriado. - Rewrite (v_Aguarde); - - Append(v_Aguarde); - Writeln(v_Aguarde,'Apenas um pseudo-cookie para evitar sessões concomitantes...'); - Append(v_Aguarde); - Writeln(v_Aguarde,'Futuramente penso em colocar aqui o pID, para possibilitar finalização via software externo...'); - Append(v_Aguarde); - - v_DataCacic2DAT := ''; - v_tstrCipherOpened := TStrings.Create; - v_tstrCipherOpened := CipherOpen; - - if FileExists(g_oCacic.getCacicPath + 'cacic2.ini') then - Begin - log_DEBUG('O arquivo "'+g_oCacic.getCacicPath + 'cacic2.ini" ainda existe. Vou resgatar algumas chaves/valores'); - SetValorDatMemoria('Configs.EnderecoServidor' ,getValorChaveRegIni('Configs' ,'EnderecoServidor' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.IN_EXIBE_BANDEJA' ,getValorChaveRegIni('Configs' ,'IN_EXIBE_BANDEJA' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.TE_JANELAS_EXCECAO' ,getValorChaveRegIni('Configs' ,'TE_JANELAS_EXCECAO' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.NU_EXEC_APOS' ,getValorChaveRegIni('Configs' ,'NU_EXEC_APOS' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.NU_INTERVALO_EXEC' ,getValorChaveRegIni('Configs' ,'NU_INTERVALO_EXEC' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.Endereco_WS' ,getValorChaveRegIni('Configs' ,'Endereco_WS' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.TE_SENHA_ADM_AGENTE' ,getValorChaveRegIni('Configs' ,'TE_SENHA_ADM_AGENTE' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.NU_INTERVALO_RENOVACAO_PATRIM' ,getValorChaveRegIni('Configs' ,'NU_INTERVALO_RENOVACAO_PATRIM' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA' ,getValorChaveRegIni('Configs' ,'DT_HR_ULTIMA_COLETA' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('TcpIp.TE_ENDERECOS_MAC_INVALIDOS' ,getValorChaveRegIni('TcpIp' ,'TE_ENDERECOS_MAC_INVALIDOS' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('TcpIp.ID_IP_REDE' ,getValorChaveRegIni('TcpIp' ,'ID_IP_REDE' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('TcpIp.TE_IP' ,getValorChaveRegIni('TcpIp' ,'TE_IP' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('TcpIp.TE_MASCARA' ,getValorChaveRegIni('TcpIp' ,'TE_MASCARA' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.ultima_rede_obtida' ,getValorChaveRegIni('Patrimonio' ,'ultima_rede_obtida' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.dt_ultima_renovacao' ,getValorChaveRegIni('Patrimonio' ,'dt_ultima_renovacao' ,g_oCacic.getCacicPath + 'cacic2.ini'),v_tstrCipherOpened); - Matar(g_oCacic.getCacicPath,'cacic2.ini'); - End; - - // Procedimento para que sejam igualadas as informações de patrimônio caso seja usado o MapaCACIC - EqualizaInformacoesPatrimoniais; - - Try - // Inicializo bloqueando o módulo de suporte remoto seguro na FireWall nativa. - if FileExists(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe') then - g_oCacic.addApplicationToFirewall('srCACIC - Suporte Remoto Seguro do Sistema CACIC',g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe', false); - Except - End; - - if (ParamCount > 0) then //Caso o Cacic2 seja chamado com passagem de parâmetros... - Begin - // Parâmetros possíveis (aceitos) - // /ip_serv_cacic => Endereço IP do Módulo Gerente. Ex.: 10.71.0.212 - // /atualizacao => O CACIC foi chamado pelo batch de AutoUpdate e deve ir direto para o ExecutaCacic. - - // Chamada com parâmetros pelo chkcacic.exe ou linha de comando - For intAux := 1 to ParamCount do - Begin - if LowerCase(Copy(ParamStr(intAux),1,15)) = '/ip_serv_cacic=' then - begin - log_DEBUG('Parâmetro /ip_serv_cacic recebido...'); - strAux := Trim(Copy(ParamStr(intAux),16,Length((ParamStr(intAux))))); - v_ip_serv_cacic := Trim(Copy(strAux,0,Pos('/', strAux) - 1)); - If (v_ip_serv_cacic = '') Then v_ip_serv_cacic := strAux; - SetValorDatMemoria('Configs.EnderecoServidor',v_ip_serv_cacic,v_tstrCipherOpened); - end; - end; - - If FindCmdLineSwitch('execute', True) or - FindCmdLineSwitch('atualizacao', True) Then - begin - if FindCmdLineSwitch('atualizacao', True) then - begin - log_DEBUG('Opção /atualizacao recebida...'); - Log_Diario('Reinicializando com versão '+getVersionInfo(ParamStr(0))); - end - else - begin - log_DEBUG('Opção /execute recebida...'); - log_diario('Opção para execução imediata encontrada...'); - end; - ExecutaCacic(nil); - end; - End; - - // Os timers iniciam-se desabilitados... Mais à frente receberão parâmetros de tempo para execução. - Timer_Nu_Exec_Apos.Enabled := False; - Timer_Nu_Intervalo.Enabled := False; - - // Derruba o cacic durante o shutdown do windows. - ShutdownEmExecucao := False; - - // Não mostrar o formulário... - //Application.ShowMainForm:=false; - - Try - // A chamada abaixo define os valores usados pelo agente principal. - SetaVariaveisGlobais; - Except - log_diario('PROBLEMAS SETANDO VARIÁVEIS GLOBAIS!'); - End; - - InicializaTray; - - CipherClose; - End - else - Begin - log_DEBUG('Agente finalizado devido a concomitância de sessões...'); - - Finaliza; - End; - Except - log_diario('PROBLEMAS NA INICIALIZAÇÃO (2)'); - End; -end; - -Procedure TFormularioGeral.EqualizaInformacoesPatrimoniais; -var tstrAUX : TStrings; -Begin - tstrAUX := TStrings.Create; - CipherOpenGenerico(tstrAUX,g_ocacic.getCacicPath + 'MapaCACIC.dat'); - - // Caso as informações patrimoniais coletadas pelo MapaCACIC sejam mais atuais, obtenho-as... - if (getValorDatMemoria('Patrimonio.dt_ultima_renovacao',v_tstrCipherOpened) = '') or - (StrToInt64(getValorDatMemoria('Patrimonio.dt_ultima_renovacao',tstrAUX)) > StrToInt64(getValorDatMemoria('Patrimonio.dt_ultima_renovacao',v_tstrCipherOpened))) then - Begin - SetValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1' , getValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1a', getValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1a',tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.id_unid_organizacional_nivel2' , getValorDatMemoria('Patrimonio.id_unid_organizacional_nivel2' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.id_local' , getValorDatMemoria('Patrimonio.id_local' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_localizacao_complementar' , getValorDatMemoria('Patrimonio.te_localizacao_complementar' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_info_patrimonio1' , getValorDatMemoria('Patrimonio.te_info_patrimonio1' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_info_patrimonio2' , getValorDatMemoria('Patrimonio.te_info_patrimonio2' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_info_patrimonio3' , getValorDatMemoria('Patrimonio.te_info_patrimonio3' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_info_patrimonio4' , getValorDatMemoria('Patrimonio.te_info_patrimonio4' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_info_patrimonio5' , getValorDatMemoria('Patrimonio.te_info_patrimonio5' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.te_info_patrimonio6' , getValorDatMemoria('Patrimonio.te_info_patrimonio6' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.ultima_rede_obtida' , getValorDatMemoria('Patrimonio.ultima_rede_obtida' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.dt_ultima_renovacao' , getValorDatMemoria('Patrimonio.dt_ultima_renovacao' ,tstrAUX), v_tstrCipherOpened); - SetValorDatMemoria('Patrimonio.Configs' , getValorDatMemoria('Patrimonio.Configs' ,tstrAUX), v_tstrCipherOpened); - - SetValorChaveRegEdit('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio1', getValorDatMemoria('Patrimonio.te_info_patrimonio1',tstrAUX)); - SetValorChaveRegEdit('HKEY_LOCAL_MACHINE\SOFTWARE\Dataprev\Patrimonio\te_info_patrimonio4', getValorDatMemoria('Patrimonio.te_info_patrimonio4',tstrAUX)); - End; - tstrAUX.Free; -End; - -procedure TFormularioGeral.SetaVariaveisGlobais; -var v_aux : string; -Begin - Try - // Inicialização do indicador de SENHA JÁ INFORMADA - SetValorDatMemoria('Configs.SJI','',v_tstrCipherOpened); - - if (getValorDatMemoria('Configs.IN_EXIBE_BANDEJA' ,v_tstrCipherOpened) = '') then SetValorDatMemoria('Configs.IN_EXIBE_BANDEJA' , 'S' ,v_tstrCipherOpened); - if (getValorDatMemoria('Configs.NU_EXEC_APOS' ,v_tstrCipherOpened) = '') then SetValorDatMemoria('Configs.NU_EXEC_APOS' , '12345',v_tstrCipherOpened); - if (getValorDatMemoria('Configs.NU_INTERVALO_EXEC',v_tstrCipherOpened) = '') then SetValorDatMemoria('Configs.NU_INTERVALO_EXEC', '4' ,v_tstrCipherOpened); - // IN_EXIBE_BANDEJA O valor padrão é mostrar o ícone na bandeja. - // NU_EXEC_APOS Assumirá o padrão de 0 minutos para execução imediata em caso de primeira execução (instalação). - // NU_INTERVALO_EXEC Assumirá o padrão de 4 horas para o intervalo, no caso de problemas. - - // Número de horas do intervalo (3.600.000 milisegundos correspondem a 1 hora). - Timer_Nu_Intervalo.Enabled := False; - Timer_Nu_Intervalo.Interval := (strtoint(getValorDatMemoria('Configs.NU_INTERVALO_EXEC',v_tstrCipherOpened))) * 3600000; - Timer_Nu_Intervalo.Enabled := True; - - // Número de minutos para iniciar a execução (60.000 milisegundos correspondem a 1 minuto). Acrescento 1, pois se for zero ele não executa. - Timer_Nu_Exec_Apos.Enabled := False; - Timer_Nu_Exec_Apos.Interval := strtoint(getValorDatMemoria('Configs.NU_EXEC_APOS',v_tstrCipherOpened)) * 60000; - - // Se for a primeiríssima execução do agente naquela máquina (após sua instalação) já faz todas as coletas configuradas, sem esperar os minutos definidos pelo administrador. - // Também armazena os Hash-Codes dos módulos principais, evitando novo download... - If (getValorDatMemoria('Configs.NU_EXEC_APOS',v_tstrCipherOpened) = '12345') then // Flag usada na inicialização. Só entra nesse if se for a primeira execução do cacic após carregado. - begin - Timer_Nu_Exec_Apos.Interval := 60000; // 60 segundos para chamar Ger_Cols /coletas - SetValorDatMemoria('Configs.TE_HASH_CACIC2' , g_oCacic.getFileHash(ParamStr(0)) ,v_tstrCipherOpened); - SetValorDatMemoria('Configs.TE_HASH_GER_COLS', g_oCacic.getFileHash(g_oCacic.getCacicPath + 'modulos\ger_cols.exe'),v_tstrCipherOpened); - SetValorDatMemoria('Configs.TE_HASH_CHKSIS' , g_oCacic.getFileHash(g_oCacic.getWinDir + 'chksis.exe') ,v_tstrCipherOpened); - end - else log_diario('Executar as ações automaticamente a cada ' +getValorDatMemoria('Configs.NU_INTERVALO_EXEC',v_tstrCipherOpened) + ' horas.'); - - Timer_Nu_Exec_Apos.Enabled := True; - - v_aux := getValorDatMemoria('Configs.DT_HR_ULTIMA_COLETA',v_tstrCipherOpened); - if (v_aux <> '') and (Copy(v_aux, 1, 8) <> Copy(FormatDateTime('YYYYmmddHHnnss', Now), 1, 8)) then Timer_Nu_Exec_Apos.Enabled := True; - - // Desabilita/Habilita a opção de Informações Patrimoniais - HabilitaPatrimonio; - - // Desabilita/Habilita a opção de Informações Gerais - HabilitaTCP; - - // Desabilita/Habilita a opção de Suporte Remoto - HabilitaSuporteRemoto; - Except - log_diario('PROBLEMAS NA INICIALIZAÇÃO (1)'); - End; -end; - -procedure TFormularioGeral.log_diario(strMsg : String); -var - HistoricoLog : TextFile; - strDataArqLocal, strDataAtual : string; -begin - try - FileSetAttr (g_oCacic.getCacicPath + 'cacic2.log',0); // Retira os atributos do arquivo para evitar o erro FILE ACCESS DENIED em máquinas 2000 - AssignFile(HistoricoLog,g_oCacic.getCacicPath + 'cacic2.log'); {Associa o arquivo a uma variável do tipo TextFile} - {$IOChecks off} - Reset(HistoricoLog); {Abre o arquivo texto} - {$IOChecks on} - if (IOResult <> 0) then // Arquivo não existe, será recriado. - begin - Rewrite (HistoricoLog); - Append(HistoricoLog); - Writeln(HistoricoLog,FormatDateTime('dd/mm hh:nn:ss : ', Now) + '======================> Iniciando o Log do CACIC <======================='); - end; - if (trim(strMsg) <> '') then - begin - DateTimeToString(strDataArqLocal, 'yyyymmdd', FileDateToDateTime(Fileage(g_oCacic.getCacicPath + 'cacic2.log'))); - DateTimeToString(strDataAtual , 'yyyymmdd', Date); - if (strDataAtual <> strDataArqLocal) then // Se o arquivo LOG não é da data atual... - begin - Rewrite (HistoricoLog); //Cria/Recria o arquivo - Append(HistoricoLog); - Writeln(HistoricoLog,FormatDateTime('dd/mm hh:nn:ss : ', Now) + '======================> Iniciando o Log do CACIC <======================='); - end; - Append(HistoricoLog); - Writeln(HistoricoLog,FormatDateTime('dd/mm hh:nn:ss : ', Now)+ '[Agente Principal] '+strMsg); {Grava a string Texto no arquivo texto} - CloseFile(HistoricoLog); {Fecha o arquivo texto} - end - else - CloseFile(HistoricoLog); - except - log_diario('PROBLEMAS NA CRIAÇÃO DO ARQUIVO LOG'); - end; - -end; -procedure TFormularioGeral.Finaliza; -Begin - Try - Shell_NotifyIcon(NIM_Delete,@NotifyStruc); - Shell_NotifyIcon(NIM_MODIFY,@NotifyStruc); - RemoveIconesMortos; - Except - log_diario('PROBLEMAS NA FINALIZAÇÃO'); - End; - g_oCacic.Free; - FreeAndNil(FUsb); - FreeMemory(0); - Application.Terminate; -End; - -procedure TFormularioGeral.Sair(Sender: TObject); -begin - CriaFormSenha(nil); - formSenha.ShowModal; - If (getValorDatMemoria('Configs.SJI',v_tstrCipherOpened) = 'S') Then Finaliza; -end; - -procedure TFormularioGeral.Invoca_GerCols(p_acao:string; boolShowInfo : Boolean = true); -begin - Matar(g_oCacic.getCacicPath + 'temp\','*.txt'); - Matar(g_oCacic.getCacicPath + 'temp\','*.ini'); - - // Caso exista o Gerente de Coletas será verificada a versão e excluída caso antiga(Uma forma de ação pró-ativa) - if ChecaGERCOLS then - Begin - Timer_InicializaTray.Enabled := False; - ChecaCONFIGS; - CipherClose; - if boolShowInfo then - log_diario('Invocando Gerente de Coletas com ação: "'+p_acao+'"') - else - log_DEBUG('Invocando Gerente de Coletas com ação: "'+p_acao+'"'); - Timer_Nu_Exec_Apos.Enabled := False; - Log_DEBUG('Criando Processo Ger_Cols => "'+g_oCacic.getCacicPath + 'modulos\GER_COLS.EXE /'+p_acao+' /CacicPath='+g_oCacic.getCacicPath+'"'); - g_oCacic.createSampleProcess(g_oCacic.getCacicPath + 'modulos\GER_COLS.EXE /'+p_acao+' /CacicPath='+g_oCacic.getCacicPath,false,SW_HIDE); - Timer_InicializaTray.Enabled := True; - End - else - log_diario('Não foi possível invocar o Gerente de Coletas!'); -end; - -function TFormularioGeral.FindWindowByTitle(WindowTitle: string): Hwnd; -var - NextHandle: Hwnd; - NextTitle: array[0..260] of char; -begin - // Get the first window - NextHandle := GetWindow(Application.Handle, GW_HWNDFIRST); - while NextHandle > 0 do - begin - // retrieve its text - GetWindowText(NextHandle, NextTitle, 255); - if (trim(StrPas(NextTitle))<> '') and (Pos(strlower(pchar(WindowTitle)), strlower(PChar(StrPas(NextTitle)))) <> 0) then - begin - Result := NextHandle; - Exit; - end - else - // Get the next window - NextHandle := GetWindow(NextHandle, GW_HWNDNEXT); - end; - Result := 0; -end; - -procedure TFormularioGeral.ExecutaCacic(Sender: TObject); -var intAux, - intContaExec : integer; - v_mensagem, - v_tipo_mensagem, - v_TE_FILA_FTP, - v_Aux1, - v_Aux2, - v_Aux3, - strFraseVersao : string; - v_MsgDlgType : TMsgDlgType; - v_Repete : boolean; -begin - - log_DEBUG('Execução - Resgate de possíveis novos valores no DAT.' + g_oCacic.getWindowsStrId()); - - CipherOpen; - - SetValorDatMemoria('Configs.TE_SO',g_oCacic.getWindowsStrId,v_tstrCipherOpened); - - try - if FindCmdLineSwitch('execute', True) or - FindCmdLineSwitch('atualizacao', True) or - Pode_Coletar Then - Begin - log_DEBUG('Preparando chamada ao Gerente de Coletas...'); - // Se foi gerado o arquivo ger_erro.txt o Log conterá a mensagem alí gravada como valor de chave - // O Gerente de Coletas deverá ser eliminado para que seja baixado novamente por ChecaGERCOLS - if (FileExists(g_oCacic.getCacicPath + 'ger_erro.txt')) then - Begin - log_diario('Gerente de Coletas eliminado devido a falha:'); - log_diario(getValorDatMemoria('Erro_Fatal_Descricao',v_tstrCipherOpened)); - SetaVariaveisGlobais; - Matar(g_oCacic.getCacicPath,'ger_erro.txt'); - Matar(g_oCacic.getCacicPath+'modulos\','ger_cols.exe'); - End; - - if (FileExists(g_oCacic.getCacicPath + 'temp\reset.txt')) then - Begin - Matar(g_oCacic.getCacicPath+'temp\','reset.txt'); - log_diario('Reinicializando...'); - SetaVariaveisGlobais; - End; - Timer_Nu_Exec_Apos.Enabled := False; - - intContaExec := 1; - If (FileExists(g_oCacic.getCacicPath + 'temp\cacic2.bat') or - FileExists(g_oCacic.getCacicPath + 'temp\ger_cols.exe')) Then - intContaExec := 2; - - // Muda HINT - InicializaTray; - - // Loop para possível necessidade de updates de Agente Principal e/ou Gerente de Coletas - For intAux := intContaExec to 2 do - Begin - if (intAux = 1) then - Begin - log_DEBUG('Controle de Execuções='+inttostr(intContaExec)); - log_diario('Iniciando execução de atividades.'); - - v_Repete := true; - while v_Repete do - Begin - v_Repete := false; - Mnu_InfosPatrimoniais.Enabled := False; - Mnu_InfosTCP.Enabled := False; - Mnu_ExecutarAgora.Enabled := False; - v_Aux1 := Mnu_InfosPatrimoniais.Caption; - v_Aux2 := Mnu_InfosTCP.Caption; - v_Aux3 := Mnu_ExecutarAgora.Caption; - Mnu_InfosPatrimoniais.Caption := 'Aguarde, coleta em ação!'; - Mnu_InfosTCP.Caption := Mnu_InfosPatrimoniais.Caption; - Mnu_ExecutarAgora.Caption := Mnu_InfosPatrimoniais.Caption; - - - log_DEBUG('Primeira chamada ao Gerente de Coletas...'); - Invoca_GerCols('coletas'); - sleep(3000); // Pausa para início do Gerente de Coletas e criação do arquivo temp\aguarde_GER.txt - - InicializaTray; - - // Pausas de 15 segundos para o caso de ser(em) baixada(s) nova(s) versão(ões) de Ger_Cols e/ou Cacic2. - while not Pode_Coletar do - Begin - log_DEBUG('Aguardando mais 15 segundos...'); - sleep(15000); - InicializaTray; - End; - Mnu_InfosPatrimoniais.Caption := v_Aux1; - Mnu_InfosTCP.Caption := v_Aux2; - Mnu_ExecutarAgora.Caption := v_Aux3; - Mnu_ExecutarAgora.Enabled := true; - - CipherOpen; - // Neste caso o Gerente de Coletas deverá fazer novo contato devido à permissão de criptografia ter sido colocada em espera pelo próximo contato. - if (FormularioGeral.getValorDatMemoria('Configs.CS_CIPHER',v_tstrCipherOpened)='2') then - Begin - v_Repete := true; - log_Debug('Criptografia será colocada em nível 2...'); - End; - End; - - // Verifico se foi gravada alguma mensagem pelo Gerente de Coletas e mostro - CipherOpen; - v_mensagem := getValorDatMemoria('Mensagens.te_mensagem',v_tstrCipherOpened); - v_tipo_mensagem := getValorDatMemoria('Mensagens.cs_tipo' ,v_tstrCipherOpened); - if (v_mensagem <> '') then - Begin - if (v_tipo_mensagem='mtError') then v_MsgDlgType := mtError - else if (v_tipo_mensagem='mtInformation') then v_MsgDlgType := mtInformation - else if (v_tipo_mensagem='mtWarning') then v_MsgDlgType := mtWarning; - MessageDlg(v_mensagem,v_MsgDlgType, [mbOk], 0); - SetValorDatMemoria('Mensagens.te_mensagem', '',v_tstrCipherOpened); - SetValorDatMemoria('Mensagens.cs_tipo', '',v_tstrCipherOpened); - End; - - // Verifico se TE_FILA_FTP foi setado (por Ger_Cols) e obedeço ao intervalo para nova tentativa de coletas - // Caso TE_FILA_FTP inicie com # é porque já passou nessa condição e deve iniciar nova tentativa de FTP... - v_TE_FILA_FTP := getValorDatMemoria('Configs.TE_FILA_FTP',v_tstrCipherOpened); - if (Copy(v_TE_FILA_FTP,1,1) <> '#') and - (v_TE_FILA_FTP <> '0') and - (v_TE_FILA_FTP <> '') then - Begin - // Busquei o número de milisegundos setados em TE_FILA_FTP e o obedeço... - // 60.000 milisegundos correspondem a 60 segundos (1 minuto). - // Acrescento 1, pois se for zero ele não executa. - Timer_Nu_Exec_Apos.Enabled := False; - Timer_Nu_Exec_Apos.Interval := strtoint(v_TE_FILA_FTP) * 60000; - Timer_Nu_Exec_Apos.Enabled := True; - log_diario('FTP de coletores adiado pelo Módulo Gerente.'); - log_diario('Nova tentativa em aproximadamente ' + v_TE_FILA_FTP+ ' minuto(s).'); - SetValorDatMemoria('Configs.TE_FILA_FTP','#' + v_TE_FILA_FTP,v_tstrCipherOpened); - End; - - // Desabilita/Habilita a opção de Informações Patrimoniais - HabilitaPatrimonio; - - // Desabilita/Habilita a opção de Informações de TCP/IP - HabilitaTCP; - - // Desabilita/Habilita a opção de Suporte Remoto - HabilitaSuporteRemoto; - - // Para evitar uma reexecução de Ger_Cols sem necessidade... - intContaExec := 3; - End; - - // Caso tenha sido baixada nova cópia do Gerente de Coletas, esta deverá ser movida para cima da atual - if (FileExists(g_oCacic.getCacicPath + 'temp\ger_cols.exe')) then - Begin - log_diario('Atualizando versão do Gerente de Coletas para '+getVersionInfo(g_oCacic.getCacicPath + 'temp\ger_cols.exe')); - // O MoveFileEx não se deu bem no Win98! :| - // MoveFileEx(PChar(g_oCacic.getCacicPath + 'temp\ger_cols.exe'),PChar(g_oCacic.getCacicPath + 'modulos\ger_cols.exe'),MOVEFILE_REPLACE_EXISTING); - - CopyFile(PChar(g_oCacic.getCacicPath + 'temp\ger_cols.exe'),PChar(g_oCacic.getCacicPath + 'modulos\ger_cols.exe'),false); - sleep(2000); // 2 segundos de espera pela cópia! :) (Rwindows!) - - Matar(g_oCacic.getCacicPath+'temp\','ger_cols.exe'); - sleep(2000); // 2 segundos de espera pela deleção! - - intContaExec := 2; // Forçará uma reexecução de Ger_Cols... - End; - - // Caso tenha sido baixada nova cópia do Agente Principal, esta deverá ser movida para cima da atual pelo Gerente de Coletas... - if (FileExists(g_oCacic.getCacicPath + 'temp\cacic2.exe')) then //AutoUpdate! - Begin - // Verifico e excluo o Gerente de Coletas caso a versão seja anterior ao 1º release - v_versao := getVersionInfo(g_oCacic.getCacicPath + 'modulos\ger_cols.exe'); - if ((copy(v_versao,1,5)='2.0.0') or // Versões anteriores ao 1º Release... - (v_versao = '2.0.1.2') or // Tivemos alguns problemas nas versões 2.0.1.2, 2.0.1.3 e 2.0.1.4 - (v_versao = '2.0.1.3') or - (v_versao = '2.0.1.4') or - (v_versao = '0.0.0.0')) then // Provavelmente arquivo corrompido ou versão muito antiga - Begin - Matar(g_oCacic.getCacicPath+'modulos\','ger_cols.exe'); - sleep(2000); // 2 segundos de espera pela deleção! - End; - - // Agora o Gerente de Coletas será invocado para fazer a atualização da versão do Agente Principal - log_diario('Invocando Gerente de Coletas para Atualização do Agente Principal.'); - Invoca_GerCols('UpdatePrincipal'); - log_diario('Finalizando... (Atualização em aproximadamente 20 segundos).'); - Finaliza; - End; - - // A existência de "temp\cacic2.bat" significa AutoUpdate já executado! - // Essa verificação foi usada no modelo antigo de AutoUpdate e deve ser mantida - // até a total convergência de versões para 2.0.1.16+... - if (FileExists(g_oCacic.getCacicPath + 'temp\cacic2.bat')) then - Matar(g_oCacic.getCacicPath+'temp\','cacic2.bat'); - - // O loop 1 foi dedicado a atualizações de versões e afins... - // O loop 2 deverá invocar as coletas propriamente ditas... - if (intContaExec = 2) then - Begin - log_DEBUG('Segunda chamada ao Gerente de Coletas...'); - Invoca_GerCols('coletas'); - intContaExec := 3; - End; - - End; - End; - - InicializaTray; - - except - log_diario('PROBLEMAS AO TENTAR ATIVAR COLETAS.'); - end; -end; - -procedure TFormularioGeral.ExibirLogAtividades(Sender: TObject); -begin - Application.CreateForm(tformLog,formLog); - formLog.ShowModal; -end; - -procedure TFormularioGeral.ExibirConfiguracoes(Sender: TObject); -begin - // SJI = Senha Já Informada... - // Esse valor é inicializado com "N" - if (FormularioGeral.getValorDatMemoria('Configs.SJI',v_tstrCipherOpened)='') and - (FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor',v_tstrCipherOpened)<>'') then - begin - FormularioGeral.CriaFormSenha(nil); - formSenha.ShowModal; - end; - - if (FormularioGeral.getValorDatMemoria('Configs.SJI',v_tstrCipherOpened)<>'') or - (FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor',v_tstrCipherOpened)='') then - begin - Application.CreateForm(TFormConfiguracoes, FormConfiguracoes); - FormConfiguracoes.ShowModal; - end; - -end; - -procedure TFormularioGeral.Mnu_InfosPatrimoniaisClick(Sender: TObject); -var boolAbreJanelaPatrimonio : boolean; - tstrAUX : TStrings; -begin - tstrAUX := TStrings.Create; - tstrAUX := v_tstrCipherOpened; - - boolAbreJanelaPatrimonio := true; - If (( getValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.id_unid_organizacional_nivel2' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_localizacao_complementar' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_info_patrimonio1' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_info_patrimonio2' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_info_patrimonio3' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_info_patrimonio4' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_info_patrimonio5' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.te_info_patrimonio6' ,tstrAUX)+ - getValorDatMemoria('Patrimonio.ultima_rede_obtida' ,tstrAUX))<>'') then - Begin - SetValorDatMemoria('Configs.SJI','',tstrAUX); - CriaFormSenha(nil); - formSenha.ShowModal; - if (getValorDatMemoria('Configs.SJI',tstrAUX)<>'S') then - Begin - boolAbreJanelaPatrimonio := false; - End; - End; - - tstrAUX.Free; - - if (boolAbreJanelaPatrimonio) then - begin - if (ChecaGERCOLS) then - Begin - ChecaCONFIGS; - Invoca_GerCols('patrimonio'); - End; - end; -end; - -//======================================================================= -// Todo o código deste ponto em diante está relacionado às rotinas de -// de inclusão do ícone do programa na bandeja do sistema -//======================================================================= -procedure TFormularioGeral.InicializaTray; -var Icon : TIcon; - v_intStatus : integer; - v_strHint : String; -const NORMAL = 0; // Normal - OCUPADO = 1; // Raio - Coletando - DESCONFIGURADO = 2; // Interrogação - Identificando Host - AGUARDE = 3; // Ampulheta - Aguardando ação local (recuperação de agentes, etc.) -begin - Icon := TIcon.Create; - - // Monto a frase a ser colocada no Hint - v_strHint := 'CACIC v:' + getVersionInfo(ParamStr(0)); - if not (getValorDatMemoria('TcpIp.TE_IP',v_tstrCipherOpened) = '') then - v_strHint := v_strHint + chr(13) + chr(10) + 'IP: '+ getValorDatMemoria('TcpIp.TE_IP',v_tstrCipherOpened); - - // Mostro a versão no painel de Informações Gerais - pnVersao.Caption := 'V. ' + getVersionInfo(ParamStr(0)); - - // Estrutura do tray icon sendo criada. - NotifyStruc.cbSize := SizeOf(NotifyStruc); - NotifyStruc.Wnd := self.Handle; - NotifyStruc.uID := 1; - NotifyStruc.uFlags := NIF_ICON or NIF_TIP or NIF_MESSAGE; - NotifyStruc.uCallbackMessage := WM_MYMESSAGE; //User defined message - - //RegisterClass(@NotifyStruc); - - // Tento apagar os arquivos indicadores de ações de coletas - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_GER.txt'); - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_INI.txt'); - - v_intStatus := NORMAL; - - // Caso os indicadores de ações de coletas não existam, ativo o ícone normal/desconectado... - if not FileExists(g_oCacic.getCacicPath+'temp\aguarde_GER.txt') and - not FileExists(g_oCacic.getCacicPath+'temp\aguarde_INI.txt') then - Begin - if not (FormularioGeral.getValorDatMemoria('Configs.ConexaoOK',v_tstrCipherOpened)='S') then - Begin - v_strHint := v_strHint + ' IDENTIFICANDO HOSPEDEIRO...'; - v_intStatus := DESCONFIGURADO; - End; - End - else - Begin - if FileExists(g_oCacic.getCacicPath+'temp\recuperasr.txt') then - Begin - v_intStatus := AGUARDE; - v_strHint := 'Aguarde...'; - End - else - Begin - v_strHint := v_strHint + chr(13) + chr(10) + ' Coletas em Execução...'; - v_intStatus := OCUPADO; - End; - End; - - imgList_Icones.GetIcon(v_intStatus,Icon); - - NotifyStruc.hIcon := Icon.Handle; - { - if Self.Icon.Handle > 0 then - NotifyStruc.hIcon := Icon.Handle - else - NotifyStruc.hIcon := Application.Icon.Handle; - } - log_DEBUG('Setando o HINT do Systray para: "'+v_strHint+'"'); - - // Atualiza o conteúdo do tip da bandeja - StrPCopy(NotifyStruc.szTip, v_strHint); - - if (getValorDatMemoria('Configs.IN_EXIBE_BANDEJA',v_tstrCipherOpened) <> 'N') Then - Begin - log_DEBUG('Adicionando Ícone da aplicação ao Systray...'); - Shell_NotifyIcon(NIM_ADD, @NotifyStruc); - End - else - Begin - log_DEBUG('Retirando Ícone do Systray...'); - Shell_NotifyIcon(HIDE_WINDOW,@NotifyStruc); - Shell_NotifyIcon(NIM_Delete,@NotifyStruc); - End; - log_DEBUG('Aplicando Modificação de Ícone do Systray...'); - Shell_NotifyIcon(NIM_MODIFY,@NotifyStruc); - - Application.ProcessMessages; - - Icon.Free; -end; - -procedure TFormularioGeral.WMSysCommand; -begin // Captura o minimizar da janela - if (Msg.CmdType = SC_MINIMIZE) or (Msg.CmdType = SC_MAXIMIZE) then - Begin - MinimizaParaTrayArea(Nil); - Exit; - end; - DefaultHandler(Msg); -end; - -procedure TFormularioGeral.TrayMessage(var Msg: TMessage); -var Posicao : TPoint; -begin - - if (Msg.LParam=WM_RBUTTONDOWN) then - Begin - - Mnu_InfosPatrimoniais.Enabled := False; - // Habilita a opção de menu caso a coleta de patrimonio esteja habilitado. - HabilitaPatrimonio; - - // Habilita a opção de menu caso o suporte remoto esteja habilitado. - HabilitaSuporteRemoto; - - SetForegroundWindow(Handle); - GetCursorPos(Posicao); - Popup_Menu_Contexto.Popup(Posicao.X, Posicao.Y); - end; - -end; - -procedure TFormularioGeral.MinimizaParaTrayArea(Sender: TObject); -begin - FormularioGeral.Visible:=false; - if (getValorDatMemoria('Configs.IN_EXIBE_BANDEJA',v_tstrCipherOpened) <> 'N') Then - Begin - Shell_NotifyIcon(NIM_ADD,@NotifyStruc); - End - else - Begin - Shell_NotifyIcon(HIDE_WINDOW,@NotifyStruc); - Shell_NotifyIcon(nim_Modify,@NotifyStruc); - End; -end; -// ------------------------------------- -// Fim dos códigos da bandeja do sistema -// ------------------------------------- - -procedure TFormularioGeral.FormCloseQuery(Sender: TObject; var CanClose: Boolean); -begin - // Esse evento é colocado em Nil durante o shutdown do windows. - // Ver o evento WMQueryEndSession. - CanClose := False; - MinimizaParaTrayArea(Nil); -end; - -procedure TFormularioGeral.WMQueryEndSession(var Msg: TWMQueryEndSession); -begin - // Quando há um shutdown do windows em execução, libera o close. - OnCloseQuery := Nil; - FreeAndNil(FUsb); - Application.Terminate; - inherited // Continue ShutDown request -end; - -procedure TFormularioGeral.Mnu_InfosTCPClick(Sender: TObject); -var v_tripa_perfis, v_tripa_infos_coletadas,strAux : string; - v_array_perfis, v_array_tripa_infos_coletadas, v_array_infos_coletadas : tstrings; - v_conta_perfis, v_conta_infos_coletadas, intAux : integer; - v_achei : boolean; -begin - Log_DEBUG('Montando Informações Gerais...'); - FormularioGeral.Enabled := true; - FormularioGeral.Visible := true; - - CipherClose; - CipherOpen; - - ST_VL_NomeHost.Caption := getValorDatMemoria('TcpIp.TE_NOME_HOST' ,v_tstrCipherOpened); - ST_VL_IPEstacao.Caption := getValorDatMemoria('TcpIp.TE_IP' ,v_tstrCipherOpened); - ST_VL_MacAddress.Caption := getValorDatMemoria('TcpIp.TE_NODE_ADDRESS' ,v_tstrCipherOpened); - ST_VL_IPRede.Caption := getValorDatMemoria('TcpIp.ID_IP_REDE' ,v_tstrCipherOpened); - ST_VL_DominioDNS.Caption := getValorDatMemoria('TcpIp.TE_DOMINIO_DNS' ,v_tstrCipherOpened); - ST_VL_DNSPrimario.Caption := getValorDatMemoria('TcpIp.TE_DNS_PRIMARIO' ,v_tstrCipherOpened); - ST_VL_DNSSecundario.Caption := getValorDatMemoria('TcpIp.TE_DNS_SECUNDARIO' ,v_tstrCipherOpened); - ST_VL_Gateway.Caption := getValorDatMemoria('TcpIp.TE_GATEWAY' ,v_tstrCipherOpened); - ST_VL_Mascara.Caption := getValorDatMemoria('TcpIp.TE_MASCARA' ,v_tstrCipherOpened); - ST_VL_ServidorDHCP.Caption := getValorDatMemoria('TcpIp.TE_SERV_DHCP' ,v_tstrCipherOpened); - ST_VL_WinsPrimario.Caption := getValorDatMemoria('TcpIp.TE_WINS_PRIMARIO' ,v_tstrCipherOpened); - ST_VL_WinsSecundario.Caption := getValorDatMemoria('TcpIp.TE_WINS_SECUNDARIO' ,v_tstrCipherOpened); - - // Exibição das informações de Sistemas Monitorados... - v_conta_perfis := 1; - v_conta_infos_coletadas := 0; - v_tripa_perfis := '*'; - - while v_tripa_perfis <> '' do - begin - - v_tripa_perfis := getValorDatMemoria('Coletas.SIS' + trim(inttostr(v_conta_perfis)),v_tstrCipherOpened); - Log_DEBUG('Perfil => Coletas.SIS' + trim(inttostr(v_conta_perfis))+' => '+v_tripa_perfis); - v_conta_perfis := v_conta_perfis + 1; - - if (trim(v_tripa_perfis) <> '') then - Begin - v_array_perfis := explode(v_tripa_perfis,','); - - // ATENÇÃO!!! Antes da implementação de INFORMAÇÕES GERAIS o Count ia até 11, ok?! - if (v_array_perfis.Count > 11) and (v_array_perfis[11]='S') then - Begin - v_tripa_infos_coletadas := getValorDatMemoria('Coletas.Sistemas_Monitorados',v_tstrCipherOpened); - Log_DEBUG('Coletas de S.M. Efetuadas => ' + v_tripa_infos_coletadas); - if (trim(v_tripa_infos_coletadas) <> '') then - Begin - v_array_tripa_infos_coletadas := explode(v_tripa_infos_coletadas,'#'); - for intAux := 0 to v_array_tripa_infos_coletadas.Count-1 Do - Begin - v_array_infos_coletadas := explode(v_array_tripa_infos_coletadas[intAux],','); - - Log_DEBUG('Verificando perfil[0]:' + v_array_perfis[0]); - if (v_array_infos_coletadas[0]=v_array_perfis[0]) then - Begin - Log_DEBUG('Verificando valores condicionais [1]:"'+trim(v_array_infos_coletadas[1])+'" e [3]:"'+trim(v_array_infos_coletadas[3])+'"'); - if ((trim(v_array_infos_coletadas[1])<>'') and (trim(v_array_infos_coletadas[1])<>'?')) or - ((trim(v_array_infos_coletadas[3])<>'') and (trim(v_array_infos_coletadas[3])<>'?')) then - Begin - v_achei := false; - listSistemasMonitorados.Items.Add; - listSistemasMonitorados.Items[v_conta_infos_coletadas].Caption := Format('%2d', [v_conta_infos_coletadas+1])+') '+v_array_perfis[12]; - listSistemasMonitorados.Items[v_conta_infos_coletadas].SubItems.Add(v_array_infos_coletadas[1]); - listSistemasMonitorados.Items[v_conta_infos_coletadas].SubItems.Add(v_array_infos_coletadas[3]); - v_conta_infos_coletadas := v_conta_infos_coletadas + 1; - - End; - End; - Application.ProcessMessages; - End; - End; - End; - End; - end; - - teDataColeta.Caption := '('+FormatDateTime('dd/mm/yyyy', now)+')'; - staticVlServidorAplicacao.Caption := '"'+FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor',v_tstrCipherOpened)+'"'; - staticVlServidorUpdates.Caption := '"'+FormularioGeral.getValorDatMemoria('Configs.Te_Serv_Updates',v_tstrCipherOpened)+'"'; - - strAux := GetValorDatMemoria('Coletas.HOJE', v_tstrCipherOpened); - if (strAux <> '') then - Begin - if (copy(strAux,0,8) = FormatDateTime('yyyymmdd', Date)) then - Begin - // Vamos reaproveitar algumas variáveis!... - - v_array_perfis := explode(strAux,'#'); - for intAux := 1 to v_array_perfis.Count-1 Do - Begin - v_array_infos_coletadas := explode(v_array_perfis[intAux],','); - listaColetas.Items.Add; - listaColetas.Items[intAux-1].Caption := v_array_infos_coletadas[0]; - listaColetas.Items[intAux-1].SubItems.Add(v_array_infos_coletadas[1]); - - // Verifico se houve problema na coleta... - if (v_array_infos_coletadas[2]<>'99999999') then - listaColetas.Items[intAux-1].SubItems.Add(v_array_infos_coletadas[2]) - else - Begin - listaColetas.Items[intAux-1].SubItems.Add('--------'); - v_array_infos_coletadas[3] := v_array_infos_coletadas[2]; - End; - - // Códigos Possíveis: -1 : Problema no Envio da Coleta - // 1 : Coleta Enviada - // 0 : Sem Coleta para Envio - strAux := IfThen(v_array_infos_coletadas[3]='1','Coleta Enviada ao Gerente WEB!', - IfThen(v_array_infos_coletadas[3]='-1','Problema Enviando Coleta ao Gerente WEB!', - IfThen(v_array_infos_coletadas[3]='0','Sem Coleta para Envio ao Gerente WEB!', - IfThen(v_array_infos_coletadas[3]='99999999','Problema no Processo de Coleta!','Status Desconhecido!')))); - listaColetas.Items[intAux-1].SubItems.Add(strAux); - - Application.ProcessMessages; - End; - End - End - else - Begin - listSistemasMonitorados.Items.Add; - listSistemasMonitorados.Items[0].Caption := 'Não Há Coletas Registradas Nesta Data'; - End; - - FormularioGeral.EqualizaInformacoesPatrimoniais; - - strConfigsPatrimonio := GetValorDatMemoria('Patrimonio.Configs', v_tstrCipherOpened); - MontaVetoresPatrimonio(strConfigsPatrimonio); - - if (strConfigsPatrimonio = '') then - lbSemInformacoesPatrimoniais.Visible := true - else - lbSemInformacoesPatrimoniais.Visible := false; - - st_lb_Etiqueta1.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta1', strConfigsPatrimonio)); - st_lb_Etiqueta1.Caption := st_lb_Etiqueta1.Caption + IfThen(st_lb_Etiqueta1.Caption='','',':'); - st_vl_Etiqueta1.Caption := RetornaValorVetorUON1(GetValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1',v_tstrCipherOpened)); - - st_lb_Etiqueta1a.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta1a', strConfigsPatrimonio)); - st_lb_Etiqueta1a.Caption := st_lb_Etiqueta1a.Caption + IfThen(st_lb_Etiqueta1a.Caption='','',':'); - st_vl_Etiqueta1a.Caption := RetornaValorVetorUON1a(GetValorDatMemoria('Patrimonio.id_unid_organizacional_nivel1a',v_tstrCipherOpened)); - - st_lb_Etiqueta2.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta2', strConfigsPatrimonio)); - st_lb_Etiqueta2.Caption := st_lb_Etiqueta2.Caption + IfThen(st_lb_Etiqueta2.Caption='','',':'); - st_vl_Etiqueta2.Caption := RetornaValorVetorUON2(GetValorDatMemoria('Patrimonio.id_unid_organizacional_nivel2',v_tstrCipherOpened),GetValorDatMemoria('Patrimonio.id_local',v_tstrCipherOpened)); - - st_lb_Etiqueta3.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta3', strConfigsPatrimonio)); - st_lb_Etiqueta3.Caption := st_lb_Etiqueta3.Caption + IfThen(st_lb_Etiqueta3.Caption='','',':'); - st_vl_Etiqueta3.Caption := GetValorDatMemoria('Patrimonio.te_localizacao_complementar',v_tstrCipherOpened); - - - FormularioGeral.Log_DEBUG('Decriptografia de in_exibir_etiqueta4 => "'+g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta4', strConfigsPatrimonio))+'"'); - if (g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta4', strConfigsPatrimonio)) = 'S') then - begin - st_lb_Etiqueta4.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta4', strConfigsPatrimonio)); - st_lb_Etiqueta4.Caption := st_lb_Etiqueta4.Caption + IfThen(st_lb_Etiqueta4.Caption='','',':'); - st_lb_Etiqueta4.Visible := true; - st_vl_etiqueta4.Caption := GetValorDatMemoria('Patrimonio.te_info_patrimonio1',v_tstrCipherOpened); - end - else - Begin - st_lb_Etiqueta4.Visible := false; - st_vl_etiqueta4.Visible := false; - End; - - FormularioGeral.Log_DEBUG('Decriptografia de in_exibir_etiqueta5 => "'+g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta5', strConfigsPatrimonio))+'"'); - if (g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta5', strConfigsPatrimonio)) = 'S') then - begin - st_lb_Etiqueta5.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta5', strConfigsPatrimonio)); - st_lb_Etiqueta5.Caption := st_lb_Etiqueta5.Caption + IfThen(st_lb_Etiqueta5.Caption='','',':'); - st_lb_Etiqueta5.Visible := true; - st_vl_etiqueta5.Caption := GetValorDatMemoria('Patrimonio.te_info_patrimonio2',v_tstrCipherOpened); - end - else - Begin - st_lb_Etiqueta5.Visible := false; - st_vl_etiqueta5.Visible := false; - End; - - FormularioGeral.Log_DEBUG('Decriptografia de in_exibir_etiqueta6 => "'+g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta6', strConfigsPatrimonio))+'"'); - if (g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta6', strConfigsPatrimonio)) = 'S') then - begin - st_lb_Etiqueta6.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta6', strConfigsPatrimonio)); - st_lb_Etiqueta6.Caption := st_lb_Etiqueta6.Caption + IfThen(st_lb_Etiqueta6.Caption='','',':'); - st_lb_Etiqueta6.Visible := true; - st_vl_etiqueta6.Caption := GetValorDatMemoria('Patrimonio.te_info_patrimonio3',v_tstrCipherOpened); - end - else - Begin - st_lb_Etiqueta6.Visible := false; - st_vl_etiqueta6.Visible := false; - End; - - FormularioGeral.Log_DEBUG('Decriptografia de in_exibir_etiqueta7 => "'+g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta7', strConfigsPatrimonio))+'"'); - if (g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta7', strConfigsPatrimonio)) = 'S') then - begin - st_lb_Etiqueta7.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta7', strConfigsPatrimonio)); - st_lb_Etiqueta7.Caption := st_lb_Etiqueta7.Caption + IfThen(st_lb_Etiqueta7.Caption='','',':'); - st_lb_Etiqueta7.Visible := true; - st_vl_etiqueta7.Caption := GetValorDatMemoria('Patrimonio.te_info_patrimonio4',v_tstrCipherOpened); - end - else - Begin - st_lb_Etiqueta7.Visible := false; - st_vl_etiqueta7.Visible := false; - End; - - FormularioGeral.Log_DEBUG('Decriptografia de in_exibir_etiqueta8 => "'+g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta8', strConfigsPatrimonio))+'"'); - if (g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta8', strConfigsPatrimonio)) = 'S') then - begin - st_lb_Etiqueta8.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta8', strConfigsPatrimonio)); - st_lb_Etiqueta8.Caption := st_lb_Etiqueta8.Caption + IfThen(st_lb_Etiqueta8.Caption='','',':'); - st_lb_Etiqueta8.Visible := true; - st_vl_etiqueta8.Caption := GetValorDatMemoria('Patrimonio.te_info_patrimonio5',v_tstrCipherOpened); - end - else - Begin - st_lb_Etiqueta8.Visible := false; - st_vl_etiqueta8.Visible := false; - End; - - FormularioGeral.Log_DEBUG('Decriptografia de in_exibir_etiqueta9 => "'+g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta9', strConfigsPatrimonio))+'"'); - if (g_oCacic.deCrypt(XML_RetornaValor('in_exibir_etiqueta9', strConfigsPatrimonio)) = 'S') then - begin - st_lb_Etiqueta9.Caption := g_oCacic.deCrypt(XML_RetornaValor('te_etiqueta9', strConfigsPatrimonio)); - st_lb_Etiqueta9.Caption := st_lb_Etiqueta9.Caption + IfThen(st_lb_Etiqueta9.Caption='','',':'); - st_lb_Etiqueta9.Visible := true; - st_vl_etiqueta9.Caption := GetValorDatMemoria('Patrimonio.te_info_patrimonio6',v_tstrCipherOpened); - end - else - Begin - st_lb_Etiqueta9.Visible := false; - st_vl_etiqueta9.Visible := false; - End; - - - end; - -procedure TFormularioGeral.Bt_Fechar_InfosGeraisClick(Sender: TObject); - begin - FormularioGeral.Enabled := false; - FormularioGeral.Visible := false; - end; - -Function TFormularioGeral.XML_RetornaValor(Tag : String; Fonte : String): String; -VAR - Parser : TXmlParser; -begin - Parser := TXmlParser.Create; - Parser.Normalize := TRUE; - Parser.LoadFromBuffer(PAnsiChar(Fonte)); - Parser.StartScan; - WHILE Parser.Scan DO - Begin - if (Parser.CurPartType in [ptContent, ptCData]) Then // Process Parser.CurContent field here - begin - if (UpperCase(Parser.CurName) = UpperCase(Tag)) then - Result := RemoveZerosFimString(Parser.CurContent); - end; - end; - Parser.Free; - log_DEBUG('XML Parser retornando: "'+Result+'" para Tag "'+Tag+'"'); -end; - -// Solução baixada de http://www.delphidabbler.com/codesnip.php?action=named&routines=URLDecode&showsrc=1 -function TFormularioGeral.URLDecode(const S: string): string; -var - Idx: Integer; // loops thru chars in string - Hex: string; // string of hex characters - Code: Integer; // hex character code (-1 on error) -begin - // Intialise result and string index - Result := ''; - Idx := 1; - // Loop thru string decoding each character - while Idx <= Length(S) do - begin - case S[Idx] of - '%': - begin - // % should be followed by two hex digits - exception otherwise - if Idx <= Length(S) - 2 then - begin - // there are sufficient digits - try to decode hex digits - Hex := S[Idx+1] + S[Idx+2]; - Code := SysUtils.StrToIntDef('$' + Hex, -1); - Inc(Idx, 2); - end - else - // insufficient digits - error - Code := -1; - // check for error and raise exception if found - if Code = -1 then - raise SysUtils.EConvertError.Create( - 'Invalid hex digit in URL' - ); - // decoded OK - add character to result - Result := Result + Chr(Code); - end; - '+': - // + is decoded as a space - Result := Result + ' ' - else - // All other characters pass thru unchanged - Result := Result + S[Idx]; - end; - Inc(Idx); - end; -end; -{ -procedure TFormularioGeral.IdHTTPServerCACICCommandGet( - AThread: TIdPeerThread; ARequestInfo: TIdHTTPRequestInfo; - AResponseInfo: TIdHTTPResponseInfo); -var strXML, - strCmd, - strFileName, - strFileHash : String; - intAux : integer; - boolOK : boolean; -begin - - // ********************************************************************************************************** - // Esta procedure tratará os comandos e suas ações, enviados em um pacote XML na requisição, conforme abaixo: - // ********************************************************************************************************** - // Execute -> Comando que forçará a execução do Gerente de Coletas (Sugestão: Configurar coletas forçadas no Gerente WEB e executar esse comando) - // Requisição: Tag - // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK' - // - // Ask -> Comando que perguntará sobre a existência de um determinado arquivo na estação. - // Requisição: Tag : Nome do arquivo a pesquisar no repositório local - // Tag : Hash referente ao arquivo a ser pesquisado no repositório local - // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK'; - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'Tenho' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'NaoTenho' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'Baixando' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'Ocupado'. - // - // - // Erase -> Comando que provocará a exclusão de determinado arquivo. - // Deverá ser acompanhado das tags e - // Requisição: Tag : Nome do arquivo a ser excluído do repositório local - // Tag : Hash referente ao arquivo a ser excluído do repositório local - // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK'; - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'AcaoExecutada' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'ArquivoNaoEncontrado' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'EscritaNaoPermitida'; - // - // Registry -> Comando que provocará ação no Registry de estações com MS-Windows. - // Deverá ser acompanhado das tags , , e - // Requisição: Tag : Caminho no Registry - // Tag : Ação para execução - // SAVE => Salva o valor contido na tag de acordo com condição contida na tag - // ERASE => Apaga a chave de acordo com condição contida na tag - // Tag : Condiçção para execução da ação - // EQUAL => Se o valor contido na tag for IGUAL ao valor encontrado na chave - // DIFFER => Se o valor contido na tag for DIFERENTE ao valor encontrado na chave - // NONE => Nenhuma condição, permitindo a execução da ação de forma incondicional - // Tag : Valor a ser utilizado na ação - // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK'; - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'AcaoExecutada' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'ChaveNaoEncontrada' ou - // AResponseinfo.ContentText := AResponseinfo.ContentText + 'EscritaNaoPermitida'; - // - // Exit -> Comando para finalização do agente principal (bandeja) - - // Palavra Chave definida por Ger_Cols, enviada e armazenada no BD. A autenticação da comunicação é baseada na verificação deste valor. - // A geração da palavra chave dar-se-á a cada contato do Ger_Cols com o módulo Gerente WEB - // te_palavra_chave -> - - // Tratamento da requisição http... - strXML := URLDecode(ARequestInfo.UnparsedParams); - intAux := Pos('=',strXML); - strXML := copy(strXML,(intAux+1),StrLen(PAnsiChar(strXML))-intAux); - strXML := g_oCacic.deCrypt(strXML); - - - - // Autenticação e tratamento da requisição - if (XML_RetornaValor('te_palavra_chave',strXML) = FormularioGeral.getValorDatMemoria('Configs.te_palavra_chave',v_tstrCipherOpened)) then - Begin - strCmd := XML_RetornaValor('cmd',strXML); - // As ações terão seus valores - - if (strCmd = 'Execute') or - (strCmd = 'Ask') or - (strCmd = 'Erase') or - (strCmd = 'Registry') or - (strCmd = 'Exit') then - AResponseinfo.ContentText := 'OK' - else - AResponseinfo.ContentText := 'COMANDO NÃO RECONHECIDO!'; - End - else - AResponseinfo.ContentText := 'ACESSO NÃO PERMITIDO!'; - - if (strCmd = 'Execute') then - ExecutaCacic(nil) - else if (strCmd = 'Ask') then - Begin - strFileName := XML_RetornaValor('FileName',strXML); - strFileHash := XML_RetornaValor('FileHash',strXML); - End - else if (strCmd = 'Erase') then - else if (strCmd = 'Registry') then - else if (strCmd = 'Exit') then - Finaliza; -end; - -procedure TFormularioGeral.IdFTPServer1UserLogin(ASender: TIdFTPServerThread; const AUsername, APassword: String; var AAuthenticated: Boolean); -begin - AAuthenticated := false; - if (AUsername = 'CACIC') and - (APassword=getValorDatMemoria('Configs.PalavraChave',v_tstrCipherOpened)) then - AAuthenticated := true; -end; -} -procedure TFormularioGeral.Mnu_SuporteRemotoClick(Sender: TObject); -var v_strPalavraChave, - v_strTeSO, - v_strTeNodeAddress, - v_strNuPortaSR, - v_strNuTimeOutSR : String; - intPausaRecupera : integer; - fileAguarde : TextFile; -begin - if boolServerON then // Ordeno ao SrCACICsrv que auto-finalize - Begin - Log_Diario('Desativando Suporte Remoto Seguro.'); - - g_oCacic.createSampleProcess(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe -kill',false,SW_HIDE); - - Try - // Bloqueio o módulo de suporte remoto seguro na FireWall nativa. - g_oCacic.addApplicationToFirewall('srCACIC - Suporte Remoto Seguro do Sistema CACIC',g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe', false); - Except - End; - - boolServerON := false; - End - else - Begin - log_DEBUG('Invocando "'+g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe"...'); - Log_Diario('Ativando Suporte Remoto Seguro.'); - - // Alguns cuidados necessários ao tráfego e recepção de valores pelo Gerente WEB - // Some cares about send and receive at Gerente WEB - // A partir da versão 2.6.0.2 deixo de enviar a palavra chave para que o srCACICsrv busque-a diretamente de cacic2.dat - { - v_strPalavraChave := FormularioGeral.getValorDatMemoria('Configs.te_palavra_chave', v_tstrCipherOpened); - v_strPalavraChave := StringReplace(v_strPalavraChave,' ' ,'' ,[rfReplaceAll]); - v_strPalavraChave := StringReplace(v_strPalavraChave,'"' ,'' ,[rfReplaceAll]); - v_strPalavraChave := StringReplace(v_strPalavraChave,'''' ,'' ,[rfReplaceAll]); - v_strPalavraChave := StringReplace(v_strPalavraChave,'\' ,'' ,[rfReplaceAll]); - v_strPalavraChave := g_oCacic.enCrypt(v_strPalavraChave); - v_strPalavraChave := StringReplace(v_strPalavraChave,'+','',[rfReplaceAll]); - } - - v_strTeSO := trim(StringReplace(FormularioGeral.getValorDatMemoria('Configs.TE_SO', v_tstrCipherOpened),' ','',[rfReplaceAll])); - v_strTeSO := g_oCacic.enCrypt(v_strTeSO); - v_strTeSO := StringReplace(v_strTeSO,'+','',[rfReplaceAll]); - - v_strTeNodeAddress := trim(StringReplace(FormularioGeral.getValorDatMemoria('TcpIp.TE_NODE_ADDRESS' , v_tstrCipherOpened),' ','' ,[rfReplaceAll])); - v_strTeNodeAddress := g_oCacic.enCrypt(v_strTeNodeAddress); - v_strTeNodeAddress := StringReplace(v_strTeNodeAddress,'+','',[rfReplaceAll]); - - v_strNuPortaSR := trim(FormularioGeral.getValorDatMemoria('Configs.NU_PORTA_SRCACIC' , v_tstrCipherOpened)); - v_strNuTimeOutSR := trim(FormularioGeral.getValorDatMemoria('Configs.NU_TIMEOUT_SRCACIC' , v_tstrCipherOpened)); - - // Detectar versão do Windows antes de fazer a chamada seguinte... - try - AssignFile(fileAguarde,g_oCacic.getCacicPath + 'Temp\aguarde_srCACIC.txt'); - {$IOChecks off} - Reset(fileAguarde); {Abre o arquivo texto} - {$IOChecks on} - if (IOResult <> 0) then // Arquivo não existe, será recriado. - begin - Rewrite (fileAguarde); - Append(fileAguarde); - Writeln(fileAguarde,FormatDateTime('dd/mm hh:nn:ss : ', Now) + '======================> Pseudo-Cookie para o srCACICsrv.exe <======================='); - end; - - CloseFile(fileAguarde); - Finally - End; - - log_DEBUG('Verificando validade do módulo srCACICsrv para chamada!'); - - log_DEBUG('g_oCacic.getFileHash('+g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe'+') = "'+g_oCacic.getFileHash(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe'+'"')); - - log_DEBUG('FormularioGeral.GetValorDatMemoria(Configs.TE_HASH_SRCACICSRV) = "'+FormularioGeral.GetValorDatMemoria('Configs.TE_HASH_SRCACICSRV', v_tstrCipherOpened)+'"'); - - // Executarei o srCACICsrv após batimento do HASHCode - if (g_oCacic.getFileHash(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe') = FormularioGeral.GetValorDatMemoria('Configs.TE_HASH_SRCACICSRV', v_tstrCipherOpened)) then - Begin - log_DEBUG('Invocando "'+g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe -start [' + g_oCacic.enCrypt(FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor', v_tstrCipherOpened)) + ']' + - '[' + g_oCacic.enCrypt(FormularioGeral.getValorDatMemoria('Configs.Endereco_WS' , v_tstrCipherOpened)) + ']' + - '[' + v_strTeSO + ']' + - '[' + v_strTeNodeAddress + ']' + -// '[' + v_strPalavraChave + ']' + - '[' + g_oCacic.getCacicPath + ']' + - '[' + v_strNuPortaSR + ']' + - '[' + v_strNuTimeOutSR + ']'); - - Try - // Libero o módulo de suporte remoto seguro na FireWall nativa. - g_oCacic.addApplicationToFirewall('srCACIC - Suporte Remoto Seguro do Sistema CACIC',g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe', true); - Except - End; - - g_oCacic.createSampleProcess(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe -start [' + g_oCacic.enCrypt(FormularioGeral.getValorDatMemoria('Configs.EnderecoServidor', v_tstrCipherOpened)) + ']' + - '[' + g_oCacic.enCrypt(FormularioGeral.getValorDatMemoria('Configs.Endereco_WS' , v_tstrCipherOpened)) + ']' + - '[' + v_strTeSO + ']' + - '[' + v_strTeNodeAddress + ']' + -// '[' + v_strPalavraChave + ']' + - '[' + g_oCacic.getCacicPath + ']' + - '[' + v_strNuPortaSR + ']' + - '[' + v_strNuTimeOutSR + ']',false,SW_NORMAL); - BoolServerON := true; - End - else - Begin - Log_Diario('Execução de srCACICsrv impedida por falta de integridade!'); - Log_Diario('Providenciando nova cópia.'); - Matar(g_oCacic.getCacicPath + 'modulos\','srcacicsrv.exe'); - Invoca_GerCols('recuperaSR'); - intPausaRecupera := 0; - while (intPausaRecupera < 10) do - Begin - Sleep(3000); - if FileExists(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe') then - intPausaRecupera := 10; - inc(intPausaRecupera); - End; - if FileExists(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe') then - Mnu_SuporteRemotoClick(nil); - End; - End; -end; - -procedure TFormularioGeral.Popup_Menu_ContextoPopup(Sender: TObject); -begin - VerificaDebugs; - - if (getValorDatMemoria('Configs.CS_SUPORTE_REMOTO',v_tstrCipherOpened) = 'S') and - (FileExists(g_oCacic.getCacicPath + 'modulos\srcacicsrv.exe')) then - Mnu_SuporteRemoto.Enabled := true - else - Mnu_SuporteRemoto.Enabled := false; - - boolServerON := false; - FormularioGeral.Matar(g_oCacic.getCacicPath+'temp\','aguarde_SRCACIC.txt'); - if FileExists(g_oCacic.getCacicPath + 'temp\aguarde_SRCACIC.txt') then - Begin - if (getValorDatMemoria('Configs.CS_PERMITIR_DESATIVAR_SRCACIC',v_tstrCipherOpened) = 'S') then - Begin - Mnu_SuporteRemoto.Caption := 'Desativar Suporte Remoto'; - Mnu_SuporteRemoto.Enabled := true; - End - else - Begin - Mnu_SuporteRemoto.Caption := 'Suporte Remoto Ativo!'; - Mnu_SuporteRemoto.Enabled := false; - End; - - boolServerON := true; - End - else - Begin - Mnu_SuporteRemoto.Caption := 'Ativar Suporte Remoto'; - HabilitaSuporteRemoto; - End; - -end; - -procedure TFormularioGeral.Timer_InicializaTrayTimer(Sender: TObject); -Begin - - Timer_InicializaTray.Enabled := false; - - g_intTaskBarAtual := FindWindow('Shell_TrayWnd', Nil); - - if ((g_intTaskBarAnterior = 0) and (g_intTaskBarAtual > 0)) or - (boolWinIniChange) then - Begin - InicializaTray; - End; - - g_intTaskBarAnterior := g_intTaskBarAtual; - - Timer_InicializaTray.Enabled := true; -end; -end. -- libgit2 0.21.2