From 86dc1bf08cfaf31a23db9de03333ba9884f3bacb Mon Sep 17 00:00:00 2001 From: Eric Menezes Noronha Date: Thu, 24 Jul 2014 14:44:01 -0300 Subject: [PATCH] Debug do mapa; Modificado texto de "acordo" do mapa; Melhoria ao chamar o mapa pelo cacic280. --- Mapa/Mapa.dfm | 49 ++++++++++++++++++++++++++++++------------------- Mapa/Mapa.pas | 4 ++-- Mapa/Source/synsock.pas | 2 +- Mapa/mapacacic.dproj | 2 +- Mapa/mapacacic.res | Bin 4188 -> 0 bytes main.pas | 18 +++++++++++++----- 6 files changed, 47 insertions(+), 28 deletions(-) diff --git a/Mapa/Mapa.dfm b/Mapa/Mapa.dfm index 3f74522..58d1d64 100644 --- a/Mapa/Mapa.dfm +++ b/Mapa/Mapa.dfm @@ -2,7 +2,7 @@ object frmMapaCacic: TfrmMapaCacic Left = 274 Top = 200 Caption = 'Mapa Cacic' - ClientHeight = 448 + ClientHeight = 461 ClientWidth = 789 Color = clBtnFace TransparentColorValue = clBtnFace @@ -92,12 +92,12 @@ object frmMapaCacic: TfrmMapaCacic OnKeyDown = FormKeyDown DesignSize = ( 789 - 448) + 461) PixelsPerInch = 96 TextHeight = 13 object edWebManagerAddress: TLabel Left = 155 - Top = 426 + Top = 439 Width = 500 Height = 14 Anchors = [akBottom] @@ -108,10 +108,11 @@ object frmMapaCacic: TfrmMapaCacic Font.Name = 'Arial' Font.Style = [fsBold] ParentFont = False + ExplicitTop = 426 end object lbWebManagerAddress: TLabel Left = 3 - Top = 429 + Top = 442 Width = 153 Height = 13 Anchors = [akLeft, akBottom] @@ -123,10 +124,11 @@ object frmMapaCacic: TfrmMapaCacic Font.Name = 'Arial' Font.Style = [] ParentFont = False + ExplicitTop = 429 end object pnVersao: TPanel Left = 683 - Top = 420 + Top = 433 Width = 105 Height = 20 Anchors = [akRight, akBottom] @@ -139,12 +141,13 @@ object frmMapaCacic: TfrmMapaCacic Font.Style = [fsBold] ParentFont = False TabOrder = 0 + ExplicitTop = 420 end object gbInformacoesSobreComputador: TGroupBox Left = 1 - Top = 58 + Top = 62 Width = 780 - Height = 361 + Height = 374 Anchors = [] Caption = ' Informa'#231#245'es sobre localiza'#231#227'o f'#237'sica e patrimonial deste comput' + @@ -158,7 +161,7 @@ object frmMapaCacic: TfrmMapaCacic TabOrder = 1 DesignSize = ( 780 - 361) + 374) object lbEtiqueta3: TLabel Left = 107 Top = 82 @@ -166,7 +169,7 @@ object frmMapaCacic: TfrmMapaCacic Height = 13 Hint = 'Insira o n'#250'mero do patrim'#244'nio do monitor, se o tiver.' AutoSize = False - Caption = 'Monitor 1' + Caption = 'Patrim'#244'nio do Monitor Principal' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 @@ -184,7 +187,7 @@ object frmMapaCacic: TfrmMapaCacic Height = 13 Hint = 'Insira o n'#250'mero do patrim'#244'nio do segundo monitor, se o tiver.' AutoSize = False - Caption = 'Monitor 2' + Caption = 'Patrim'#244'nio do Monitor Secund'#225'rio' Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 @@ -456,24 +459,30 @@ object frmMapaCacic: TfrmMapaCacic Left = 3 Top = 231 Width = 774 - Height = 58 + Height = 83 Caption = 'Termo de Responsabilidade' TabOrder = 9 object rdConcordaTermos: TRadioButton - Left = 24 - Top = 24 - Width = 553 - Height = 17 + Left = 16 + Top = 16 + Width = 737 + Height = 57 + BiDiMode = bdLeftToRight Caption = - 'Declaro minha responsabilidade pelas informa'#231#245'es e pelo(s) equip' + - 'amento(s) cadastrado(s).' + 'Declaro minha responsabilidade pelas informa'#231#245'es prestadas, pelo' + + '(s) equipamento(s) cadastrado(s), e que tenho pleno conhecimento' + + ' das orienta'#231#245'es contidas no memorando Circular n'#186' 999/2014/CGA' + + ', que traz orienta'#231#245'es sobre o armazenamento seguro de dados no ' + + 'ambiente computacional da PGFN.' + ParentBiDiMode = False TabOrder = 0 + WordWrap = True OnClick = rdConcordaTermosClick end end object btGravarInformacoes: TButton Left = 186 - Top = 308 + Top = 320 Width = 401 Height = 37 Anchors = [] @@ -488,6 +497,7 @@ object frmMapaCacic: TfrmMapaCacic TabOrder = 10 Visible = False OnClick = AtualizaPatrimonio + ExplicitTop = 308 end object edTeInfoPatrimonio6: TEdit Left = 420 @@ -526,7 +536,7 @@ object frmMapaCacic: TfrmMapaCacic end object gbLeiaComAtencao: TGroupBox Left = 0 - Top = 2 + Top = 3 Width = 780 Height = 53 Anchors = [] @@ -540,6 +550,7 @@ object frmMapaCacic: TfrmMapaCacic ParentColor = False ParentFont = False TabOrder = 2 + ExplicitTop = 2 DesignSize = ( 780 53) diff --git a/Mapa/Mapa.pas b/Mapa/Mapa.pas index 1053c40..3d1fd16 100644 --- a/Mapa/Mapa.pas +++ b/Mapa/Mapa.pas @@ -164,8 +164,7 @@ End; procedure TfrmMapaCacic.Finalizar; Begin Visible := false; - - reset(textFileAguarde); + if FileExists(objCACIC.getLocalFolderName + '\temp\aguarde_MAPACACIC.txt') then objCACIC.deleteFileOrFolder(objCacic.getLocalFolderName + '\temp\aguarde_MAPACACIC.txt'); @@ -453,6 +452,7 @@ Begin //-----------------------------USUARIO LOGADO----------------------------------- // edTeInfoUserLogado.Text := getUserLogon; + strTeInfoPatrimonio2 := ''; while(strTeInfoPatrimonio2 = '') and (count < 600) do begin strTeInfoPatrimonio2 := objCACIC.getValueFromTags('UserName',fetchWMIvalues('Win32_ComputerSystem',objCACIC.getLocalFolderName,'UserName')); diff --git a/Mapa/Source/synsock.pas b/Mapa/Source/synsock.pas index 6e851a8..ca576af 100644 --- a/Mapa/Source/synsock.pas +++ b/Mapa/Source/synsock.pas @@ -53,7 +53,7 @@ unit synsock; {$ENDIF} {$IFDEF WIN32} - {$I sswin32.inc} + {$I sswin32q.inc} {$ELSE} {$IFDEF FPC} {$I ssfpc.pas} diff --git a/Mapa/mapacacic.dproj b/Mapa/mapacacic.dproj index 02a9f5a..49c45f7 100644 --- a/Mapa/mapacacic.dproj +++ b/Mapa/mapacacic.dproj @@ -24,7 +24,7 @@ Delphi.Personality -FalseTrueFalseTrueFalse2819TrueFalseFalseFalseFalse10461252Dataprev - Emp. de TI da Prev Social - URES/SESSSistema CACIC - Módulo para Verificação e Instalação de Estrutura Básica do Sistema CACIC2.8.1.93.0Licença: GNU/LGPLmapacacic.dprFalse +FalseTrueFalseTrueFalse28111TrueFalseFalseFalseFalse10461252Dataprev - Emp. de TI da Prev Social - URES/SESSSistema CACIC - Módulo para Verificação e Instalação de Estrutura Básica do Sistema CACIC2.8.1.113.0Licença: GNU/LGPLmapacacic.dprFalse diff --git a/Mapa/mapacacic.res b/Mapa/mapacacic.res index 2bb35e2..7d4b343 100644 Binary files a/Mapa/mapacacic.res and b/Mapa/mapacacic.res differ diff --git a/main.pas b/main.pas index 45c41a2..eea79d0 100755 --- a/main.pas +++ b/main.pas @@ -1313,8 +1313,17 @@ end; procedure TFormularioGeral.InvocaMapa1Click(Sender: TObject); begin - if (ActualActivity<>4) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) = 'S') then + if (ActualActivity=0) and (objCACIC.getValueFromFile('Configs', 'modulo_patr', strGerColsInfFileName) = 'S') then Invoca_MapaCacic + else if(ActualActivity <> 0) then + begin + if ActualActivity = 1 then + MessageDlg(#13#13+'Coleta em execução!',mtInformation, [mbOK], 0); + if ActualActivity = 3 then + MessageDlg(#13#13+'Cacic sendo executado em suporte remoto!',mtInformation, [mbOK], 0); + if ActualActivity = 4 then + MessageDlg(#13#13+'Mapa já está em execução!',mtInformation, [mbOK], 0); + end else MessageDlg(#13#13+'Módulo desabilitado!',mtInformation, [mbOK], 0); end; @@ -1334,16 +1343,15 @@ begin Begin objCacic.writeDailyLog('Invoca_MapaCacic: Criando processo mapa.'); objCACIC.writeDebugLog('Invoca_MapaCacic: Criando Processo Mapa => "'+objCACIC.getLocalFolderName + 'Modules\MapaCACIC.exe'); - sleep(10000); //Pausa para dar tempo de realizar o login na máquina, senão o usuário fica em branco. if (objCACIC.createOneProcess(objCACIC.getLocalFolderName + 'Modules\mapacacic.exe',false,SW_SHOW)) then objCacic.writeDailyLog('Invoca_MapaCacic: Processo criado.') else objCacic.writeDailyLog('Invoca_MapaCacic: Falha ao criar processo.'); End - else - objCACIC.writeDailyLog('Não foi possível invocar o Mapa Cacic!'); - End; + else + objCACIC.writeDailyLog('Não foi possível invocar o Mapa Cacic!'); End; + End; end; function TFormularioGeral.FindWindowByTitle(WindowTitle: string): Hwnd; -- libgit2 0.21.2