From 230a925a012d37709fc0d6607e5cd54275392589 Mon Sep 17 00:00:00 2001 From: Eric Menezes Noronha Date: Tue, 13 May 2014 16:53:37 -0300 Subject: [PATCH] -Correção de bugs. --- MapaTesteProj/MapaTeste.dcu | Bin 30043 -> 0 bytes MapaTesteProj/MapaTeste.pas | 6 +++--- gercols/gercols.dpr | 11 ++++++----- main.pas | 11 ++++++----- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/MapaTesteProj/MapaTeste.dcu b/MapaTesteProj/MapaTeste.dcu index bc75d2e..98bfcee 100644 Binary files a/MapaTesteProj/MapaTeste.dcu and b/MapaTesteProj/MapaTeste.dcu differ diff --git a/MapaTesteProj/MapaTeste.pas b/MapaTesteProj/MapaTeste.pas index 5dd1346..d5a4aa6 100644 --- a/MapaTesteProj/MapaTeste.pas +++ b/MapaTesteProj/MapaTeste.pas @@ -292,7 +292,8 @@ end; //------------------------------------------------------------------------------ function TfrmMapaCacic.getConfigs : String; - +var + teste : string; Begin btCombosUpdate.Enabled := false; @@ -411,8 +412,7 @@ if edTeInfoPatrimonio5.text <> '' then Finalizar(true); end else - ShowMessage(#13#10+'Atenção!'+ #13#10 + 'É necessário digitar seu nome.' - + #13#10); + Application.messagebox(Pchar('Por favor, é necessário digitar seu nome!'), 'Atenção!',MB_ICONEXCLAMATION + mb_ok); end; diff --git a/gercols/gercols.dpr b/gercols/gercols.dpr index 85907a6..d3e20c7 100644 --- a/gercols/gercols.dpr +++ b/gercols/gercols.dpr @@ -245,6 +245,9 @@ Begin objCacic.setValueToFile('Configs','ConexaoOK','S', strGerColsInfFileName); if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then Begin + objCacic.setValueToFile('Configs','forca_coleta', + objCacic.getValueFromTags('ForcaColeta', strRetorno, '<>'), + strGerColsInfFileName); objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName); objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName); objCacic.setWebManagerAddress(objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>')); @@ -333,6 +336,7 @@ Begin ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //Gravação no DatFileName dos valores de REDE, COMPUTADOR e EXECUÇÃO obtidos, para consulta pelos outros módulos... ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + objCacic.setValueToFile('Configs' ,'modulo_patr' ,objCacic.getValueFromTags('modPatrimonio' , strRetorno, '<>'), strGerColsInfFileName); objCacic.setValueToFile('Configs' ,'CollectsDefinitions' ,objCacic.getValueFromTags('CollectsDefinitions' , strRetorno, '<>'), strGerColsInfFileName); objCacic.setValueToFile('Configs' ,'TeServUpdates' ,objCacic.getValueFromTags('te_serv_updates' , strRetorno, '<>'), strChkSisInfFileName); objCacic.setValueToFile('Configs' ,'NuPortaServUpdates' ,objCacic.getValueFromTags('nu_porta_serv_updates' , strRetorno, '<>'), strChkSisInfFileName); @@ -367,10 +371,7 @@ Begin end; procedure getTest(); -var strRetorno, - v_mensagem_log, - strKeyWord : string; - textfileKeyWord : TextFile; +var strRetorno: string; Begin Try // Verifico comunicação com o Módulo Gerente WEB. @@ -391,7 +392,7 @@ Begin if (objCacic.getValueFromTags('WebManagerAddress', strRetorno,'<>') <> '') then Begin objCacic.setValueToFile('Configs','forca_coleta', - objCacic.getValueFromTags('forca_coleta', strRetorno), + objCacic.getValueFromTags('ForcaColeta', strRetorno, '<>'), strGerColsInfFileName); objCacic.setValueToFile('Configs','WebManagerAddress' ,objCacic.getValueFromTags('WebManagerAddress' , strRetorno,'<>'), strChkSisInfFileName); objCacic.setValueToFile('Configs','WebServicesFolderName',objCacic.getValueFromTags('WebServicesFolderName', strRetorno,'<>'), strChkSisInfFileName); diff --git a/main.pas b/main.pas index 1977e24..e26e789 100755 --- a/main.pas +++ b/main.pas @@ -1225,8 +1225,10 @@ end; procedure TFormularioGeral.InvocaMapa1Click(Sender: TObject); begin - if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'ativo') then - Invoca_MapaCacic; + if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'N') then + Invoca_MapaCacic + else + MessageDlg(#13#13+'Módulo desabilitado!',mtError, [mbOK], 0); end; //////////////////////////////////////////////////////////////////////////////// @@ -1296,7 +1298,7 @@ begin //////////////////////////////////////////////////////////////////////////////// if (trim(objCACIC.getValueFromFile('Configs','col_patr_exe', strGerColsInfFileName))<>'s') and (ActualActivity<>4) - and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'ativo') then begin + and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) <> 'N') then begin objCACIC.writeDebugLog('ExecutaCACIC: Executa chamada ao Mapa Cacic...'); Invoca_MapaCacic; end; @@ -1336,8 +1338,7 @@ begin // Serão 4 tentativas por minuto // Serão 30 minutos no máximo de tentativas, totalizando 120 intTentativas := 0; - while (not Pode_Coletar and (intTentativas < 121)) and - (objCACIC.getValueFromFile('Configs', 'forca_coleta',strGercolsInfFileName) <> 'S') do + while (not Pode_Coletar and (intTentativas < 121)) do Begin objCACIC.writeDebugLog('ExecutaCACIC: Aguardando 15 segundos...'); Application.ProcessMessages; -- libgit2 0.21.2