Commit f6856e6c927c5ab217b61bf73b3377a1113172e1
1 parent
ed7f3d97
Exists in
master
Update main.pas
Showing
1 changed file
with
231 additions
and
232 deletions
Show diff stats
main.pas
| 1 | 1 | (** |
| 2 | 2 | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 3 | -Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
| 3 | +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informa��es da Previd�ncia Social, Brasil | |
| 4 | 4 | |
| 5 | -Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
| 5 | +Este arquivo � parte do programa CACIC - Configurador Autom�tico e Coletor de Informa��es Computacionais | |
| 6 | 6 | |
| 7 | -O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
| 8 | -publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. | |
| 7 | +O CACIC � um software livre; voc� pode redistribui-lo e/ou modifica-lo dentro dos termos da Licen�a P�blica Geral GNU como | |
| 8 | +publicada pela Funda��o do Software Livre (FSF); na vers�o 2 da Licen�a, ou (na sua opini�o) qualquer vers�o. | |
| 9 | 9 | |
| 10 | -Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
| 11 | -MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
| 10 | +Este programa � distribuido na esperan�a que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUA��O a qualquer | |
| 11 | +MERCADO ou APLICA��O EM PARTICULAR. Veja a Licen�a P�blica Geral GNU para maiores detalhes. | |
| 12 | 12 | |
| 13 | -Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
| 13 | +Voc� deve ter recebido uma c�pia da Licen�a P�blica Geral GNU, sob o t�tulo "LICENCA.txt", junto com este programa, se n�o, escreva para a Funda��o do Software | |
| 14 | 14 | Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 15 | 15 | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 16 | 16 | *) |
| ... | ... | @@ -53,13 +53,13 @@ const |
| 53 | 53 | GBYTE = MBYTE shl 10; |
| 54 | 54 | NORMAL = 0; // Normal |
| 55 | 55 | COLETANDO = 1; // Raio - Coletando |
| 56 | - DESCONFIGURADO = 2; // Interrogação - Identificando Host | |
| 56 | + DESCONFIGURADO = 2; // Interroga��o - Identificando Host | |
| 57 | 57 | EM_SUPORTE = 3; // Telefone - Em Suporte Remoto |
| 58 | - LEFT_MENU_ITEM = 13; // Coordenada X para escrita das opções do menu de contexto | |
| 58 | + LEFT_MENU_ITEM = 13; // Coordenada X para escrita das op��es do menu de contexto | |
| 59 | 59 | |
| 60 | 60 | |
| 61 | 61 | |
| 62 | -// Declaração das variáveis globais. | |
| 62 | +// Declara��o das vari�veis globais. | |
| 63 | 63 | var strConfigsPatrimonio, |
| 64 | 64 | strMenuCaptionLAT, |
| 65 | 65 | strMenuCaptionCON, |
| ... | ... | @@ -280,7 +280,7 @@ type |
| 280 | 280 | procedure Invoca_MapaCacic; |
| 281 | 281 | procedure CheckIfDownloadedVersion; |
| 282 | 282 | procedure WMSysCommand(var Msg: TWMSysCommand); message WM_SYSCOMMAND; |
| 283 | - // A procedure WMQueryEndSession é usada para detectar o | |
| 283 | + // A procedure WMQueryEndSession � usada para detectar o | |
| 284 | 284 | // Shutdown do Windows e "derrubar" o Cacic. |
| 285 | 285 | procedure WMQueryEndSession(var Msg : TWMQueryEndSession); Message WM_QUERYENDSESSION; |
| 286 | 286 | procedure WMMENUSELECT(var msg: TWMMENUSELECT); message WM_MENUSELECT; |
| ... | ... | @@ -490,15 +490,15 @@ begin |
| 490 | 490 | if Result then |
| 491 | 491 | objCACIC.writeDebugLog('ServiceStart: ' + sService + ' - OK!') |
| 492 | 492 | else |
| 493 | - objCACIC.writeDebugLog('ServiceStart: ' + sService + ' - Não Foi Possível Iniciar!'); | |
| 493 | + objCACIC.writeDebugLog('ServiceStart: ' + sService + ' - N�o Foi Poss�vel Iniciar!'); | |
| 494 | 494 | end; |
| 495 | 495 | |
| 496 | -// Início de Procedimentos para monitoramento de dispositivos USB - Anderson Peterle - 02/2010 | |
| 496 | +// In�cio de Procedimentos para monitoramento de dispositivos USB - Anderson Peterle - 02/2010 | |
| 497 | 497 | procedure TFormularioGeral.UsbIN(ASender : TObject; const ADevType,AVendorID,ADeviceID : string); |
| 498 | 498 | begin |
| 499 | 499 | // Envio de valores ao Gerente WEB |
| 500 | 500 | // Formato: USBinfo=I_ddmmyyyyhhnnss_ADeviceID |
| 501 | - // Os valores serão armazenados localmente (cacic280.inf) se for impossível o envio. | |
| 501 | + // Os valores ser�o armazenados localmente (cacic280.inf) se for imposs�vel o envio. | |
| 502 | 502 | objCACIC.writeDebugLog('UsbIN: << USB INSERIDO .:. Vendor ID => ' + AVendorID + ' .:. Device ID = ' + ADeviceID); |
| 503 | 503 | Invoca_GerCols('USBinfo=I_'+FormatDateTime('yyyymmddhhnnss', now) + '_' + AVendorID + '_' + ADeviceID, false, false); |
| 504 | 504 | end; |
| ... | ... | @@ -508,7 +508,7 @@ procedure TFormularioGeral.UsbOUT(ASender : TObject; const ADevType,AVendorID,AD |
| 508 | 508 | begin |
| 509 | 509 | // Envio de valores ao Gerente WEB |
| 510 | 510 | // Formato: USBinfo=O_ddmmyyyyhhnnss_ADeviceID |
| 511 | - // Os valores serão armazenados localmente (cacic280.inf) se for impossível o envio. | |
| 511 | + // Os valores ser�o armazenados localmente (cacic280.inf) se for imposs�vel o envio. | |
| 512 | 512 | objCACIC.writeDebugLog('UsbOUT: >> USB REMOVIDO .:. Vendor ID => ' + AVendorID + ' .:. Device ID = ' + ADeviceID); |
| 513 | 513 | Invoca_GerCols('USBinfo=O_'+FormatDateTime('yyyymmddhhnnss', now) + '_' + AVendorID + '_' + ADeviceID, false, false); |
| 514 | 514 | end; |
| ... | ... | @@ -529,7 +529,7 @@ begin |
| 529 | 529 | Parser.LoadFromBuffer(PAnsiChar(p_strConfigs)); |
| 530 | 530 | objCACIC.writeDebugLog('MontaVetoresPatrimonio: p_strConfigs: '+p_strConfigs); |
| 531 | 531 | |
| 532 | - // Código para montar o vetor UON1 | |
| 532 | + // C�digo para montar o vetor UON1 | |
| 533 | 533 | Parser.StartScan; |
| 534 | 534 | i := -1; |
| 535 | 535 | strItemName := ''; |
| ... | ... | @@ -540,7 +540,7 @@ begin |
| 540 | 540 | if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1') Then |
| 541 | 541 | Begin |
| 542 | 542 | i := i + 1; |
| 543 | - SetLength(VetorUON1, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. | |
| 543 | + SetLength(VetorUON1, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o n�mero de itens recebidos. | |
| 544 | 544 | strTagName := 'IT1'; |
| 545 | 545 | end |
| 546 | 546 | else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1') then |
| ... | ... | @@ -561,7 +561,7 @@ begin |
| 561 | 561 | End; |
| 562 | 562 | End; |
| 563 | 563 | |
| 564 | - // Código para montar o vetor UON1a | |
| 564 | + // C�digo para montar o vetor UON1a | |
| 565 | 565 | Parser.StartScan; |
| 566 | 566 | strTagName := ''; |
| 567 | 567 | strAux1 := ''; |
| ... | ... | @@ -572,7 +572,7 @@ begin |
| 572 | 572 | if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT1A') Then |
| 573 | 573 | Begin |
| 574 | 574 | i := i + 1; |
| 575 | - SetLength(VetorUON1a, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. | |
| 575 | + SetLength(VetorUON1a, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o n�mero de itens recebidos. | |
| 576 | 576 | strTagName := 'IT1A'; |
| 577 | 577 | end |
| 578 | 578 | else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT1A') then |
| ... | ... | @@ -608,7 +608,7 @@ begin |
| 608 | 608 | End; |
| 609 | 609 | end; |
| 610 | 610 | |
| 611 | - // Código para montar o vetor UON2 | |
| 611 | + // C�digo para montar o vetor UON2 | |
| 612 | 612 | Parser.StartScan; |
| 613 | 613 | strTagName := ''; |
| 614 | 614 | i := -1; |
| ... | ... | @@ -618,7 +618,7 @@ begin |
| 618 | 618 | if (Parser.CurPartType = ptStartTag) and (strItemName = 'IT2') Then |
| 619 | 619 | Begin |
| 620 | 620 | i := i + 1; |
| 621 | - SetLength(VetorUON2, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o número de itens recebidos. | |
| 621 | + SetLength(VetorUON2, i + 1); // Aumento o tamanho da matriz dinamicamente de acordo com o n�mero de itens recebidos. | |
| 622 | 622 | strTagName := 'IT2'; |
| 623 | 623 | end |
| 624 | 624 | else if (Parser.CurPartType = ptEndTag) and (strItemName = 'IT2') then |
| ... | ... | @@ -654,7 +654,7 @@ end; |
| 654 | 654 | } |
| 655 | 655 | function TFormularioGeral.ActualActivity : integer; |
| 656 | 656 | Begin |
| 657 | - // Se eu conseguir matar os arquivos abaixo é porque srCACICsrv, GerCols e mapaCACIC já finalizaram suas atividades... | |
| 657 | + // Se eu conseguir matar os arquivos abaixo � porque srCACICsrv, GerCols e mapaCACIC j� finalizaram suas atividades... | |
| 658 | 658 | objCACIC.writeDebugLog('ActualActivity: BEGIN'); |
| 659 | 659 | |
| 660 | 660 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'Temp\aguarde_GER.txt'); |
| ... | ... | @@ -689,10 +689,10 @@ Begin |
| 689 | 689 | |
| 690 | 690 | if (FormularioGeral.ActualActivity = 0) then |
| 691 | 691 | Begin |
| 692 | - // Verificação das janelas abertas para que não aconteça coletas caso haja aplicações pesadas rodando (configurado no Módulo Gerente) | |
| 692 | + // Verifica��o das janelas abertas para que n�o aconte�a coletas caso haja aplica��es pesadas rodando (configurado no M�dulo Gerente) | |
| 693 | 693 | v_JANELAS_EXCECAO := objCACIC.GetValueFromFile('Configs','TeJanelasExcecao', FormularioGeral.strMainProgramInfFileName); |
| 694 | 694 | |
| 695 | - objCACIC.writeDebugLog('Pode_Coletar: Verificando Janelas para Exceção...'); | |
| 695 | + objCACIC.writeDebugLog('Pode_Coletar: Verificando Janelas para Exce��o...'); | |
| 696 | 696 | tstrJANELAS := TStrings.Create; |
| 697 | 697 | if (v_JANELAS_EXCECAO <> '') then |
| 698 | 698 | Begin |
| ... | ... | @@ -707,28 +707,28 @@ Begin |
| 707 | 707 | End; |
| 708 | 708 | End; |
| 709 | 709 | |
| 710 | - // Caso alguma janela tenha algum nome de aplicação cadastrada como "crítica" ou "pesada"... | |
| 710 | + // Caso alguma janela tenha algum nome de aplica��o cadastrada como "cr�tica" ou "pesada"... | |
| 711 | 711 | if (intContaJANELAS > 0) then |
| 712 | 712 | Begin |
| 713 | - objCACIC.writeDailyLog('EXECUÇÃO DE ATIVIDADES ADIADA!'); | |
| 713 | + objCACIC.writeDailyLog('EXECU��O DE ATIVIDADES ADIADA!'); | |
| 714 | 714 | v_contador := 0; |
| 715 | 715 | v_plural1 := ''; |
| 716 | - v_plural2 := 'ÃO'; | |
| 716 | + v_plural2 := '�O'; | |
| 717 | 717 | for intAux := 0 to tstrJANELAS.Count-1 Do |
| 718 | 718 | Begin |
| 719 | 719 | h := FormularioGeral.FindWindowByTitle(tstrJANELAS[intAux]); |
| 720 | 720 | if h <> 0 then |
| 721 | 721 | Begin |
| 722 | 722 | v_contador := v_contador + 1; |
| 723 | - objCACIC.writeDailyLog('Aplicação/Janela ' + inttostr(v_contador) + ': ' + tstrJANELAS[intAux]); | |
| 723 | + objCACIC.writeDailyLog('Aplica��o/Janela ' + inttostr(v_contador) + ': ' + tstrJANELAS[intAux]); | |
| 724 | 724 | End; |
| 725 | 725 | End; |
| 726 | 726 | if (v_contador > 1) then |
| 727 | 727 | Begin |
| 728 | 728 | v_plural1 := 'S'; |
| 729 | - v_plural2 := 'ÕES'; | |
| 729 | + v_plural2 := '�ES'; | |
| 730 | 730 | End; |
| 731 | - objCACIC.writeDailyLog('-> PARA PROCEDER, FINALIZE A' + v_plural1 + ' APLICAÇ' + v_plural2 + ' LISTADA' + v_plural1 + ' ACIMA.'); | |
| 731 | + objCACIC.writeDailyLog('-> PARA PROCEDER, FINALIZE A' + v_plural1 + ' APLICA�' + v_plural2 + ' LISTADA' + v_plural1 + ' ACIMA.'); | |
| 732 | 732 | End; |
| 733 | 733 | End; |
| 734 | 734 | |
| ... | ... | @@ -736,7 +736,7 @@ Begin |
| 736 | 736 | Result := true |
| 737 | 737 | else |
| 738 | 738 | Begin |
| 739 | - objCACIC.writeDebugLog('Pode_Coletar: A Ação foi NEGADA!'); | |
| 739 | + objCACIC.writeDebugLog('Pode_Coletar: A A��o foi NEGADA!'); | |
| 740 | 740 | if (intContaJANELAS=0) then |
| 741 | 741 | Begin |
| 742 | 742 | if (FileExists(objCACIC.getLocalFolderName + 'Temp\aguarde_GER.txt')) then |
| ... | ... | @@ -746,7 +746,7 @@ Begin |
| 746 | 746 | objCACIC.writeDebugLog('Pode_Coletar: Suporte Remoto em atividade.'); |
| 747 | 747 | |
| 748 | 748 | if (FileExists(objCACIC.getLocalFolderName + 'Temp\aguarde_MAPACACIC.txt')) then |
| 749 | - objCACIC.writeDebugLog('Pode_Coletar: Módulo Avulso para Coleta de Patrimônio em atividade.'); | |
| 749 | + objCACIC.writeDebugLog('Pode_Coletar: M�dulo Avulso para Coleta de Patrim�nio em atividade.'); | |
| 750 | 750 | End; |
| 751 | 751 | //else |
| 752 | 752 | // objCACIC.cipherClose(objCACIC.getLocalFolderName + objCACIC.getDatFileName,v_tstrCipherOpened); |
| ... | ... | @@ -798,13 +798,13 @@ begin |
| 798 | 798 | IsMenuOpen := not ((msg.MenuFlag and $FFFF > 0) and (msg.Menu = 0)); |
| 799 | 799 | end; |
| 800 | 800 | |
| 801 | -// Verifico a existência do Gerente de Coletas, caso não exista, o chksis.exe fará download! | |
| 801 | +// Verifico a exist�ncia do Gerente de Coletas, caso n�o exista, o chksis.exe far� download! | |
| 802 | 802 | function TFormularioGeral.ChecaMAPACACIC : boolean; |
| 803 | 803 | var strFileSize : String; |
| 804 | 804 | Begin |
| 805 | 805 | Result := true; |
| 806 | 806 | |
| 807 | - objCACIC.writeDebugLog('ChecaMAPA: Verificando existência e tamanho do Gerente de Coletas...'); | |
| 807 | + objCACIC.writeDebugLog('ChecaMAPA: Verificando exist�ncia e tamanho do Gerente de Coletas...'); | |
| 808 | 808 | |
| 809 | 809 | strFileSize := objCACIC.getFileSize(objCACIC.getLocalFolderName + 'Modules\mapacacic.exe',true); |
| 810 | 810 | |
| ... | ... | @@ -818,7 +818,7 @@ Begin |
| 818 | 818 | InicializaTray; |
| 819 | 819 | |
| 820 | 820 | objCACIC.writeDailyLog('Acionando Recuperador de Mapa Cacic.'); |
| 821 | - objCACIC.writeDebugLog('ChecaMAPACACIC: Acionando Recuperador de Módulo Gerente de Coletas: '+objCACIC.getWinDir + 'chksis.exe'); | |
| 821 | + objCACIC.writeDebugLog('ChecaMAPACACIC: Acionando Recuperador de M�dulo Gerente de Coletas: '+objCACIC.getWinDir + 'chksis.exe'); | |
| 822 | 822 | objCACIC.createOneProcess(objCACIC.getWinDir + 'chksis.exe',false,SW_HIDE); |
| 823 | 823 | |
| 824 | 824 | sleep(30000); // 30 segundos de espera para download do gercols.exe |
| ... | ... | @@ -826,27 +826,27 @@ Begin |
| 826 | 826 | strFileSize := objCACIC.getFileSize(objCACIC.getLocalFolderName + '\Modules\mapacacic.exe',true); |
| 827 | 827 | if not(strFileSize = '0') and not(strFileSize = '-1') then |
| 828 | 828 | Begin |
| 829 | - objCACIC.writeDailyLog('Módulo Mapa Cacic RECUPERADO COM SUCESSO!'); | |
| 830 | - objCACIC.writeDebugLog('ChecaMAPACACIC: Módulo Gerente de Coletas RECUPERADO COM SUCESSO!'); | |
| 829 | + objCACIC.writeDailyLog('M�dulo Mapa Cacic RECUPERADO COM SUCESSO!'); | |
| 830 | + objCACIC.writeDebugLog('ChecaMAPACACIC: M�dulo Gerente de Coletas RECUPERADO COM SUCESSO!'); | |
| 831 | 831 | InicializaTray; |
| 832 | 832 | Result := True; |
| 833 | 833 | End |
| 834 | 834 | else |
| 835 | 835 | Begin |
| 836 | - objCACIC.writeDailyLog('Módulo Mapa Cacic NÃO RECUPERADO!'); | |
| 837 | - objCACIC.writeDebugLog('ChecaMAPACACIC: Módulo Gerente de Coletas NÃO RECUPERADO!'); | |
| 836 | + objCACIC.writeDailyLog('M�dulo Mapa Cacic N�O RECUPERADO!'); | |
| 837 | + objCACIC.writeDebugLog('ChecaMAPACACIC: M�dulo Gerente de Coletas N�O RECUPERADO!'); | |
| 838 | 838 | End; |
| 839 | 839 | objCACIC.writeDebugLog('ChecaMAPACACIC: ' + DupeString('=',100)); |
| 840 | 840 | end; |
| 841 | 841 | End; |
| 842 | 842 | |
| 843 | -// Verifico a existência do Gerente de Coletas, caso não exista, o chksis.exe fará download! | |
| 843 | +// Verifico a exist�ncia do Gerente de Coletas, caso n�o exista, o chksis.exe far� download! | |
| 844 | 844 | function TFormularioGeral.ChecaGERCOLS : boolean; |
| 845 | 845 | var strFileSize : String; |
| 846 | 846 | Begin |
| 847 | 847 | Result := true; |
| 848 | 848 | |
| 849 | - objCACIC.writeDebugLog('ChecaGERCOLS: Verificando existência e tamanho do Gerente de Coletas...'); | |
| 849 | + objCACIC.writeDebugLog('ChecaGERCOLS: Verificando exist�ncia e tamanho do Gerente de Coletas...'); | |
| 850 | 850 | |
| 851 | 851 | strFileSize := objCACIC.getFileSize(objCACIC.getLocalFolderName + 'Modules\gercols.exe',true); |
| 852 | 852 | |
| ... | ... | @@ -858,8 +858,8 @@ Begin |
| 858 | 858 | |
| 859 | 859 | InicializaTray; |
| 860 | 860 | |
| 861 | - objCACIC.writeDailyLog('Acionando Recuperador de Módulo Gerente de Coletas.'); | |
| 862 | - objCACIC.writeDebugLog('ChecaGERCOLS: Acionando Recuperador de Módulo Gerente de Coletas: '+objCACIC.getWinDir + 'chksis.exe'); | |
| 861 | + objCACIC.writeDailyLog('Acionando Recuperador de M�dulo Gerente de Coletas.'); | |
| 862 | + objCACIC.writeDebugLog('ChecaGERCOLS: Acionando Recuperador de M�dulo Gerente de Coletas: '+objCACIC.getWinDir + 'chksis.exe'); | |
| 863 | 863 | objCACIC.createOneProcess(objCACIC.getWinDir + 'chksis.exe',false,SW_HIDE); |
| 864 | 864 | |
| 865 | 865 | sleep(30000); // 30 segundos de espera para download do gercols.exe |
| ... | ... | @@ -867,15 +867,15 @@ Begin |
| 867 | 867 | strFileSize := objCACIC.getFileSize(objCACIC.getLocalFolderName + '\Modules\gercols.exe',true); |
| 868 | 868 | if not(strFileSize = '0') and not(strFileSize = '-1') then |
| 869 | 869 | Begin |
| 870 | - objCACIC.writeDailyLog('Módulo Gerente de Coletas RECUPERADO COM SUCESSO!'); | |
| 871 | - objCACIC.writeDebugLog('ChecaGERCOLS: Módulo Gerente de Coletas RECUPERADO COM SUCESSO!'); | |
| 870 | + objCACIC.writeDailyLog('M�dulo Gerente de Coletas RECUPERADO COM SUCESSO!'); | |
| 871 | + objCACIC.writeDebugLog('ChecaGERCOLS: M�dulo Gerente de Coletas RECUPERADO COM SUCESSO!'); | |
| 872 | 872 | InicializaTray; |
| 873 | 873 | Result := True; |
| 874 | 874 | End |
| 875 | 875 | else |
| 876 | 876 | Begin |
| 877 | - objCACIC.writeDailyLog('Módulo Gerente de Coletas NÃO RECUPERADO!'); | |
| 878 | - objCACIC.writeDebugLog('ChecaGERCOLS: Módulo Gerente de Coletas NÃO RECUPERADO!'); | |
| 877 | + objCACIC.writeDailyLog('M�dulo Gerente de Coletas N�O RECUPERADO!'); | |
| 878 | + objCACIC.writeDebugLog('ChecaGERCOLS: M�dulo Gerente de Coletas N�O RECUPERADO!'); | |
| 879 | 879 | End; |
| 880 | 880 | End; |
| 881 | 881 | objCACIC.writeDebugLog('ChecaGERCOLS: ' + DupeString('=',100)); |
| ... | ... | @@ -884,8 +884,8 @@ End; |
| 884 | 884 | |
| 885 | 885 | procedure ExibirConfiguracoes(Sender: TObject); |
| 886 | 886 | begin |
| 887 | - // SJI = Senha Já Informada... | |
| 888 | - // Esse valor é inicializado com "N" | |
| 887 | + // SJI = Senha J� Informada... | |
| 888 | + // Esse valor � inicializado com "N" | |
| 889 | 889 | if (objCACIC.deCrypt( objCACIC.GetValueFromFile('Configs','SJI',FormularioGeral.strMainProgramInfFileName)) = '') and |
| 890 | 890 | (objCACIC.GetValueFromFile('Configs','WebManagerAddress',FormularioGeral.strChkSisInfFileName) <> '') then |
| 891 | 891 | begin |
| ... | ... | @@ -903,7 +903,7 @@ end; |
| 903 | 903 | |
| 904 | 904 | procedure TFormularioGeral.CriaFormSenha(Sender: TObject); |
| 905 | 905 | begin |
| 906 | - // Caso ainda não exista senha para administração do CACIC, define ADMINCACIC como inicial. | |
| 906 | + // Caso ainda n�o exista senha para administra��o do CACIC, define ADMINCACIC como inicial. | |
| 907 | 907 | if (objCACIC.deCrypt( objCACIC.GetValueFromFile('Configs','TeSenhaAdmAgente',FormularioGeral.strMainProgramInfFileName),false,true) = '') Then |
| 908 | 908 | objCACIC.setValueToFile('Configs','TeSenhaAdmAgente', objCACIC.enCrypt('ADMINCACIC'), FormularioGeral.strMainProgramInfFileName); |
| 909 | 909 | |
| ... | ... | @@ -914,17 +914,17 @@ procedure TFormularioGeral.ChecaCONFIGS; |
| 914 | 914 | var strAux : string; |
| 915 | 915 | Begin |
| 916 | 916 | |
| 917 | - // Verifico se o endereço do servidor do cacic foi configurado. | |
| 917 | + // Verifico se o endere�o do servidor do cacic foi configurado. | |
| 918 | 918 | if (objCACIC.GetValueFromFile('Configs','WebManagerAddress',strChkSisInfFileName) = '') then |
| 919 | 919 | Begin |
| 920 | 920 | strAux := objCACIC.fixWebAddress(objCACIC.GetValueFromFile('Configs','WebManagerAddress', strChkSisInfFileName)); |
| 921 | 921 | |
| 922 | 922 | if (strAux = '') then |
| 923 | 923 | begin |
| 924 | - strAux := 'ATENÇÃO: Endereço do servidor do CACIC ainda não foi configurado.'; | |
| 924 | + strAux := 'ATEN��O: Endere�o do servidor do CACIC ainda n�o foi configurado.'; | |
| 925 | 925 | objCACIC.writeDailyLog(strAux); |
| 926 | - objCACIC.writeDailyLog('Ativando módulo de configuração de endereço de servidor.'); | |
| 927 | - MessageDlg(strAux + chr(13) + 'Por favor, informe o endereço do servidor do CACIC na tela que será exibida a seguir.', mtWarning, [mbOk], 0); | |
| 926 | + objCACIC.writeDailyLog('Ativando m�dulo de configura��o de endere�o de servidor.'); | |
| 927 | + MessageDlg(strAux + chr(13) + 'Por favor, informe o endere�o do servidor do CACIC na tela que ser� exibida a seguir.', mtWarning, [mbOk], 0); | |
| 928 | 928 | ExibirConfiguracoes(Nil); |
| 929 | 929 | end; |
| 930 | 930 | End; |
| ... | ... | @@ -932,7 +932,7 @@ end; |
| 932 | 932 | |
| 933 | 933 | procedure TFormularioGeral.HabilitaInformacoesGerais; |
| 934 | 934 | Begin |
| 935 | - // Desabilita/Habilita a opção de Informações Gerais | |
| 935 | + // Desabilita/Habilita a op��o de Informa��es Gerais | |
| 936 | 936 | Mnu_InformacoesGerais.Enabled := (objCACIC.getValueFromTags('Caption' ,strWin32_ComputerSystem) + |
| 937 | 937 | objCACIC.getValueFromTags('IPAddress' ,strWin32_NetworkAdapterConfiguration) + |
| 938 | 938 | objCACIC.getValueFromTags('DNSDomain' ,strWin32_NetworkAdapterConfiguration) + |
| ... | ... | @@ -947,7 +947,7 @@ End; |
| 947 | 947 | |
| 948 | 948 | procedure TFormularioGeral.HabilitaSuporteRemoto; |
| 949 | 949 | Begin |
| 950 | - // Desabilita/Habilita a opção de Suporte Remoto | |
| 950 | + // Desabilita/Habilita a op��o de Suporte Remoto | |
| 951 | 951 | Mnu_SuporteRemoto.Enabled := (objCACIC.GetValueFromFile('Configs','CsSuporteRemoto',strMainProgramInfFileName) = 'S') and (FileExists(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe')); |
| 952 | 952 | End; |
| 953 | 953 | |
| ... | ... | @@ -955,8 +955,8 @@ function TFormularioGeral.Posso_Rodar : boolean; |
| 955 | 955 | Begin |
| 956 | 956 | result := false; |
| 957 | 957 | |
| 958 | - objCACIC.writeDebugLog('Posso_Rodar: Verificando concomitância de sessões'); | |
| 959 | - // Se eu conseguir matar o arquivo abaixo é porque não há outra sessão deste agente aberta... (POG? Nããão! :) ) | |
| 958 | + objCACIC.writeDebugLog('Posso_Rodar: Verificando concomit�ncia de sess�es'); | |
| 959 | + // Se eu conseguir matar o arquivo abaixo � porque n�o h� outra sess�o deste agente aberta... (POG? N���o! :) ) | |
| 960 | 960 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'aguarde_CACIC.txt'); |
| 961 | 961 | |
| 962 | 962 | Result := not (FileExists(objCACIC.getLocalFolderName + 'aguarde_CACIC.txt')); |
| ... | ... | @@ -979,7 +979,7 @@ begin |
| 979 | 979 | |
| 980 | 980 | bl_primeira_execucao := true; |
| 981 | 981 | |
| 982 | - // A verificação dupla é uma solução de contorno para o caso de o boolCipher ter sido setado após criptografia/deCriptografia do dado gravado | |
| 982 | + // A verifica��o dupla � uma solu��o de contorno para o caso de o boolCipher ter sido setado ap�s criptografia/deCriptografia do dado gravado | |
| 983 | 983 | if (objCACIC.deCrypt( objCACIC.getValueFromFile('Hash-Codes',objCACIC.getMainProgramName,strChkSisInfFileName),false,true) = objCACIC.getFileHash(ParamStr(0))) then |
| 984 | 984 | Begin |
| 985 | 985 | objCACIC.setMainProgramHash(objCACIC.getFileHash(ParamStr(0))); |
| ... | ... | @@ -995,8 +995,8 @@ begin |
| 995 | 995 | strWin32_NetworkAdapterConfiguration := fetchWMIvalues('Win32_NetworkAdapterConfiguration', objCACIC.getLocalFolderName); |
| 996 | 996 | strWin32_ComputerSystem := fetchWMIvalues('Win32_ComputerSystem', objCACIC.getLocalFolderName); |
| 997 | 997 | |
| 998 | - //Correção do bug do script net logon da pgfn; | |
| 999 | - //O script estava instalando o cacic sem interação com desktop, | |
| 998 | + //Corre��o do bug do script net logon da pgfn; | |
| 999 | + //O script estava instalando o cacic sem intera��o com desktop, | |
| 1000 | 1000 | //bugando o mapa e o trayicon. |
| 1001 | 1001 | |
| 1002 | 1002 | {*** 1 = SERVICE_STOPPED ***} |
| ... | ... | @@ -1007,21 +1007,21 @@ begin |
| 1007 | 1007 | {*** 6 = SERVICE_PAUSE_PENDING ***} |
| 1008 | 1008 | {*** 7 = SERVICE_PAUSED ***} |
| 1009 | 1009 | |
| 1010 | - // Verifico se o serviço está instalado/rodando,etc. | |
| 1010 | + // Verifico se o servi�o est� instalado/rodando,etc. | |
| 1011 | 1011 | wordServiceStatus := objCacic.ServiceGetStatus(nil,'CacicSustainService'); |
| 1012 | 1012 | |
| 1013 | - //Verifico o serviço para correção de bug | |
| 1014 | - // Verifico se o serviço está instalado/rodando,etc. | |
| 1013 | + //Verifico o servi�o para corre��o de bug | |
| 1014 | + // Verifico se o servi�o est� instalado/rodando,etc. | |
| 1015 | 1015 | |
| 1016 | 1016 | if wordServiceStatus <> 0 then |
| 1017 | 1017 | begin |
| 1018 | - //verifica o status, se não estiver correto altera | |
| 1018 | + //verifica o status, se n�o estiver correto altera | |
| 1019 | 1019 | serviceType := objCacic.serviceGetType('', 'CacicSustainService'); |
| 1020 | 1020 | end; |
| 1021 | 1021 | |
| 1022 | 1022 | if (wordServiceStatus = 0) then |
| 1023 | 1023 | Begin |
| 1024 | - // Instalo e Habilito o serviço | |
| 1024 | + // Instalo e Habilito o servi�o | |
| 1025 | 1025 | objCacic.createOneProcess(objCacic.getWinDir + 'cacicservice.exe /install /silent',true); |
| 1026 | 1026 | End |
| 1027 | 1027 | else if (wordServiceStatus < 4) then |
| ... | ... | @@ -1042,22 +1042,22 @@ begin |
| 1042 | 1042 | imgIconList.GetIcon(0,TrayIcon1.Icon); |
| 1043 | 1043 | TrayIcon1.Show; |
| 1044 | 1044 | |
| 1045 | - // Criação do objeto para monitoramento de dispositivos USB | |
| 1045 | + // Cria��o do objeto para monitoramento de dispositivos USB | |
| 1046 | 1046 | FUsb := TUsbClass.Create; |
| 1047 | 1047 | FUsb.OnUsbInsertion := UsbIN; |
| 1048 | 1048 | FUsb.OnUsbRemoval := UsbOUT; |
| 1049 | 1049 | |
| 1050 | - // Essas variáveis ajudarão a controlar o redesenho do ícone no systray, | |
| 1050 | + // Essas vari�veis ajudar�o a controlar o redesenho do �cone no systray, | |
| 1051 | 1051 | // evitando o "roubo" do foco. |
| 1052 | 1052 | g_intTaskBarAtual := 0; |
| 1053 | 1053 | g_intTaskBarAnterior := 0; |
| 1054 | 1054 | g_intDesktopWindow := 0; |
| 1055 | 1055 | |
| 1056 | - // Não mostrar o formulário... | |
| 1056 | + // N�o mostrar o formul�rio... | |
| 1057 | 1057 | Application.ShowMainForm := false; |
| 1058 | 1058 | g_intStatusAnterior := -1; |
| 1059 | 1059 | |
| 1060 | - // Aplicar traduções GetText,etc... | |
| 1060 | + // Aplicar tradu��es GetText,etc... | |
| 1061 | 1061 | |
| 1062 | 1062 | strMenuCaptionLAT := Mnu_LogAtividades.Caption; |
| 1063 | 1063 | strMenuCaptionCON := Mnu_Configuracoes.Caption; |
| ... | ... | @@ -1069,7 +1069,7 @@ begin |
| 1069 | 1069 | |
| 1070 | 1070 | Try |
| 1071 | 1071 | |
| 1072 | - // Apago o indicador de finalização normal | |
| 1072 | + // Apago o indicador de finaliza��o normal | |
| 1073 | 1073 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'normal_CACIC.txt'); |
| 1074 | 1074 | |
| 1075 | 1075 | if not DirectoryExists(objCACIC.getLocalFolderName + 'Temp') then |
| ... | ... | @@ -1090,21 +1090,21 @@ begin |
| 1090 | 1090 | |
| 1091 | 1091 | if Posso_Rodar then |
| 1092 | 1092 | Begin |
| 1093 | - // Uma forma fácil de evitar que outra sessão deste agente seja iniciada! (POG? Nããããooo!) :)))) | |
| 1094 | - AssignFile(textFileAguarde,objCACIC.getLocalFolderName + 'aguarde_CACIC.txt'); {Associa o arquivo a uma variável do tipo TextFile} | |
| 1093 | + // Uma forma f�cil de evitar que outra sess�o deste agente seja iniciada! (POG? N����ooo!) :)))) | |
| 1094 | + AssignFile(textFileAguarde,objCACIC.getLocalFolderName + 'aguarde_CACIC.txt'); {Associa o arquivo a uma vari�vel do tipo TextFile} | |
| 1095 | 1095 | {$IOChecks off} |
| 1096 | 1096 | Reset(textFileAguarde); {Abre o arquivo texto} |
| 1097 | 1097 | {$IOChecks on} |
| 1098 | - if (IOResult <> 0) then // Arquivo não existe, será recriado. | |
| 1098 | + if (IOResult <> 0) then // Arquivo n�o existe, ser� recriado. | |
| 1099 | 1099 | Rewrite (textFileAguarde); |
| 1100 | 1100 | |
| 1101 | 1101 | Append(textFileAguarde); |
| 1102 | - Writeln(textFileAguarde,'Apenas um pseudo-cookie para evitar sessões concomitantes...'); | |
| 1102 | + Writeln(textFileAguarde,'Apenas um pseudo-cookie para evitar sess�es concomitantes...'); | |
| 1103 | 1103 | Append(textFileAguarde); |
| 1104 | - Writeln(textFileAguarde,'Futuramente penso em colocar aqui o pID, para possibilitar finalização via software externo...'); | |
| 1104 | + Writeln(textFileAguarde,'Futuramente penso em colocar aqui o pID, para possibilitar finaliza��o via software externo...'); | |
| 1105 | 1105 | Append(textFileAguarde); |
| 1106 | 1106 | |
| 1107 | - // Inicializo bloqueando o módulo de suporte remoto seguro na FireWall nativa. | |
| 1107 | + // Inicializo bloqueando o m�dulo de suporte remoto seguro na FireWall nativa. | |
| 1108 | 1108 | if FileExists(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe') then |
| 1109 | 1109 | objCACIC.addApplicationToFirewall('srCACIC - Suporte Remoto Seguro do Sistema CACIC',objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe', false); |
| 1110 | 1110 | |
| ... | ... | @@ -1116,25 +1116,25 @@ begin |
| 1116 | 1116 | begin |
| 1117 | 1117 | if FindCmdLineSwitch('atualizacao', True) then |
| 1118 | 1118 | begin |
| 1119 | - objCACIC.writeDebugLog('FormCreate: Opção /atualizacao recebida...'); | |
| 1120 | - objCACIC.writeDailyLog('Reinicializando com versão '+ objCACIC.GetVersionInfo(ParamStr(0))); | |
| 1119 | + objCACIC.writeDebugLog('FormCreate: Op��o /atualizacao recebida...'); | |
| 1120 | + objCACIC.writeDailyLog('Reinicializando com vers�o '+ objCACIC.GetVersionInfo(ParamStr(0))); | |
| 1121 | 1121 | end |
| 1122 | 1122 | else |
| 1123 | 1123 | begin |
| 1124 | - objCACIC.writeDebugLog('FormCreate: Opção /execute recebida...'); | |
| 1125 | - objCACIC.writeDailyLog('Opção para execução imediata encontrada...'); | |
| 1124 | + objCACIC.writeDebugLog('FormCreate: Op��o /execute recebida...'); | |
| 1125 | + objCACIC.writeDailyLog('Op��o para execu��o imediata encontrada...'); | |
| 1126 | 1126 | end; |
| 1127 | 1127 | ExecutaCACIC(nil); |
| 1128 | 1128 | end; |
| 1129 | 1129 | |
| 1130 | - // Os timers iniciam-se desabilitados... Mais à frente receberão parâmetros de tempo para execução. | |
| 1130 | + // Os timers iniciam-se desabilitados... Mais � frente receber�o par�metros de tempo para execu��o. | |
| 1131 | 1131 | timerNuExecApos.Enabled := False; |
| 1132 | 1132 | timerNuIntervalo.Enabled := False; |
| 1133 | 1133 | |
| 1134 | 1134 | // Derruba o cacic durante o shutdown do windows. |
| 1135 | 1135 | ShutdownEmExecucao := False; |
| 1136 | 1136 | |
| 1137 | - // Não mostrar o formulário... | |
| 1137 | + // N�o mostrar o formul�rio... | |
| 1138 | 1138 | //Application.ShowMainForm:=false; |
| 1139 | 1139 | |
| 1140 | 1140 | Try |
| ... | ... | @@ -1142,32 +1142,32 @@ begin |
| 1142 | 1142 | SetaVariaveisGlobais; |
| 1143 | 1143 | Except |
| 1144 | 1144 | on E : Exception do |
| 1145 | - objCACIC.writeExceptionLog(E.Message,E.ClassName,'SETANDO VARIÁVEIS GLOBAIS!'); | |
| 1145 | + objCACIC.writeExceptionLog(E.Message,E.ClassName,'SETANDO VARI�VEIS GLOBAIS!'); | |
| 1146 | 1146 | End; |
| 1147 | 1147 | |
| 1148 | 1148 | timerNuExecApos.Enabled := True; |
| 1149 | 1149 | |
| 1150 | 1150 | InicializaTray; |
| 1151 | 1151 | |
| 1152 | - // String list e objeto para captura de ações durante suporte remoto | |
| 1152 | + // String list e objeto para captura de a��es durante suporte remoto | |
| 1153 | 1153 | tstrListRCActions := TStringList.Create; |
| 1154 | 1154 | End |
| 1155 | 1155 | else |
| 1156 | 1156 | Begin |
| 1157 | - objCACIC.writeDebugLog('FormCreate: Agente finalizado devido a concomitância de sessões...'); | |
| 1157 | + objCACIC.writeDebugLog('FormCreate: Agente finalizado devido a concomit�ncia de sess�es...'); | |
| 1158 | 1158 | Finaliza; |
| 1159 | 1159 | End; |
| 1160 | 1160 | Except |
| 1161 | 1161 | on E:Exception do |
| 1162 | 1162 | Begin |
| 1163 | - objCACIC.writeExceptionLog(E.Message,e.ClassName,'PROBLEMAS NA INICIALIZAÇÃO (2)'); | |
| 1163 | + objCACIC.writeExceptionLog(E.Message,e.ClassName,'PROBLEMAS NA INICIALIZA��O (2)'); | |
| 1164 | 1164 | Finaliza(false); |
| 1165 | 1165 | End; |
| 1166 | 1166 | End |
| 1167 | 1167 | End |
| 1168 | 1168 | else |
| 1169 | 1169 | Begin |
| 1170 | - objCACIC.writeDailyLog('Execução Impedida por Falta de Integridade do Agente Principal!'); | |
| 1170 | + objCACIC.writeDailyLog('Execu��o Impedida por Falta de Integridade do Agente Principal!'); | |
| 1171 | 1171 | Finaliza(false); |
| 1172 | 1172 | End; |
| 1173 | 1173 | end; |
| ... | ... | @@ -1176,7 +1176,7 @@ procedure TFormularioGeral.SetaVariaveisGlobais; |
| 1176 | 1176 | var v_aux : string; |
| 1177 | 1177 | Begin |
| 1178 | 1178 | Try |
| 1179 | - // Inicialização do indicador de SENHA JÁ INFORMADA | |
| 1179 | + // Inicializa��o do indicador de SENHA J� INFORMADA | |
| 1180 | 1180 | objCACIC.setValueToFile('Configs','SJI',objCACIC.enCrypt(''),strMainProgramInfFileName); |
| 1181 | 1181 | |
| 1182 | 1182 | if (Trim(objCACIC.GetValueFromFile('Configs','InExibeBandeja' ,strMainProgramInfFileName)) = '') or |
| ... | ... | @@ -1189,19 +1189,19 @@ Begin |
| 1189 | 1189 | if (Trim(objCACIC.GetValueFromFile('Configs','NuIntervaloExec',strMainProgramInfFileName)) = '') then |
| 1190 | 1190 | objCACIC.setValueToFile('Configs','NuIntervaloExec', '4' ,strMainProgramInfFileName); |
| 1191 | 1191 | |
| 1192 | - // IN_EXIBE_BANDEJA O valor padrão é mostrar o ícone na bandeja. | |
| 1193 | - // NU_EXEC_APOS Assumirá o padrão de 0 minutos para execução imediata em caso de primeira execução (instalação). | |
| 1194 | - // NU_INTERVALO_EXEC Assumirá o padrão de 4 horas para o intervalo, no caso de problemas. | |
| 1192 | + // IN_EXIBE_BANDEJA O valor padr�o � mostrar o �cone na bandeja. | |
| 1193 | + // NU_EXEC_APOS Assumir� o padr�o de 0 minutos para execu��o imediata em caso de primeira execu��o (instala��o). | |
| 1194 | + // NU_INTERVALO_EXEC Assumir� o padr�o de 4 horas para o intervalo, no caso de problemas. | |
| 1195 | 1195 | |
| 1196 | - // Número de horas do intervalo (3.600.000 milisegundos correspondem a 1 hora). | |
| 1196 | + // N�mero de horas do intervalo (3.600.000 milisegundos correspondem a 1 hora). | |
| 1197 | 1197 | timerNuIntervalo.Interval := strtoint(objCACIC.GetValueFromFile('Configs','NuIntervaloExec',strMainProgramInfFileName)) * 3600000; |
| 1198 | 1198 | |
| 1199 | - // 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. | |
| 1199 | + // 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. | |
| 1200 | 1200 | timerNuExecApos.Interval := (strtoint(objCACIC.GetValueFromFile('Configs','NuExecApos',strMainProgramInfFileName)) * 60000) + 1000; |
| 1201 | 1201 | |
| 1202 | - // 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. | |
| 1203 | - // Também armazena os Hash-Codes dos módulos principais, evitando novo download... | |
| 1204 | - If (objCACIC.GetValueFromFile('Configs','NuExecApos',strMainProgramInfFileName) = '12345') then // Flag usada na inicialização. Só entra nesse if se for a primeira execução do cacic após carregado. | |
| 1202 | + // 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. | |
| 1203 | + // Tamb�m armazena os Hash-Codes dos m�dulos principais, evitando novo download... | |
| 1204 | + If (objCACIC.GetValueFromFile('Configs','NuExecApos',strMainProgramInfFileName) = '12345') then // Flag usada na inicializa��o. S� entra nesse if se for a primeira execu��o do cacic ap�s carregado. | |
| 1205 | 1205 | begin |
| 1206 | 1206 | timerNuExecApos.Interval := 1000; // 1 minuto para chamar GerCols /coletas |
| 1207 | 1207 | objCACIC.setValueToFile('Configs','NuExecApos', '1',strMainProgramInfFileName); |
| ... | ... | @@ -1210,29 +1210,29 @@ Begin |
| 1210 | 1210 | Begin |
| 1211 | 1211 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'Temp\atualiza_CACIC.txt'); |
| 1212 | 1212 | timerNuExecApos.Interval := 1000; // 1 minuto para chamar GerCols /coletas |
| 1213 | - objCACIC.writeDailyLog('Reinicializando com versão '+ objCACIC.GetVersionInfo(ParamStr(0))); | |
| 1213 | + objCACIC.writeDailyLog('Reinicializando com vers�o '+ objCACIC.GetVersionInfo(ParamStr(0))); | |
| 1214 | 1214 | End |
| 1215 | 1215 | else |
| 1216 | 1216 | Begin |
| 1217 | - objCACIC.writeDailyLog('Inicio automático de coletas programado para ' + objCACIC.GetValueFromFile('Configs','NuExecApos',strMainProgramInfFileName) + ' minutos.'); | |
| 1218 | - objCACIC.writeDailyLog('Executar as ações de coletas automaticamente a cada ' + objCACIC.GetValueFromFile('Configs','NuIntervaloExec',strMainProgramInfFileName) + ' horas.'); | |
| 1217 | + objCACIC.writeDailyLog('Inicio autom�tico de coletas programado para ' + objCACIC.GetValueFromFile('Configs','NuExecApos',strMainProgramInfFileName) + ' minutos.'); | |
| 1218 | + objCACIC.writeDailyLog('Executar as a��es de coletas automaticamente a cada ' + objCACIC.GetValueFromFile('Configs','NuIntervaloExec',strMainProgramInfFileName) + ' horas.'); | |
| 1219 | 1219 | objCACIC.writeDailyLog(DupeString('=',100)); |
| 1220 | 1220 | End; |
| 1221 | 1221 | |
| 1222 | 1222 | v_aux := Trim(objCACIC.GetValueFromFile('Configs','DtHrUltimaColeta',strGerColsInfFileName)); |
| 1223 | 1223 | if (v_aux <> '') and (Copy(v_aux, 1, 8) <> FormatDateTime('YYYYmmdd', Now)) then timerNuExecApos.Enabled := True; |
| 1224 | 1224 | |
| 1225 | - // Desabilita/Habilita a opção de Informações Gerais | |
| 1225 | + // Desabilita/Habilita a op��o de Informa��es Gerais | |
| 1226 | 1226 | HabilitaInformacoesGerais; |
| 1227 | 1227 | |
| 1228 | - // Desabilita/Habilita a opção de Suporte Remoto | |
| 1228 | + // Desabilita/Habilita a op��o de Suporte Remoto | |
| 1229 | 1229 | HabilitaSuporteRemoto; |
| 1230 | 1230 | |
| 1231 | 1231 | InicializaTray; |
| 1232 | 1232 | Except |
| 1233 | 1233 | on E : Exception do |
| 1234 | 1234 | Begin |
| 1235 | - objCACIC.writeExceptionLog(E.Message,E.ClassName,'PROBLEMAS NA INICIALIZAÇÃO (1)'); | |
| 1235 | + objCACIC.writeExceptionLog(E.Message,E.ClassName,'PROBLEMAS NA INICIALIZA��O (1)'); | |
| 1236 | 1236 | Finaliza; |
| 1237 | 1237 | End; |
| 1238 | 1238 | End; |
| ... | ... | @@ -1249,13 +1249,13 @@ Begin |
| 1249 | 1249 | |
| 1250 | 1250 | if (boolNormal) then |
| 1251 | 1251 | Begin |
| 1252 | - // Criando um indicador de finalização normal da aplicação, | |
| 1253 | - // evitando que o chkSIS.exe baixe outra cópia do Agente Principal ao "achar" que o agente encontra-se com problema. | |
| 1254 | - AssignFile(txtFileNormal,objCACIC.getLocalFolderName + 'normal_CACIC.txt'); {Associa o arquivo a uma variável do tipo TextFile} | |
| 1252 | + // Criando um indicador de finaliza��o normal da aplica��o, | |
| 1253 | + // evitando que o chkSIS.exe baixe outra c�pia do Agente Principal ao "achar" que o agente encontra-se com problema. | |
| 1254 | + AssignFile(txtFileNormal,objCACIC.getLocalFolderName + 'normal_CACIC.txt'); {Associa o arquivo a uma vari�vel do tipo TextFile} | |
| 1255 | 1255 | {$IOChecks off} |
| 1256 | 1256 | Reset(txtFileNormal); {Abre o arquivo texto} |
| 1257 | 1257 | {$IOChecks on} |
| 1258 | - if (IOResult <> 0) then // Arquivo não existe, será recriado. | |
| 1258 | + if (IOResult <> 0) then // Arquivo n�o existe, ser� recriado. | |
| 1259 | 1259 | Rewrite (txtFileNormal); |
| 1260 | 1260 | |
| 1261 | 1261 | Append(txtFileNormal); |
| ... | ... | @@ -1268,7 +1268,7 @@ Begin |
| 1268 | 1268 | End; |
| 1269 | 1269 | Except |
| 1270 | 1270 | on E : Exception do |
| 1271 | - objCACIC.writeExceptionLog(E.Message,E.ClassName,'PROBLEMAS NA FINALIZAÇÃO'); | |
| 1271 | + objCACIC.writeExceptionLog(E.Message,E.ClassName,'PROBLEMAS NA FINALIZA��O'); | |
| 1272 | 1272 | End; |
| 1273 | 1273 | objCACIC.Free; |
| 1274 | 1274 | Halt(0); |
| ... | ... | @@ -1287,19 +1287,19 @@ begin |
| 1287 | 1287 | (boolCheckExecution and |
| 1288 | 1288 | (ActualActivity = 0) ) then |
| 1289 | 1289 | Begin |
| 1290 | - // Caso exista o Gerente de Coletas será verificada a versão e excluída caso antiga(Uma forma de ação pró-ativa) | |
| 1290 | + // Caso exista o Gerente de Coletas ser� verificada a vers�o e exclu�da caso antiga(Uma forma de a��o pr�-ativa) | |
| 1291 | 1291 | if ChecaGERCOLS then |
| 1292 | 1292 | Begin |
| 1293 | 1293 | ChecaCONFIGS; |
| 1294 | 1294 | |
| 1295 | - objCACIC.writeDebugLog('Invoca_GerCols: Invocando Gerente de Coletas com ação: "'+p_acao+'"'); | |
| 1295 | + objCACIC.writeDebugLog('Invoca_GerCols: Invocando Gerente de Coletas com a��o: "'+p_acao+'"'); | |
| 1296 | 1296 | |
| 1297 | 1297 | if boolShowInfo and not (p_acao = 'getTest') then |
| 1298 | - objCACIC.writeDebugLog('Invocando Gerente de Coletas com ação: "'+p_acao+'"'); | |
| 1298 | + objCACIC.writeDebugLog('Invocando Gerente de Coletas com a��o: "'+p_acao+'"'); | |
| 1299 | 1299 | |
| 1300 | 1300 | timerNuExecApos.Enabled := False; |
| 1301 | 1301 | objCACIC.writeDebugLog('Invoca_GerCols: Criando Processo GerCols => "'+objCACIC.getLocalFolderName + 'Modules\gercols.exe /'+p_acao+' /WebServicesFolderName='+objCACIC.getWebServicesFolderName +' /LocalFolderName='+objCACIC.getLocalFolderName + ' /WebManagerAddress=' + objCACIC.getWebManagerAddress + '"'); |
| 1302 | - if ((p_acao = 'getTest') or (p_acao = 'getConfigs')) then //se for getTest, esperar a aplicação finalizar. | |
| 1302 | + if ((p_acao = 'getTest') or (p_acao = 'getConfigs')) then //se for getTest, esperar a aplica��o finalizar. | |
| 1303 | 1303 | objCACIC.createOneProcess(objCACIC.getLocalFolderName + 'Modules\gercols.exe /'+p_acao+' /WebServicesFolderName='+objCACIC.getWebServicesFolderName +' /LocalFolderName='+objCACIC.getLocalFolderName + ' /WebManagerAddress=' + objCACIC.getWebManagerAddress + ' /MainProgramName=' + objCACIC.getMainProgramName + ' /MainProgramHash=' + objCACIC.getMainProgramHash,true,SW_HIDE) |
| 1304 | 1304 | else |
| 1305 | 1305 | objCACIC.createOneProcess(objCACIC.getLocalFolderName + 'Modules\gercols.exe /'+p_acao+' /WebServicesFolderName='+objCACIC.getWebServicesFolderName +' /LocalFolderName='+objCACIC.getLocalFolderName + ' /WebManagerAddress=' + objCACIC.getWebManagerAddress + ' /MainProgramName=' + objCACIC.getMainProgramName + ' /MainProgramHash=' + objCACIC.getMainProgramHash,true,SW_HIDE); |
| ... | ... | @@ -1307,7 +1307,7 @@ begin |
| 1307 | 1307 | objCacic.setBoolCipher(not objCacic.isInDebugMode); |
| 1308 | 1308 | End |
| 1309 | 1309 | else |
| 1310 | - objCACIC.writeDailyLog('Não foi possível invocar o Gerente de Coletas!'); | |
| 1310 | + objCACIC.writeDailyLog('N�o foi poss�vel invocar o Gerente de Coletas!'); | |
| 1311 | 1311 | End; |
| 1312 | 1312 | end; |
| 1313 | 1313 | |
| ... | ... | @@ -1316,7 +1316,7 @@ begin |
| 1316 | 1316 | if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) = 'S') then |
| 1317 | 1317 | Invoca_MapaCacic |
| 1318 | 1318 | else |
| 1319 | - MessageDlg(#13#13+'Módulo desabilitado!',mtInformation, [mbOK], 0); | |
| 1319 | + MessageDlg(#13#13+'M�dulo desabilitado!',mtInformation, [mbOK], 0); | |
| 1320 | 1320 | end; |
| 1321 | 1321 | |
| 1322 | 1322 | //////////////////////////////////////////////////////////////////////////////// |
| ... | ... | @@ -1329,19 +1329,18 @@ begin |
| 1329 | 1329 | Begin |
| 1330 | 1330 | if ChecaMAPACACIC then |
| 1331 | 1331 | begin |
| 1332 | - // Caso exista o Mapa Cacic será verificada a versão e excluída caso antiga(Uma forma de ação pró-ativa) | |
| 1332 | + // Caso exista o Mapa Cacic ser� verificada a vers�o e exclu�da caso antiga(Uma forma de a��o pr�-ativa) | |
| 1333 | 1333 | if FileExists(objCACIC.getLocalFolderName + 'Modules\mapacacic.exe') then |
| 1334 | 1334 | Begin |
| 1335 | 1335 | objCacic.writeDailyLog('Invoca_MapaCacic: Criando processo mapa.'); |
| 1336 | 1336 | objCACIC.writeDebugLog('Invoca_MapaCacic: Criando Processo Mapa => "'+objCACIC.getLocalFolderName + 'Modules\MapaCACIC.exe'); |
| 1337 | - sleep(10000); //Pausa para dar tempo de realizar o login na máquina, senão o usuário fica em branco. | |
| 1338 | 1337 | if (objCACIC.createOneProcess(objCACIC.getLocalFolderName + 'Modules\mapacacic.exe',false,SW_SHOW)) then |
| 1339 | 1338 | objCacic.writeDailyLog('Invoca_MapaCacic: Processo criado.') |
| 1340 | 1339 | else |
| 1341 | 1340 | objCacic.writeDailyLog('Invoca_MapaCacic: Falha ao criar processo.'); |
| 1342 | 1341 | End |
| 1343 | 1342 | else |
| 1344 | - objCACIC.writeDailyLog('Não foi possível invocar o Mapa Cacic!'); | |
| 1343 | + objCACIC.writeDailyLog('N�o foi poss�vel invocar o Mapa Cacic!'); | |
| 1345 | 1344 | End; |
| 1346 | 1345 | End; |
| 1347 | 1346 | end; |
| ... | ... | @@ -1389,8 +1388,8 @@ begin |
| 1389 | 1388 | timerCheckNoMinuto.Enabled := false; |
| 1390 | 1389 | objCACIC.writeDebugLog('ExecutaCACIC: Preparando chamada ao Gerente de Coletas...'); |
| 1391 | 1390 | |
| 1392 | - // Se foi gerado o arquivo ger_erro.txt o Log conterá a mensagem alí gravada como valor de chave | |
| 1393 | - // O Gerente de Coletas deverá ser eliminado para que seja baixado novamente por ChecaGERCOLS | |
| 1391 | + // Se foi gerado o arquivo ger_erro.txt o Log conter� a mensagem al� gravada como valor de chave | |
| 1392 | + // O Gerente de Coletas dever� ser eliminado para que seja baixado novamente por ChecaGERCOLS | |
| 1394 | 1393 | if (FileExists(objCACIC.getLocalFolderName + 'gererro.txt')) then |
| 1395 | 1394 | Begin |
| 1396 | 1395 | objCACIC.writeDailyLog('Gerente de Coletas eliminado devido a falha:'); |
| ... | ... | @@ -1407,12 +1406,12 @@ begin |
| 1407 | 1406 | SetaVariaveisGlobais; |
| 1408 | 1407 | End; |
| 1409 | 1408 | |
| 1410 | - objCACIC.writeDailyLog('Iniciando execução de atividades.'); | |
| 1409 | + objCACIC.writeDailyLog('Iniciando execu��o de atividades.'); | |
| 1411 | 1410 | |
| 1412 | 1411 | objCACIC.writeDebugLog('ExecutaCACIC: Primeira chamada ao Gerente de Coletas...'); |
| 1413 | 1412 | Invoca_GerCols('getConfigs'); |
| 1414 | 1413 | |
| 1415 | - sleep(3000); // Pausa para início do Gerente de Coletas e criação do arquivo temp\aguarde_GER.txt | |
| 1414 | + sleep(3000); // Pausa para in�cio do Gerente de Coletas e cria��o do arquivo temp\aguarde_GER.txt | |
| 1416 | 1415 | |
| 1417 | 1416 | Application.ProcessMessages; |
| 1418 | 1417 | InicializaTray; |
| ... | ... | @@ -1430,9 +1429,9 @@ begin |
| 1430 | 1429 | Invoca_MapaCacic; |
| 1431 | 1430 | end; |
| 1432 | 1431 | |
| 1433 | - // Pausas de 15 segundos para o caso de ser(em) baixada(s) nova(s) versão(ões) de GerCols e/ou Cacic280. | |
| 1434 | - // Serão 4 tentativas por minuto | |
| 1435 | - // Serão 30 minutos no máximo de tentativas, totalizando 120 | |
| 1432 | + // Pausas de 15 segundos para o caso de ser(em) baixada(s) nova(s) vers�o(�es) de GerCols e/ou Cacic280. | |
| 1433 | + // Ser�o 4 tentativas por minuto | |
| 1434 | + // Ser�o 30 minutos no m�ximo de tentativas, totalizando 120 | |
| 1436 | 1435 | intTentativas := 0; |
| 1437 | 1436 | while (not Pode_Coletar and (intTentativas < 121)) do |
| 1438 | 1437 | Begin |
| ... | ... | @@ -1442,7 +1441,7 @@ begin |
| 1442 | 1441 | inc(intTentativas); |
| 1443 | 1442 | End; |
| 1444 | 1443 | |
| 1445 | - // Neste caso o Gerente de Coletas deverá fazer novo contato devido à permissão de criptografia ter sido colocada em espera pelo próximo contato. | |
| 1444 | + // Neste caso o Gerente de Coletas dever� fazer novo contato devido � permiss�o de criptografia ter sido colocada em espera pelo pr�ximo contato. | |
| 1446 | 1445 | if (intTentativas > 120) or |
| 1447 | 1446 | (objCACIC.GetValueFromFile('Configs','CsCipher', strGerColsInfFileName) = '2') then |
| 1448 | 1447 | Begin |
| ... | ... | @@ -1454,23 +1453,23 @@ begin |
| 1454 | 1453 | End |
| 1455 | 1454 | else |
| 1456 | 1455 | Begin |
| 1457 | - // Caso tenha sido baixada nova cópia do Gerente de Coletas, esta deverá ser movida para cima da atual | |
| 1456 | + // Caso tenha sido baixada nova c�pia do Gerente de Coletas, esta dever� ser movida para cima da atual | |
| 1458 | 1457 | if (FileExists(objCACIC.getLocalFolderName + 'Temp\gercols.exe')) then |
| 1459 | 1458 | Begin |
| 1460 | - objCACIC.writeDailyLog('Atualizando versão do Gerente de Coletas para '+objCACIC.getVersionInfo(objCACIC.getLocalFolderName + 'Temp\gercols.exe')); | |
| 1461 | - // O MoveFileEx não se deu bem no Win98! :| | |
| 1459 | + objCACIC.writeDailyLog('Atualizando vers�o do Gerente de Coletas para '+objCACIC.getVersionInfo(objCACIC.getLocalFolderName + 'Temp\gercols.exe')); | |
| 1460 | + // O MoveFileEx n�o se deu bem no Win98! :| | |
| 1462 | 1461 | // MoveFileEx(PChar(objCACIC.getLocalFolderName + 'Temp\gercols.exe'),PChar(objCACIC.getLocalFolderName + 'Modulos\gercols.exe'),MOVEFILE_REPLACE_EXISTING); |
| 1463 | 1462 | |
| 1464 | 1463 | CopyFile(PChar(objCACIC.getLocalFolderName + 'Temp\gercols.exe'),PChar(objCACIC.getLocalFolderName + 'Modules\gercols.exe'),false); |
| 1465 | - sleep(2000); // 2 segundos de espera pela cópia! :) (Rwindows!) | |
| 1464 | + sleep(2000); // 2 segundos de espera pela c�pia! :) (Rwindows!) | |
| 1466 | 1465 | |
| 1467 | 1466 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'Temp\gercols.exe'); |
| 1468 | - sleep(2000); // 2 segundos de espera pela deleção! | |
| 1467 | + sleep(2000); // 2 segundos de espera pela dele��o! | |
| 1469 | 1468 | |
| 1470 | - ExecutaCACIC(nil); // Forçará uma reexecução de GerCols... | |
| 1469 | + ExecutaCACIC(nil); // For�ar� uma reexecu��o de GerCols... | |
| 1471 | 1470 | End; |
| 1472 | 1471 | |
| 1473 | - // Verifico se foi gravada alguma mensagem pelo Gerente de Coletas e mostro caso a configuração permita | |
| 1472 | + // Verifico se foi gravada alguma mensagem pelo Gerente de Coletas e mostro caso a configura��o permita | |
| 1474 | 1473 | v_mensagem := objCACIC.GetValueFromFile('Mensagens','TeMensagem', strGerColsInfFileName); |
| 1475 | 1474 | if (v_mensagem <> '') and |
| 1476 | 1475 | (objCACIC.GetValueFromFile('Configs','InExibeErrosCriticos', strMainProgramInfFileName) = 'S') then |
| ... | ... | @@ -1483,37 +1482,37 @@ begin |
| 1483 | 1482 | MessageDlg(v_mensagem,v_MsgDlgType, [mbOk], 0); |
| 1484 | 1483 | objCACIC.setValueToFile('Mensagens','TeMensagem', '', strGerColsInfFileName); |
| 1485 | 1484 | objCACIC.setValueToFile('Mensagens','CsTipo' , '', strGerColsInfFileName); |
| 1486 | - // Para evitar uma reexecução de GerCols sem necessidade... | |
| 1487 | - intTentativas := 121; // Apenas para ajudar na condição seguinte | |
| 1485 | + // Para evitar uma reexecu��o de GerCols sem necessidade... | |
| 1486 | + intTentativas := 121; // Apenas para ajudar na condi��o seguinte | |
| 1488 | 1487 | End; |
| 1489 | 1488 | |
| 1490 | - // Verifico se TE_FILA_FTP foi setado (por GerCols) e obedeço ao intervalo para nova tentativa de coletas | |
| 1491 | - // Caso TE_FILA_FTP inicie com # é porque já passou nessa condição e deve iniciar nova tentativa de FTP... | |
| 1489 | + // Verifico se TE_FILA_FTP foi setado (por GerCols) e obede�o ao intervalo para nova tentativa de coletas | |
| 1490 | + // Caso TE_FILA_FTP inicie com # � porque j� passou nessa condi��o e deve iniciar nova tentativa de FTP... | |
| 1492 | 1491 | v_TE_FILA_FTP := objCACIC.GetValueFromFile('Configs','TeFilaFTP', strGerColsInfFileName); |
| 1493 | 1492 | if (intTentativas <> 121) and |
| 1494 | 1493 | (Copy(v_TE_FILA_FTP,1,1) <> '#') and |
| 1495 | 1494 | (v_TE_FILA_FTP <> '0') and |
| 1496 | 1495 | (v_TE_FILA_FTP <> '') then |
| 1497 | 1496 | Begin |
| 1498 | - // Busquei o número de milisegundos setados em TeFilaFTP e o obedeço... | |
| 1497 | + // Busquei o n�mero de milisegundos setados em TeFilaFTP e o obede�o... | |
| 1499 | 1498 | // 60.000 milisegundos correspondem a 60 segundos (1 minuto). |
| 1500 | - // Acrescento 1, pois se for zero ele não executa. | |
| 1499 | + // Acrescento 1, pois se for zero ele n�o executa. | |
| 1501 | 1500 | timerNuExecApos.Enabled := False; |
| 1502 | 1501 | timerNuExecApos.Interval := strtoint(v_TE_FILA_FTP) * 60000; |
| 1503 | 1502 | timerNuExecApos.Enabled := True; |
| 1504 | - objCACIC.writeDailyLog('FTP de coletores adiado pelo Módulo Gerente.'); | |
| 1503 | + objCACIC.writeDailyLog('FTP de coletores adiado pelo M�dulo Gerente.'); | |
| 1505 | 1504 | objCACIC.writeDailyLog('Nova tentativa em aproximadamente ' + v_TE_FILA_FTP+ ' minuto(s).'); |
| 1506 | 1505 | objCACIC.setValueToFile('Configs','TeFilaFTP','#' + v_TE_FILA_FTP, strGerColsInfFileName); |
| 1507 | 1506 | End; |
| 1508 | 1507 | |
| 1509 | - // Desabilita/Habilita a opção de Informações Gerais | |
| 1508 | + // Desabilita/Habilita a op��o de Informa��es Gerais | |
| 1510 | 1509 | HabilitaInformacoesGerais; |
| 1511 | 1510 | |
| 1512 | - // Desabilita/Habilita a opção de Suporte Remoto | |
| 1511 | + // Desabilita/Habilita a op��o de Suporte Remoto | |
| 1513 | 1512 | HabilitaSuporteRemoto; |
| 1514 | 1513 | |
| 1515 | - // O loop 1 foi dedicado a atualizações de versões e afins... | |
| 1516 | - // O loop 2 deverá invocar as coletas propriamente ditas... | |
| 1514 | + // O loop 1 foi dedicado a atualiza��es de vers�es e afins... | |
| 1515 | + // O loop 2 dever� invocar as coletas propriamente ditas... | |
| 1517 | 1516 | if (intTentativas <> 121) then |
| 1518 | 1517 | Begin |
| 1519 | 1518 | objCACIC.writeDebugLog('ExecutaCACIC: Iniciando Chamada para Coletas...'); |
| ... | ... | @@ -1556,8 +1555,8 @@ end; |
| 1556 | 1555 | |
| 1557 | 1556 | procedure TFormularioGeral.ExibirConfiguracoes(Sender: TObject); |
| 1558 | 1557 | begin |
| 1559 | - // SJI = Senha Já Informada... | |
| 1560 | - // Esse valor é inicializado com "N" | |
| 1558 | + // SJI = Senha J� Informada... | |
| 1559 | + // Esse valor � inicializado com "N" | |
| 1561 | 1560 | if (objCACIC.deCrypt( objCACIC.GetValueFromFile('Configs','SJI',strMainProgramInfFileName))='') and |
| 1562 | 1561 | (objCACIC.GetValueFromFile('Configs','WebManagerAddress',strChkSisInfFileName)<>'') then |
| 1563 | 1562 | begin |
| ... | ... | @@ -1575,13 +1574,13 @@ begin |
| 1575 | 1574 | end; |
| 1576 | 1575 | |
| 1577 | 1576 | //======================================================================= |
| 1578 | -// Todo o código deste ponto em diante está relacionado às rotinas de | |
| 1579 | -// de inclusão do ícone do programa na bandeja do sistema | |
| 1577 | +// Todo o c�digo deste ponto em diante est� relacionado �s rotinas de | |
| 1578 | +// de inclus�o do �cone do programa na bandeja do sistema | |
| 1580 | 1579 | //======================================================================= |
| 1581 | 1580 | procedure TFormularioGeral.InicializaTray; |
| 1582 | 1581 | var v_strHint : String; |
| 1583 | 1582 | begin |
| 1584 | - // g_intStatus receberá 0 -> NORMAL ou 1 -> COLETAS ou 3 -> srCACIC | |
| 1583 | + // g_intStatus receber� 0 -> NORMAL ou 1 -> COLETAS ou 3 -> srCACIC | |
| 1585 | 1584 | g_intStatus := ActualActivity; |
| 1586 | 1585 | |
| 1587 | 1586 | // Monto a frase a ser colocada no Hint |
| ... | ... | @@ -1590,14 +1589,14 @@ begin |
| 1590 | 1589 | if not (objCACIC.getValueFromTags('IPAddress',strWin32_NetworkAdapterConfiguration) = '') then |
| 1591 | 1590 | v_strHint := v_strHint + chr(13) + chr(10) + 'IP: ' + objCACIC.getValueFromTags('IPAddress',strWin32_NetworkAdapterConfiguration); |
| 1592 | 1591 | |
| 1593 | - // Mostro a versão no painel de Informações Gerais | |
| 1592 | + // Mostro a vers�o no painel de Informa��es Gerais | |
| 1594 | 1593 | |
| 1595 | 1594 | |
| 1596 | 1595 | if (g_intStatus = NORMAL) then |
| 1597 | 1596 | Begin |
| 1598 | 1597 | if not (UpperCase(objCACIC.GetValueFromFile('Configs','ConexaoOK', strGerColsInfFileName)) = 'S') then |
| 1599 | 1598 | Begin |
| 1600 | - v_strHint := v_strHint + ' IDENTIFICAÇÃO LOCAL...'; | |
| 1599 | + v_strHint := v_strHint + ' IDENTIFICA��O LOCAL...'; | |
| 1601 | 1600 | g_intStatus := DESCONFIGURADO; |
| 1602 | 1601 | End |
| 1603 | 1602 | else |
| ... | ... | @@ -1609,7 +1608,7 @@ begin |
| 1609 | 1608 | if g_intStatus = EM_SUPORTE then |
| 1610 | 1609 | v_strHint := v_strHint + chr(13) + chr(10) + ' Em Suporte Remoto...' |
| 1611 | 1610 | else if g_intStatus = COLETANDO then |
| 1612 | - v_strHint := v_strHint + chr(13) + chr(10) + ' Coletas em Execução...'; | |
| 1611 | + v_strHint := v_strHint + chr(13) + chr(10) + ' Coletas em Execu��o...'; | |
| 1613 | 1612 | objCACIC.writeDebugLog('InicializaTray: v_strHint Depois = "'+v_strHint+'"'); |
| 1614 | 1613 | End; |
| 1615 | 1614 | |
| ... | ... | @@ -1623,19 +1622,19 @@ begin |
| 1623 | 1622 | imgIconList.GetIcon(g_intIconIndex,TrayIcon1.Icon); |
| 1624 | 1623 | g_intStatusAnterior := g_intStatus; |
| 1625 | 1624 | timerCheckNoMinuto.Enabled := false; |
| 1626 | - timerCheckNoMinuto.Interval := 5000; // Durante as coletas altero o timer verificador de ações para 5 segundos | |
| 1625 | + timerCheckNoMinuto.Interval := 5000; // Durante as coletas altero o timer verificador de a��es para 5 segundos | |
| 1627 | 1626 | |
| 1628 | 1627 | objCACIC.writeDebugLog('InicializaTray: Status alterado para ' + intToStr(g_intStatus)); |
| 1629 | 1628 | if (g_intStatus = COLETANDO) then |
| 1630 | 1629 | Begin |
| 1631 | 1630 | Mnu_InformacoesGerais.Enabled := False; |
| 1632 | 1631 | Mnu_ExecutarAgora.Enabled := False; |
| 1633 | - Mnu_InformacoesGerais.Caption := 'Aguarde, coletas em ação!'; | |
| 1632 | + Mnu_InformacoesGerais.Caption := 'Aguarde, coletas em a��o!'; | |
| 1634 | 1633 | Mnu_ExecutarAgora.Caption := Mnu_InformacoesGerais.Caption; |
| 1635 | 1634 | End |
| 1636 | 1635 | else if (g_intStatus = DESCONFIGURADO) then |
| 1637 | 1636 | Begin |
| 1638 | - objCACIC.writeDebugLog('InicializaTray: Setando Ícones para "Interroga" (intStatus=' + IntToStr(g_intStatus) + ')...'); | |
| 1637 | + objCACIC.writeDebugLog('InicializaTray: Setando �cones para "Interroga" (intStatus=' + IntToStr(g_intStatus) + ')...'); | |
| 1639 | 1638 | End |
| 1640 | 1639 | else if (g_intStatus = EM_SUPORTE) then |
| 1641 | 1640 | Begin |
| ... | ... | @@ -1646,14 +1645,14 @@ begin |
| 1646 | 1645 | End |
| 1647 | 1646 | else |
| 1648 | 1647 | Begin |
| 1649 | - timerCheckNoMinuto.Interval := 60000; // Restauro o timer verificador de ações para 1 minuto | |
| 1648 | + timerCheckNoMinuto.Interval := 60000; // Restauro o timer verificador de a��es para 1 minuto | |
| 1650 | 1649 | |
| 1651 | 1650 | Mnu_InformacoesGerais.Caption := strMenuCaptionINF; |
| 1652 | 1651 | Mnu_ExecutarAgora.Caption := strMenuCaptionEXE; |
| 1653 | 1652 | Mnu_InformacoesGerais.Enabled := true; |
| 1654 | 1653 | Mnu_ExecutarAgora.Enabled := true; |
| 1655 | 1654 | |
| 1656 | - objCACIC.writeDebugLog('InicializaTray: Setando Ícones para "Normal" (intStatus=' + IntToStr(g_intStatus) + ')...'); | |
| 1655 | + objCACIC.writeDebugLog('InicializaTray: Setando �cones para "Normal" (intStatus=' + IntToStr(g_intStatus) + ')...'); | |
| 1657 | 1656 | End; |
| 1658 | 1657 | |
| 1659 | 1658 | objCACIC.writeDebugLog('InicializaTray: Setando o HINT do Systray para: "'+v_strHint+'"'); |
| ... | ... | @@ -1663,13 +1662,13 @@ begin |
| 1663 | 1662 | |
| 1664 | 1663 | if (objCACIC.GetValueFromFile('Configs','InExibeBandeja', strMainProgramInfFileName) <> 'N') Then |
| 1665 | 1664 | Begin |
| 1666 | - objCACIC.writeDebugLog('InicializaTray: Exibe/Renova Ícone do Systray...'); | |
| 1665 | + objCACIC.writeDebugLog('InicializaTray: Exibe/Renova �cone do Systray...'); | |
| 1667 | 1666 | imgIconList.GetIcon(g_intStatus,TrayIcon1.Icon); |
| 1668 | 1667 | TrayIcon1.Show; |
| 1669 | 1668 | End |
| 1670 | 1669 | else |
| 1671 | 1670 | Begin |
| 1672 | - objCACIC.writeDebugLog('InicializaTray: Inibe Ícone do Systray...'); | |
| 1671 | + objCACIC.writeDebugLog('InicializaTray: Inibe �cone do Systray...'); | |
| 1673 | 1672 | TrayIcon1.Hide; |
| 1674 | 1673 | End; |
| 1675 | 1674 | End |
| ... | ... | @@ -1695,22 +1694,22 @@ begin |
| 1695 | 1694 | FormularioGeral.Visible:=false; |
| 1696 | 1695 | if (objCACIC.GetValueFromFile('Configs','InExibeBandeja', strMainProgramInfFileName) = 'N') Then |
| 1697 | 1696 | Begin |
| 1698 | - objCACIC.writeDebugLog('MinimizaParaTrayArea: Escondendo o ícone'); | |
| 1697 | + objCACIC.writeDebugLog('MinimizaParaTrayArea: Escondendo o �cone'); | |
| 1699 | 1698 | TrayIcon1.Hide |
| 1700 | 1699 | End |
| 1701 | 1700 | else |
| 1702 | 1701 | Begin |
| 1703 | - objCACIC.writeDebugLog('MinimizaParaTrayArea: Mostrando o ícone'); | |
| 1702 | + objCACIC.writeDebugLog('MinimizaParaTrayArea: Mostrando o �cone'); | |
| 1704 | 1703 | TrayIcon1.Show; |
| 1705 | 1704 | End; |
| 1706 | 1705 | end; |
| 1707 | 1706 | // ------------------------------------- |
| 1708 | -// Fim dos códigos da bandeja do sistema | |
| 1707 | +// Fim dos c�digos da bandeja do sistema | |
| 1709 | 1708 | // ------------------------------------- |
| 1710 | 1709 | |
| 1711 | 1710 | procedure TFormularioGeral.FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
| 1712 | 1711 | begin |
| 1713 | - // Esse evento é colocado em Nil durante o shutdown do windows. | |
| 1712 | + // Esse evento � colocado em Nil durante o shutdown do windows. | |
| 1714 | 1713 | // Ver o evento WMQueryEndSession. |
| 1715 | 1714 | CanClose := False; |
| 1716 | 1715 | MinimizaParaTrayArea(Nil); |
| ... | ... | @@ -1718,8 +1717,8 @@ end; |
| 1718 | 1717 | |
| 1719 | 1718 | procedure TFormularioGeral.WMQueryEndSession(var Msg: TWMQueryEndSession); |
| 1720 | 1719 | begin |
| 1721 | - objCACIC.writeDailyLog('Windows em processo de finalização!'); | |
| 1722 | - // Quando há um shutdown do windows em execução, libera o close. | |
| 1720 | + objCACIC.writeDailyLog('Windows em processo de finaliza��o!'); | |
| 1721 | + // Quando h� um shutdown do windows em execu��o, libera o close. | |
| 1723 | 1722 | OnCloseQuery := Nil; |
| 1724 | 1723 | Msg.Result := 1; |
| 1725 | 1724 | Finaliza(true); |
| ... | ... | @@ -1748,7 +1747,7 @@ begin |
| 1748 | 1747 | ST_VL_WinsPrimario.Caption := objCACIC.getValueFromTags('WINSPrimaryServer' ,strWin32_NetworkAdapterConfiguration); |
| 1749 | 1748 | ST_VL_WinsSecundario.Caption := objCACIC.getValueFromTags('WINSSecondaryServer' ,strWin32_NetworkAdapterConfiguration); |
| 1750 | 1749 | |
| 1751 | - // Exibição das informações de Sistemas Monitorados... | |
| 1750 | + // Exibi��o das informa��es de Sistemas Monitorados... | |
| 1752 | 1751 | v_conta_perfis := 1; |
| 1753 | 1752 | v_conta_infos_coletadas := 0; |
| 1754 | 1753 | v_tripa_perfis := '*'; |
| ... | ... | @@ -1764,7 +1763,7 @@ begin |
| 1764 | 1763 | Begin |
| 1765 | 1764 | v_array_perfis := objCACIC.explode(v_tripa_perfis,','); |
| 1766 | 1765 | |
| 1767 | - // ATENÇÃO!!! Antes da implementação de INFORMAÇÕES GERAIS o Count ia até 11, ok?! | |
| 1766 | + // ATEN��O!!! Antes da implementa��o de INFORMA��ES GERAIS o Count ia at� 11, ok?! | |
| 1768 | 1767 | if (v_array_perfis.Count > 11) and (v_array_perfis[11]='S') then |
| 1769 | 1768 | Begin |
| 1770 | 1769 | v_tripa_infos_coletadas := objCACIC.deCrypt( objCACIC.GetValueFromFile('Collects','ColMoni_Atual', strGerColsInfFileName)); |
| ... | ... | @@ -1806,7 +1805,7 @@ begin |
| 1806 | 1805 | Begin |
| 1807 | 1806 | if (copy(strAux,0,8) = FormatDateTime('yyyymmdd', Date)) then |
| 1808 | 1807 | Begin |
| 1809 | - // Vamos reaproveitar algumas variáveis!... | |
| 1808 | + // Vamos reaproveitar algumas vari�veis!... | |
| 1810 | 1809 | |
| 1811 | 1810 | v_array_perfis := objCACIC.explode(strAux,'#'); |
| 1812 | 1811 | for intAux := 1 to v_array_perfis.Count-1 Do |
| ... | ... | @@ -1825,7 +1824,7 @@ begin |
| 1825 | 1824 | v_array_infos_coletadas[3] := v_array_infos_coletadas[2]; |
| 1826 | 1825 | End; |
| 1827 | 1826 | |
| 1828 | - // Códigos Possíveis: -1 : Problema no Envio da Coleta | |
| 1827 | + // C�digos Poss�veis: -1 : Problema no Envio da Coleta | |
| 1829 | 1828 | // 1 : Coleta Enviada |
| 1830 | 1829 | // 0 : Sem Coleta para Envio |
| 1831 | 1830 | strAux := IfThen(v_array_infos_coletadas[3]='1','Coleta Enviada ao Gerente WEB!', |
| ... | ... | @@ -1841,7 +1840,7 @@ begin |
| 1841 | 1840 | else |
| 1842 | 1841 | Begin |
| 1843 | 1842 | listSistemasMonitorados.Items.Add; |
| 1844 | - listSistemasMonitorados.Items[0].Caption := 'Não Há Coletas Registradas Nesta Data'; | |
| 1843 | + listSistemasMonitorados.Items[0].Caption := 'N�o H� Coletas Registradas Nesta Data'; | |
| 1845 | 1844 | End; |
| 1846 | 1845 | |
| 1847 | 1846 | strConfigsPatrimonio := objCACIC.GetValueFromFile('Patrimonio','Configs', strMainProgramInfFileName); |
| ... | ... | @@ -1963,7 +1962,7 @@ procedure TFormularioGeral.Bt_Fechar_InfosGeraisClick(Sender: TObject); |
| 1963 | 1962 | end; |
| 1964 | 1963 | |
| 1965 | 1964 | |
| 1966 | -// Solução baixada de http://www.delphidabbler.com/codesnip.php?action=named&routines=URLDecode&showsrc=1 | |
| 1965 | +// Solu��o baixada de http://www.delphidabbler.com/codesnip.php?action=named&routines=URLDecode&showsrc=1 | |
| 1967 | 1966 | function TFormularioGeral.URLDecode(const S: string): string; |
| 1968 | 1967 | var |
| 1969 | 1968 | Idx: Integer; // loops thru chars in string |
| ... | ... | @@ -2021,15 +2020,15 @@ var strXML, |
| 2021 | 2020 | begin |
| 2022 | 2021 | |
| 2023 | 2022 | // ********************************************************************************************************** |
| 2024 | - // Esta procedure tratará os comandos e suas ações, enviados em um pacote XML na requisição, conforme abaixo: | |
| 2023 | + // Esta procedure tratar� os comandos e suas a��es, enviados em um pacote XML na requisi��o, conforme abaixo: | |
| 2025 | 2024 | // ********************************************************************************************************** |
| 2026 | - // 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) | |
| 2027 | - // Requisição: Tag <Execute> | |
| 2025 | + // 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) | |
| 2026 | + // Requisi��o: Tag <Execute> | |
| 2028 | 2027 | // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK' |
| 2029 | 2028 | // |
| 2030 | - // Ask -> Comando que perguntará sobre a existência de um determinado arquivo na estação. | |
| 2031 | - // Requisição: Tag <FileName>: Nome do arquivo a pesquisar no repositório local | |
| 2032 | - // Tag <FileHash>: Hash referente ao arquivo a ser pesquisado no repositório local | |
| 2029 | + // Ask -> Comando que perguntar� sobre a exist�ncia de um determinado arquivo na esta��o. | |
| 2030 | + // Requisi��o: Tag <FileName>: Nome do arquivo a pesquisar no reposit�rio local | |
| 2031 | + // Tag <FileHash>: Hash referente ao arquivo a ser pesquisado no reposit�rio local | |
| 2033 | 2032 | // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK'; |
| 2034 | 2033 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'Tenho' ou |
| 2035 | 2034 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'NaoTenho' ou |
| ... | ... | @@ -2037,38 +2036,38 @@ begin |
| 2037 | 2036 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'Ocupado'. |
| 2038 | 2037 | // |
| 2039 | 2038 | // |
| 2040 | - // Erase -> Comando que provocará a exclusão de determinado arquivo. | |
| 2041 | - // Deverá ser acompanhado das tags <FileName> e <FileHash> | |
| 2042 | - // Requisição: Tag <FileName>: Nome do arquivo a ser excluído do repositório local | |
| 2043 | - // Tag <FileHash>: Hash referente ao arquivo a ser excluído do repositório local | |
| 2039 | + // Erase -> Comando que provocar� a exclus�o de determinado arquivo. | |
| 2040 | + // Dever� ser acompanhado das tags <FileName> e <FileHash> | |
| 2041 | + // Requisi��o: Tag <FileName>: Nome do arquivo a ser exclu�do do reposit�rio local | |
| 2042 | + // Tag <FileHash>: Hash referente ao arquivo a ser exclu�do do reposit�rio local | |
| 2044 | 2043 | // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK'; |
| 2045 | 2044 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'AcaoExecutada' ou |
| 2046 | 2045 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'ArquivoNaoEncontrado' ou |
| 2047 | 2046 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'EscritaNaoPermitida'; |
| 2048 | 2047 | // |
| 2049 | - // Registry -> Comando que provocará ação no Registry de estações com MS-Windows. | |
| 2050 | - // Deverá ser acompanhado das tags <Path>, <Action>, <Condition> e <Value> | |
| 2051 | - // Requisição: Tag <Path> : Caminho no Registry | |
| 2052 | - // Tag <Action> : Ação para execução | |
| 2053 | - // SAVE => Salva o valor contido na tag <Value> de acordo com condição contida na tag <Condition> | |
| 2054 | - // ERASE => Apaga a chave de acordo com condição contida na tag <Condition> | |
| 2055 | - // Tag <Condition> : Condiçção para execução da ação | |
| 2048 | + // Registry -> Comando que provocar� a��o no Registry de esta��es com MS-Windows. | |
| 2049 | + // Dever� ser acompanhado das tags <Path>, <Action>, <Condition> e <Value> | |
| 2050 | + // Requisi��o: Tag <Path> : Caminho no Registry | |
| 2051 | + // Tag <Action> : A��o para execu��o | |
| 2052 | + // SAVE => Salva o valor contido na tag <Value> de acordo com condi��o contida na tag <Condition> | |
| 2053 | + // ERASE => Apaga a chave de acordo com condi��o contida na tag <Condition> | |
| 2054 | + // Tag <Condition> : Condi���o para execu��o da a��o | |
| 2056 | 2055 | // EQUAL => Se o valor contido na tag <Value> for IGUAL ao valor encontrado na chave |
| 2057 | 2056 | // DIFFER => Se o valor contido na tag <Value> for DIFERENTE ao valor encontrado na chave |
| 2058 | - // NONE => Nenhuma condição, permitindo a execução da ação de forma incondicional | |
| 2059 | - // Tag <Value> : Valor a ser utilizado na ação | |
| 2057 | + // NONE => Nenhuma condi��o, permitindo a execu��o da a��o de forma incondicional | |
| 2058 | + // Tag <Value> : Valor a ser utilizado na a��o | |
| 2060 | 2059 | // Respostas: AResponseinfo.ContentText := AResponseinfo.ContentText + 'OK'; |
| 2061 | 2060 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'AcaoExecutada' ou |
| 2062 | 2061 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'ChaveNaoEncontrada' ou |
| 2063 | 2062 | // AResponseinfo.ContentText := AResponseinfo.ContentText + 'EscritaNaoPermitida'; |
| 2064 | 2063 | // |
| 2065 | - // Exit -> Comando para finalização do agente principal (bandeja) | |
| 2064 | + // Exit -> Comando para finaliza��o do agente principal (bandeja) | |
| 2066 | 2065 | |
| 2067 | - // Palavra Chave definida por GerCols, enviada e armazenada no BD. A autenticação da comunicação é baseada na verificação deste valor. | |
| 2068 | - // A geração da palavra chave dar-se-á a cada contato do GerCols com o módulo Gerente WEB | |
| 2066 | + // Palavra Chave definida por GerCols, enviada e armazenada no BD. A autentica��o da comunica��o � baseada na verifica��o deste valor. | |
| 2067 | + // A gera��o da palavra chave dar-se-� a cada contato do GerCols com o m�dulo Gerente WEB | |
| 2069 | 2068 | // te_palavra_chave -> <TE_PALAVRA_CHAVE> |
| 2070 | 2069 | |
| 2071 | - // Tratamento da requisição http... | |
| 2070 | + // Tratamento da requisi��o http... | |
| 2072 | 2071 | strXML := URLDecode(ARequestInfo.UnparsedParams); |
| 2073 | 2072 | intAux := Pos('=',strXML); |
| 2074 | 2073 | strXML := copy(strXML,(intAux+1),StrLen(PAnsiChar(strXML))-intAux); |
| ... | ... | @@ -2076,11 +2075,11 @@ begin |
| 2076 | 2075 | |
| 2077 | 2076 | |
| 2078 | 2077 | |
| 2079 | - // Autenticação e tratamento da requisição | |
| 2078 | + // Autentica��o e tratamento da requisi��o | |
| 2080 | 2079 | if (objCACIC.xmlGetValue('te_palavra_chave',strXML) = objCACIC.getValueMemoryData('Configs.te_palavra_chave',v_tstrCipherOpened)) then |
| 2081 | 2080 | Begin |
| 2082 | 2081 | strCmd := objCACIC.xmlGetValue('cmd',strXML); |
| 2083 | - // As ações terão seus valores | |
| 2082 | + // As a��es ter�o seus valores | |
| 2084 | 2083 | |
| 2085 | 2084 | if (strCmd = 'Execute') or |
| 2086 | 2085 | (strCmd = 'Ask') or |
| ... | ... | @@ -2089,10 +2088,10 @@ begin |
| 2089 | 2088 | (strCmd = 'Exit') then |
| 2090 | 2089 | AResponseinfo.ContentText := 'OK' |
| 2091 | 2090 | else |
| 2092 | - AResponseinfo.ContentText := 'COMANDO NÃO RECONHECIDO!'; | |
| 2091 | + AResponseinfo.ContentText := 'COMANDO N�O RECONHECIDO!'; | |
| 2093 | 2092 | End |
| 2094 | 2093 | else |
| 2095 | - AResponseinfo.ContentText := 'ACESSO NÃO PERMITIDO!'; | |
| 2094 | + AResponseinfo.ContentText := 'ACESSO N�O PERMITIDO!'; | |
| 2096 | 2095 | |
| 2097 | 2096 | if (strCmd = 'Execute') then |
| 2098 | 2097 | ExecutaCACIC(nil) |
| ... | ... | @@ -2140,10 +2139,10 @@ if (pStrRCAction = '') then |
| 2140 | 2139 | else |
| 2141 | 2140 | Begin |
| 2142 | 2141 | tstrActions := objCACIC.explode(pStrRCAction,'[FIELD]'); |
| 2143 | - if (AnsiPos('OSCE_DEBUG' ,tstrActions[1]) = 0) and // Não informo sobre as ações temporárias do OfficeScan (vide docs.trendmicro.com -> HotFix 1197) | |
| 2144 | - (AnsiPos('ck_conexao.' ,tstrActions[1]) = 0) and // Não informo sobre as ações com o arquivo de controle de conexao do srCACICsrv | |
| 2145 | - (AnsiPos(objCACIC.getLocalFolderName,tstrActions[1]) = 0) and // Não informo sobre as ações de rotina na pasta do CACIC | |
| 2146 | - (trim(tstrActions[1]) <> '') then // Não informo caso o parâmetro 1 (origem) esteja vazio | |
| 2142 | + if (AnsiPos('OSCE_DEBUG' ,tstrActions[1]) = 0) and // N�o informo sobre as a��es tempor�rias do OfficeScan (vide docs.trendmicro.com -> HotFix 1197) | |
| 2143 | + (AnsiPos('ck_conexao.' ,tstrActions[1]) = 0) and // N�o informo sobre as a��es com o arquivo de controle de conexao do srCACICsrv | |
| 2144 | + (AnsiPos(objCACIC.getLocalFolderName,tstrActions[1]) = 0) and // N�o informo sobre as a��es de rotina na pasta do CACIC | |
| 2145 | + (trim(tstrActions[1]) <> '') then // N�o informo caso o par�metro 1 (origem) esteja vazio | |
| 2147 | 2146 | Begin |
| 2148 | 2147 | objCACIC.writeDebugLog('CheckRCActions: ' + pStrRCAction); |
| 2149 | 2148 | strRCActionsAux2 := objCACIC.getValueFromFile('srCACICcli','m_idConexao',objCACIC.getLocalFolderName + 'Temp\ck_conexao.ini'); |
| ... | ... | @@ -2169,17 +2168,17 @@ var v_strTeSO, |
| 2169 | 2168 | begin |
| 2170 | 2169 | if boolServerON then // Ordeno ao SrCACICsrv que auto-finalize |
| 2171 | 2170 | Begin |
| 2172 | - // Desligando a captura de ações | |
| 2171 | + // Desligando a captura de a��es | |
| 2173 | 2172 | CN.Stop; |
| 2174 | 2173 | |
| 2175 | - objCACIC.writeDailyLog('Desativando o Módulo de Suporte Remoto Seguro.'); | |
| 2174 | + objCACIC.writeDailyLog('Desativando o M�dulo de Suporte Remoto Seguro.'); | |
| 2176 | 2175 | |
| 2177 | 2176 | objCACIC.createOneProcess(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe -kill',false,SW_HIDE); |
| 2178 | 2177 | objCacic.setBoolCipher(not objCacic.isInDebugMode); |
| 2179 | - // Bloqueio o módulo de suporte remoto seguro na FireWall nativa. | |
| 2178 | + // Bloqueio o m�dulo de suporte remoto seguro na FireWall nativa. | |
| 2180 | 2179 | objCACIC.addApplicationToFirewall('srCACIC - Suporte Remoto Seguro do Sistema CACIC',objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe', false); |
| 2181 | 2180 | |
| 2182 | - Sleep(3000); // Pausa para liberação do aguarde_srCACIC.txt | |
| 2181 | + Sleep(3000); // Pausa para libera��o do aguarde_srCACIC.txt | |
| 2183 | 2182 | |
| 2184 | 2183 | CheckRCActions; |
| 2185 | 2184 | |
| ... | ... | @@ -2211,13 +2210,13 @@ begin |
| 2211 | 2210 | v_strNuPortaSR := trim(objCACIC.deCrypt( objCACIC.GetValueFromFile('Configs','NuPortaSrCacic' , strMainProgramInfFileName))); |
| 2212 | 2211 | v_strNuTimeOutSR := trim(objCACIC.GetValueFromFile('Configs','NuTimeOutSrCacic' , strMainProgramInfFileName)); |
| 2213 | 2212 | |
| 2214 | - // Detectar versão do Windows antes de fazer a chamada seguinte... | |
| 2213 | + // Detectar vers�o do Windows antes de fazer a chamada seguinte... | |
| 2215 | 2214 | try |
| 2216 | 2215 | AssignFile(fileAguarde,objCACIC.getLocalFolderName + 'Temp\aguarde_srCACIC.txt'); |
| 2217 | 2216 | {$IOChecks off} |
| 2218 | 2217 | Reset(fileAguarde); {Abre o arquivo texto} |
| 2219 | 2218 | {$IOChecks on} |
| 2220 | - if (IOResult <> 0) then // Arquivo não existe, será recriado. | |
| 2219 | + if (IOResult <> 0) then // Arquivo n�o existe, ser� recriado. | |
| 2221 | 2220 | begin |
| 2222 | 2221 | Rewrite (fileAguarde); |
| 2223 | 2222 | Append(fileAguarde); |
| ... | ... | @@ -2228,11 +2227,11 @@ begin |
| 2228 | 2227 | Finally |
| 2229 | 2228 | End; |
| 2230 | 2229 | |
| 2231 | - objCACIC.writeDebugLog('Mnu_SuporteRemotoClick: Verificando validade do módulo srCACICsrv para chamada!'); | |
| 2230 | + objCACIC.writeDebugLog('Mnu_SuporteRemotoClick: Verificando validade do m�dulo srCACICsrv para chamada!'); | |
| 2232 | 2231 | |
| 2233 | 2232 | objCACIC.writeDebugLog('Mnu_SuporteRemotoClick: objCACIC.getFileHash('+objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe'+') = "'+objCACIC.getFileHash(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe'+'"')); |
| 2234 | 2233 | |
| 2235 | - // Executarei o srCACICsrv após batimento do HASHCode | |
| 2234 | + // Executarei o srCACICsrv ap�s batimento do HASHCode | |
| 2236 | 2235 | if (objCACIC.getFileHash(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe') = objCACIC.deCrypt( objCACIC.GetValueFromFile('Hash-Codes','SRCACICSRV.EXE', strChkSisInfFileName),false,true)) then |
| 2237 | 2236 | Begin |
| 2238 | 2237 | objCACIC.writeDebugLog('Mnu_SuporteRemotoClick: Invocando (Criptografado)"'+objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe -start [' + objCACIC.getWebManagerAddress + ']' + |
| ... | ... | @@ -2251,7 +2250,7 @@ begin |
| 2251 | 2250 | '[' + v_strNuPortaSR + ']' + |
| 2252 | 2251 | '[' + v_strNuTimeOutSR + ']'); |
| 2253 | 2252 | |
| 2254 | - // Libero o módulo de suporte remoto seguro na FireWall nativa. | |
| 2253 | + // Libero o m�dulo de suporte remoto seguro na FireWall nativa. | |
| 2255 | 2254 | objCACIC.addApplicationToFirewall('srCACIC - Suporte Remoto Seguro do Sistema CACIC',objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe', true); |
| 2256 | 2255 | |
| 2257 | 2256 | objCACIC.createOneProcess(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe -start [' + objCACIC.getWebManagerAddress + ']' + |
| ... | ... | @@ -2262,19 +2261,19 @@ begin |
| 2262 | 2261 | '[' + v_strNuPortaSR + ']' + |
| 2263 | 2262 | '[' + v_strNuTimeOutSR + ']',false,SW_NORMAL); |
| 2264 | 2263 | tstrAux.Free; |
| 2265 | - Sleep(3000); // Pausa para criação do aguarde_srCACIC.txt | |
| 2264 | + Sleep(3000); // Pausa para cria��o do aguarde_srCACIC.txt | |
| 2266 | 2265 | objCACIC.setBoolCipher(not objCACIC.isInDebugMode); |
| 2267 | 2266 | InicializaTray; |
| 2268 | 2267 | |
| 2269 | - // Ligando a captura de ações | |
| 2268 | + // Ligando a captura de a��es | |
| 2270 | 2269 | CN.Execute; |
| 2271 | 2270 | |
| 2272 | 2271 | BoolServerON := true; |
| 2273 | 2272 | End |
| 2274 | 2273 | else |
| 2275 | 2274 | Begin |
| 2276 | - objCACIC.writeDailyLog('Execução de srCACICsrv impedida por falta de integridade!'); | |
| 2277 | - objCACIC.writeDailyLog('Providenciando nova cópia.'); | |
| 2275 | + objCACIC.writeDailyLog('Execu��o de srCACICsrv impedida por falta de integridade!'); | |
| 2276 | + objCACIC.writeDailyLog('Providenciando nova c�pia.'); | |
| 2278 | 2277 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'Modules\srcacicsrv.exe'); |
| 2279 | 2278 | Invoca_GerCols('recuperaSR'); |
| 2280 | 2279 | intPausaRecupera := 0; |
| ... | ... | @@ -2333,26 +2332,26 @@ end; |
| 2333 | 2332 | |
| 2334 | 2333 | procedure TFormularioGeral.CheckIfDownloadedVersion; |
| 2335 | 2334 | Begin |
| 2336 | - objCACIC.writeDebugLog('CheckIfDownloadedVersion: Verificando existência de nova versão baixada do Agente Principal...'); | |
| 2335 | + objCACIC.writeDebugLog('CheckIfDownloadedVersion: Verificando exist�ncia de nova vers�o baixada do Agente Principal...'); | |
| 2337 | 2336 | |
| 2338 | - // Caso tenha sido baixada nova cópia do Agente Principal, esta deverá ser movida para cima da atual pelo Gerente de Coletas... | |
| 2337 | + // Caso tenha sido baixada nova c�pia do Agente Principal, esta dever� ser movida para cima da atual pelo Gerente de Coletas... | |
| 2339 | 2338 | if (FileExists(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName)) then |
| 2340 | 2339 | Begin |
| 2341 | - objCACIC.writeDebugLog('CheckIfDownloadedVersion: Hash Code de Executável("'+objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName+'") = "' + objCACIC.getFileHash(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName) + '"'); | |
| 2342 | - objCACIC.writeDebugLog('CheckIfDownloadedVersion: Hash Code Desejável = "' + objCACIC.deCrypt( objCACIC.GetValueFromFile('Hash-Codes', objCACIC.getMainProgramName,strChkSisInfFileName),false,true) + '"'); | |
| 2340 | + objCACIC.writeDebugLog('CheckIfDownloadedVersion: Hash Code de Execut�vel("'+objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName+'") = "' + objCACIC.getFileHash(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName) + '"'); | |
| 2341 | + objCACIC.writeDebugLog('CheckIfDownloadedVersion: Hash Code Desej�vel = "' + objCACIC.deCrypt( objCACIC.GetValueFromFile('Hash-Codes', objCACIC.getMainProgramName,strChkSisInfFileName),false,true) + '"'); | |
| 2343 | 2342 | if (objCACIC.deCrypt( objCACIC.GetValueFromFile('Hash-Codes',objCACIC.getMainProgramName, strChkSisInfFileName),false,true) = objCACIC.getFileHash(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName)) then //AutoUpdate! |
| 2344 | 2343 | Begin |
| 2345 | - objCACIC.writeDebugLog('CheckIfDownloadedVersion: Encontrei a nova versão em '+objCACIC.getLocalFolderName + 'Temp); | |
| 2344 | + objCACIC.writeDebugLog('CheckIfDownloadedVersion: Encontrei a nova vers�o em '+objCACIC.getLocalFolderName + 'Temp); | |
| 2346 | 2345 | if (objCACIC.getFileHash(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName) = objCACIC.getFileHash(objCACIC.getLocalFolderName + objCACIC.getMainProgramName)) then |
| 2347 | 2346 | Begin |
| 2348 | - objCACIC.writeDebugLog('CheckIfDownloadedVersion: Os hashs codes entre '+objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName + ' e ' + objCACIC.getLocalFolderName + objCACIC.getMainProgramName + ' são iguais!'); | |
| 2347 | + objCACIC.writeDebugLog('CheckIfDownloadedVersion: Os hashs codes entre '+objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName + ' e ' + objCACIC.getLocalFolderName + objCACIC.getMainProgramName + ' s�o iguais!'); | |
| 2349 | 2348 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName) |
| 2350 | 2349 | End |
| 2351 | 2350 | else |
| 2352 | 2351 | Begin |
| 2353 | - objCACIC.writeDebugLog('CheckIfDownloadedVersion: Os hashs codes entre '+objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName + ' e ' + objCACIC.getLocalFolderName + objCACIC.getMainProgramName + ' são diferentes!'); | |
| 2354 | - objCACIC.writeDailyLog('Versão Nova de '+objCACIC.getMainProgramName+' Encontrada. ('+objCACIC.GetVersionInfo(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName)+')'); | |
| 2355 | - objCACIC.writeDailyLog('Finalizando para Auto-Atualização.'); | |
| 2352 | + objCACIC.writeDebugLog('CheckIfDownloadedVersion: Os hashs codes entre '+objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName + ' e ' + objCACIC.getLocalFolderName + objCACIC.getMainProgramName + ' s�o diferentes!'); | |
| 2353 | + objCACIC.writeDailyLog('Vers�o Nova de '+objCACIC.getMainProgramName+' Encontrada. ('+objCACIC.GetVersionInfo(objCACIC.getLocalFolderName + 'Temp\' + objCACIC.getMainProgramName)+')'); | |
| 2354 | + objCACIC.writeDailyLog('Finalizando para Auto-Atualiza��o.'); | |
| 2356 | 2355 | CopyFile(PChar(objCACIC.getLocalFolderName + 'aguarde_CACIC.txt'),PChar(objCACIC.getLocalFolderName + 'Temp\atualiza_CACIC.txt'),false); |
| 2357 | 2356 | Finaliza(false); |
| 2358 | 2357 | End; |
| ... | ... | @@ -2566,8 +2565,8 @@ begin |
| 2566 | 2565 | objCACIC.deleteFileOrFolder(objCACIC.getLocalFolderName + 'Temp\ck_conexao.ini'); |
| 2567 | 2566 | FormularioGeral.ExecutaCACIC(nil); |
| 2568 | 2567 | End; |
| 2569 | - objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Verificando existência de nova versão de CACICservice para atualização'); | |
| 2570 | - // Verificação de existência de nova versão do CACICservice para substituição e execução | |
| 2568 | + objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Verificando exist�ncia de nova vers�o de CACICservice para atualiza��o'); | |
| 2569 | + // Verifica��o de exist�ncia de nova vers�o do CACICservice para substitui��o e execu��o | |
| 2571 | 2570 | if FileExists(objCACIC.getLocalFolderName + 'Temp\cacicservice.exe') then |
| 2572 | 2571 | Begin |
| 2573 | 2572 | objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Eliminando "'+objCACIC.getWinDir + 'cacicservice.exe"'); |
| ... | ... | @@ -2577,21 +2576,21 @@ begin |
| 2577 | 2576 | |
| 2578 | 2577 | if not FileExists(objCACIC.getWinDir + 'cacicservice.exe') then |
| 2579 | 2578 | Begin |
| 2580 | - objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Eliminação OK! Movendo "'+objCACIC.getLocalFolderName + 'Temp\cacicservice.exe" para "'+objCACIC.getWinDir + 'cacicservice.exe"'); | |
| 2579 | + objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Elimina��o OK! Movendo "'+objCACIC.getLocalFolderName + 'Temp\cacicservice.exe" para "'+objCACIC.getWinDir + 'cacicservice.exe"'); | |
| 2581 | 2580 | MoveFile(PChar(objCACIC.getLocalFolderName + 'Temp\cacicservice.exe'),PChar(objCACIC.getWinDir + 'cacicservice.exe')); |
| 2582 | 2581 | sleep(2000); |
| 2583 | 2582 | |
| 2584 | 2583 | FormularioGeral.ServiceStart('','CacicSustainService'); |
| 2585 | 2584 | End |
| 2586 | 2585 | else |
| 2587 | - objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Impossível Eliminar "'+objCACIC.getWinDir + 'cacicservice.exe"'); | |
| 2586 | + objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Imposs�vel Eliminar "'+objCACIC.getWinDir + 'cacicservice.exe"'); | |
| 2588 | 2587 | End; |
| 2589 | 2588 | End; |
| 2590 | 2589 | Finally |
| 2591 | 2590 | g_intTaskBarAtual := FindWindow('Shell_TrayWnd', Nil); |
| 2592 | 2591 | g_intDesktopWindow := FormularioGeral.getDesktopWindowHandle; |
| 2593 | 2592 | |
| 2594 | - objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Valores para Condição de Redesenho do ícone no SysTRAY...'); | |
| 2593 | + objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Valores para Condi��o de Redesenho do �cone no SysTRAY...'); | |
| 2595 | 2594 | objCACIC.writeDebugLog('timerCheckNoMinutoTimer: g_intTaskBarAnterior : ' + IntToStr(g_intTaskBarAnterior)); |
| 2596 | 2595 | objCACIC.writeDebugLog('timerCheckNoMinutoTimer: g_intTaskBarAtual : ' + IntToStr(g_intTaskBarAtual)); |
| 2597 | 2596 | objCACIC.writeDebugLog('timerCheckNoMinutoTimer: g_intDesktopWindow : ' + IntToStr(g_intDesktopWindow)); |
| ... | ... | @@ -2604,7 +2603,7 @@ begin |
| 2604 | 2603 | Begin |
| 2605 | 2604 | objCACIC.writeDebugLog('timerCheckNoMinutoTimer: Invocando InicializaTray...'); |
| 2606 | 2605 | if ((g_intTaskBarAnterior = 0) and (g_intTaskBarAtual > 0)) then |
| 2607 | - g_intStatusAnterior := -1; // Para forçar o redesenho no systray | |
| 2606 | + g_intStatusAnterior := -1; // Para for�ar o redesenho no systray | |
| 2608 | 2607 | |
| 2609 | 2608 | FormularioGeral.InicializaTray; |
| 2610 | 2609 | End; |
| ... | ... | @@ -2647,7 +2646,7 @@ begin |
| 2647 | 2646 | ARect.Left := LEFT_MENU_ITEM; |
| 2648 | 2647 | ACanvas.FillRect(ARect); |
| 2649 | 2648 | |
| 2650 | - DrawText(ACanvas.Handle, PChar('Configurações'), -1, ARect, DT_LEFT or DT_VCENTER or DT_SINGLELINE{ or DT_NOCLIP}); | |
| 2649 | + DrawText(ACanvas.Handle, PChar('Configura��es'), -1, ARect, DT_LEFT or DT_VCENTER or DT_SINGLELINE{ or DT_NOCLIP}); | |
| 2651 | 2650 | end; |
| 2652 | 2651 | |
| 2653 | 2652 | procedure TFormularioGeral.Mnu_ExecutarAgoraDrawItem(Sender: TObject; |
| ... | ... | @@ -2675,7 +2674,7 @@ begin |
| 2675 | 2674 | ARect.Left := LEFT_MENU_ITEM; |
| 2676 | 2675 | ACanvas.FillRect(ARect); |
| 2677 | 2676 | |
| 2678 | - DrawText(ACanvas.Handle, PChar('Informações Gerais'), -1, ARect, DT_LEFT or DT_VCENTER or DT_SINGLELINE{ or DT_NOCLIP}); | |
| 2677 | + DrawText(ACanvas.Handle, PChar('Informa��es Gerais'), -1, ARect, DT_LEFT or DT_VCENTER or DT_SINGLELINE{ or DT_NOCLIP}); | |
| 2679 | 2678 | end; |
| 2680 | 2679 | |
| 2681 | 2680 | procedure TFormularioGeral.Mnu_SuporteRemotoDrawItem(Sender: TObject; |
| ... | ... | @@ -2734,7 +2733,7 @@ begin |
| 2734 | 2733 | // it will fail because it no longer exists when the explorer restarts. |
| 2735 | 2734 | on E:Exception do |
| 2736 | 2735 | Begin |
| 2737 | - objCACIC.writeExceptionLog(E.Message,e.ClassName,'ApplicationEvents1Message - Liberando Systray Icon para recriação'); | |
| 2736 | + objCACIC.writeExceptionLog(E.Message,e.ClassName,'ApplicationEvents1Message - Liberando Systray Icon para recria��o'); | |
| 2738 | 2737 | End; |
| 2739 | 2738 | end; |
| 2740 | 2739 | TrayIcon1 := TTrayIcon.Create(self); | ... | ... |