Commit a2a4aedd3c71df6211eacf613a64572dabae97f4
1 parent
04e10eae
Exists in
master
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/agente-windo…
…ws@1572 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
15 changed files
with
1727 additions
and
0 deletions
Show diff stats
No preview for this file type
| ... | ... | @@ -0,0 +1,159 @@ |
| 1 | +object frmAcesso: TfrmAcesso | |
| 2 | + Left = 0 | |
| 3 | + Top = 0 | |
| 4 | + Caption = 'Acessar' | |
| 5 | + ClientHeight = 309 | |
| 6 | + ClientWidth = 624 | |
| 7 | + Color = clBtnFace | |
| 8 | + Font.Charset = DEFAULT_CHARSET | |
| 9 | + Font.Color = clWindowText | |
| 10 | + Font.Height = -11 | |
| 11 | + Font.Name = 'Tahoma' | |
| 12 | + Font.Style = [] | |
| 13 | + OldCreateOrder = False | |
| 14 | + PixelsPerInch = 96 | |
| 15 | + TextHeight = 13 | |
| 16 | + object btAcesso: TButton | |
| 17 | + Left = 177 | |
| 18 | + Top = 260 | |
| 19 | + Width = 105 | |
| 20 | + Height = 33 | |
| 21 | + Caption = 'Acessar' | |
| 22 | + Default = True | |
| 23 | + Enabled = False | |
| 24 | + Font.Charset = DEFAULT_CHARSET | |
| 25 | + Font.Color = clWindowText | |
| 26 | + Font.Height = -16 | |
| 27 | + Font.Name = 'Arial' | |
| 28 | + Font.Style = [fsBold] | |
| 29 | + ParentFont = False | |
| 30 | + TabOrder = 0 | |
| 31 | + end | |
| 32 | + object btCancela: TButton | |
| 33 | + Left = 333 | |
| 34 | + Top = 260 | |
| 35 | + Width = 105 | |
| 36 | + Height = 33 | |
| 37 | + Caption = 'Cancelar' | |
| 38 | + Font.Charset = DEFAULT_CHARSET | |
| 39 | + Font.Color = clWindowText | |
| 40 | + Font.Height = -16 | |
| 41 | + Font.Name = 'Arial' | |
| 42 | + Font.Style = [fsBold] | |
| 43 | + ParentFont = False | |
| 44 | + TabOrder = 1 | |
| 45 | + end | |
| 46 | + object pnAcesso: TPanel | |
| 47 | + Left = 2 | |
| 48 | + Top = 3 | |
| 49 | + Width = 602 | |
| 50 | + Height = 196 | |
| 51 | + BevelInner = bvRaised | |
| 52 | + BevelOuter = bvLowered | |
| 53 | + TabOrder = 2 | |
| 54 | + object lbNomeUsuarioAcesso: TLabel | |
| 55 | + Left = 109 | |
| 56 | + Top = 42 | |
| 57 | + Width = 127 | |
| 58 | + Height = 20 | |
| 59 | + Caption = 'Nome de Usu'#225'rio:' | |
| 60 | + Font.Charset = DEFAULT_CHARSET | |
| 61 | + Font.Color = clWindowText | |
| 62 | + Font.Height = -16 | |
| 63 | + Font.Name = 'MS Sans Serif' | |
| 64 | + Font.Style = [] | |
| 65 | + ParentFont = False | |
| 66 | + Visible = False | |
| 67 | + end | |
| 68 | + object lbSenhaAcesso: TLabel | |
| 69 | + Left = 106 | |
| 70 | + Top = 82 | |
| 71 | + Width = 130 | |
| 72 | + Height = 20 | |
| 73 | + Caption = 'Senha de Acesso:' | |
| 74 | + Font.Charset = DEFAULT_CHARSET | |
| 75 | + Font.Color = clWindowText | |
| 76 | + Font.Height = -16 | |
| 77 | + Font.Name = 'MS Sans Serif' | |
| 78 | + Font.Style = [] | |
| 79 | + ParentFont = False | |
| 80 | + Visible = False | |
| 81 | + end | |
| 82 | + object lbAviso: TLabel | |
| 83 | + Left = 4 | |
| 84 | + Top = 171 | |
| 85 | + Width = 593 | |
| 86 | + Height = 13 | |
| 87 | + Alignment = taCenter | |
| 88 | + AutoSize = False | |
| 89 | + Font.Charset = DEFAULT_CHARSET | |
| 90 | + Font.Color = clNavy | |
| 91 | + Font.Height = -11 | |
| 92 | + Font.Name = 'MS Sans Serif' | |
| 93 | + Font.Style = [] | |
| 94 | + ParentFont = False | |
| 95 | + end | |
| 96 | + object edNomeUsuarioAcesso: TEdit | |
| 97 | + Left = 239 | |
| 98 | + Top = 39 | |
| 99 | + Width = 250 | |
| 100 | + Height = 28 | |
| 101 | + Font.Charset = DEFAULT_CHARSET | |
| 102 | + Font.Color = clWindowText | |
| 103 | + Font.Height = -16 | |
| 104 | + Font.Name = 'MS Sans Serif' | |
| 105 | + Font.Style = [] | |
| 106 | + MaxLength = 20 | |
| 107 | + ParentFont = False | |
| 108 | + TabOrder = 0 | |
| 109 | + Visible = False | |
| 110 | + end | |
| 111 | + object edSenhaAcesso: TEdit | |
| 112 | + Left = 239 | |
| 113 | + Top = 79 | |
| 114 | + Width = 250 | |
| 115 | + Height = 28 | |
| 116 | + Font.Charset = DEFAULT_CHARSET | |
| 117 | + Font.Color = clWindowText | |
| 118 | + Font.Height = -16 | |
| 119 | + Font.Name = 'MS Sans Serif' | |
| 120 | + Font.Style = [] | |
| 121 | + ParentFont = False | |
| 122 | + PasswordChar = #7 | |
| 123 | + TabOrder = 1 | |
| 124 | + Visible = False | |
| 125 | + end | |
| 126 | + end | |
| 127 | + object pnMessageBox: TPanel | |
| 128 | + Left = 1 | |
| 129 | + Top = 198 | |
| 130 | + Width = 602 | |
| 131 | + Height = 45 | |
| 132 | + BevelInner = bvLowered | |
| 133 | + Color = clGradientInactiveCaption | |
| 134 | + Font.Charset = DEFAULT_CHARSET | |
| 135 | + Font.Color = clGradientActiveCaption | |
| 136 | + Font.Height = -13 | |
| 137 | + Font.Name = 'Arial' | |
| 138 | + Font.Style = [] | |
| 139 | + ParentFont = False | |
| 140 | + TabOrder = 3 | |
| 141 | + Visible = False | |
| 142 | + object lbMensagens: TLabel | |
| 143 | + Left = 2 | |
| 144 | + Top = 2 | |
| 145 | + Width = 598 | |
| 146 | + Height = 41 | |
| 147 | + Align = alClient | |
| 148 | + Alignment = taCenter | |
| 149 | + AutoSize = False | |
| 150 | + Font.Charset = DEFAULT_CHARSET | |
| 151 | + Font.Color = clWindowText | |
| 152 | + Font.Height = -13 | |
| 153 | + Font.Name = 'MS Sans Serif' | |
| 154 | + Font.Style = [] | |
| 155 | + ParentFont = False | |
| 156 | + Layout = tlCenter | |
| 157 | + end | |
| 158 | + end | |
| 159 | +end | ... | ... |
| ... | ... | @@ -0,0 +1,34 @@ |
| 1 | +unit AcessoMapaTeste; | |
| 2 | + | |
| 3 | +interface | |
| 4 | + | |
| 5 | +uses | |
| 6 | + Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, | |
| 7 | + Dialogs, StdCtrls, ExtCtrls; | |
| 8 | + | |
| 9 | +type | |
| 10 | + TfrmAcesso = class(TForm) | |
| 11 | + btAcesso: TButton; | |
| 12 | + btCancela: TButton; | |
| 13 | + pnAcesso: TPanel; | |
| 14 | + lbNomeUsuarioAcesso: TLabel; | |
| 15 | + lbSenhaAcesso: TLabel; | |
| 16 | + lbAviso: TLabel; | |
| 17 | + edNomeUsuarioAcesso: TEdit; | |
| 18 | + edSenhaAcesso: TEdit; | |
| 19 | + pnMessageBox: TPanel; | |
| 20 | + lbMensagens: TLabel; | |
| 21 | + private | |
| 22 | + { Private declarations } | |
| 23 | + public | |
| 24 | + { Public declarations } | |
| 25 | + end; | |
| 26 | + | |
| 27 | +var | |
| 28 | + frmAcesso: TfrmAcesso; | |
| 29 | + | |
| 30 | +implementation | |
| 31 | + | |
| 32 | +{$R *.dfm} | |
| 33 | + | |
| 34 | +end. | ... | ... |
No preview for this file type
No preview for this file type
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +program MapaCACICteste; | |
| 2 | + | |
| 3 | +uses | |
| 4 | + Forms, | |
| 5 | + Windows, | |
| 6 | + MapaTeste in 'MapaTeste.pas' {frmMapaCacic}, | |
| 7 | + AcessoMapaTeste in 'AcessoMapaTeste.pas' {frmAcesso}, | |
| 8 | + CACIC_Comm in '..\CACIC_Comm.pas', | |
| 9 | + CACIC_Library in '..\CACIC_Library.pas'; | |
| 10 | + | |
| 11 | +{$R *.res} | |
| 12 | + | |
| 13 | +const APP_NAME = 'MapaCacicteste.exe'; | |
| 14 | + | |
| 15 | +var hwind:HWND; | |
| 16 | + oCacic : TCACIC; | |
| 17 | + | |
| 18 | +begin | |
| 19 | + oCacic := TCACIC.Create(); | |
| 20 | + | |
| 21 | + if( oCacic.isAppRunning( APP_NAME ) ) | |
| 22 | + then begin | |
| 23 | + hwind := 0; | |
| 24 | + repeat // The string 'My app' must match your App Title (below) | |
| 25 | + hwind:=Windows.FindWindowEx(0,hwind,'TApplication', APP_NAME ); | |
| 26 | + until (hwind<>Application.Handle); | |
| 27 | + IF (hwind<>0) then | |
| 28 | + begin | |
| 29 | + Windows.ShowWindow(hwind,SW_SHOWNORMAL); | |
| 30 | + Windows.SetForegroundWindow(hwind); | |
| 31 | + end; | |
| 32 | + FreeMemory(0); | |
| 33 | + end | |
| 34 | + else | |
| 35 | + begin | |
| 36 | + Application.Initialize; | |
| 37 | + Application.CreateForm(TfrmMapaCacic, frmMapaCacic); | |
| 38 | + Application.Run; | |
| 39 | + end; | |
| 40 | + oCacic.Free(); | |
| 41 | +end. | ... | ... |
| ... | ... | @@ -0,0 +1,41 @@ |
| 1 | +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| 2 | + <PropertyGroup> | |
| 3 | + <ProjectGuid>{4f42d5b9-4185-4233-9988-97f71c5d98fc}</ProjectGuid> | |
| 4 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
| 5 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
| 6 | + <DCC_DCCCompiler>DCC32</DCC_DCCCompiler> | |
| 7 | + <DCC_DependencyCheckOutputName>MapaCACICteste.exe</DCC_DependencyCheckOutputName> | |
| 8 | + <MainSource>MapaCACICteste.dpr</MainSource> | |
| 9 | + </PropertyGroup> | |
| 10 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
| 11 | + <Version>7.0</Version> | |
| 12 | + <DCC_DebugInformation>False</DCC_DebugInformation> | |
| 13 | + <DCC_LocalDebugSymbols>False</DCC_LocalDebugSymbols> | |
| 14 | + <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> | |
| 15 | + <DCC_Define>RELEASE</DCC_Define> | |
| 16 | + </PropertyGroup> | |
| 17 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
| 18 | + <Version>7.0</Version> | |
| 19 | + <DCC_Define>DEBUG</DCC_Define> | |
| 20 | + </PropertyGroup> | |
| 21 | + <ProjectExtensions> | |
| 22 | + <Borland.Personality>Delphi.Personality</Borland.Personality> | |
| 23 | + <Borland.ProjectType /> | |
| 24 | + <BorlandProject> | |
| 25 | +<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><VersionInfo><VersionInfo Name="IncludeVerInfo">False</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">1</VersionInfo><VersionInfo Name="MinorVer">0</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">1046</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName"></VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName"></VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName"></VersionInfoKeys><VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Source><Source Name="MainSource">MapaCACICteste.dpr</Source></Source></Delphi.Personality></BorlandProject></BorlandProject> | |
| 26 | + </ProjectExtensions> | |
| 27 | + <Import Project="$(MSBuildBinPath)\Borland.Delphi.Targets" /> | |
| 28 | + <ItemGroup> | |
| 29 | + <DelphiCompile Include="MapaCACICteste.dpr"> | |
| 30 | + <MainSource>MainSource</MainSource> | |
| 31 | + </DelphiCompile> | |
| 32 | + <DCCReference Include="..\CACIC_Comm.pas" /> | |
| 33 | + <DCCReference Include="..\CACIC_Library.pas" /> | |
| 34 | + <DCCReference Include="AcessoMapaTeste.pas"> | |
| 35 | + <Form>frmAcesso</Form> | |
| 36 | + </DCCReference> | |
| 37 | + <DCCReference Include="MapaTeste.pas"> | |
| 38 | + <Form>frmMapaCacic</Form> | |
| 39 | + </DCCReference> | |
| 40 | + </ItemGroup> | |
| 41 | +</Project> | |
| 0 | 42 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1,25 @@ |
| 1 | +<?xml version="1.0" encoding="utf-8"?> | |
| 2 | +<BorlandProject> | |
| 3 | + <Transactions> | |
| 4 | + <Transaction>2013/10/25 15:08:21.585.dproj,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\Project1.dproj=C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTesteProj0.dproj</Transaction> | |
| 5 | + <Transaction>2013/10/25 15:08:53.133.dproj,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTesteProj0.dproj=C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTesteProj0_2.dproj</Transaction> | |
| 6 | + <Transaction>2013/10/25 15:17:19.101.pas,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\Unit1.pas=C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTeste.pas</Transaction> | |
| 7 | + <Transaction>2013/10/25 15:17:19.101.dfm,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\Unit1.dfm=C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTeste.dfm</Transaction> | |
| 8 | + <Transaction>2013/10/25 15:19:13.802.pas,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\Unit1.pas=C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\AcessoMapaTeste.pas</Transaction> | |
| 9 | + <Transaction>2013/10/25 15:19:13.802.dfm,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\Unit1.dfm=C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\AcessoMapaTeste.dfm</Transaction> | |
| 10 | + <Transaction>2013/10/25 15:20:11.034.pas,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\AcessoMapaTeste.pas=C:\Documents and Settings\adriano\Desktop\Mapa0.2\AcessoMapaTeste.pas</Transaction> | |
| 11 | + <Transaction>2013/10/25 15:20:11.034.dfm,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\AcessoMapaTeste.dfm=C:\Documents and Settings\adriano\Desktop\Mapa0.2\AcessoMapaTeste.dfm</Transaction> | |
| 12 | + <Transaction>2013/10/25 15:20:19.753.pas,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTeste.pas=C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTeste.pas</Transaction> | |
| 13 | + <Transaction>2013/10/25 15:20:19.753.dfm,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTeste.dfm=C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTeste.dfm</Transaction> | |
| 14 | + <Transaction>2013/10/25 15:20:21.487.dproj,C:\Documents and Settings\adriano\Meus documentos\RAD Studio\Projects\MapaTesteProj0_2.dproj=C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTesteProj0_2.dproj</Transaction> | |
| 15 | + <Transaction>2013/11/05 11:28:21.475.dproj,C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTesteProj0_2.dproj=C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTesteProj02.dproj</Transaction> | |
| 16 | + <Transaction>2013/11/11 16:28:39.095.pas,C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTeste.pas=C:\devel\cacic\agente-windows\MapaTesteProj\MapaTeste.pas</Transaction> | |
| 17 | + <Transaction>2013/11/11 16:28:39.095.dfm,C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTeste.dfm=C:\devel\cacic\agente-windows\MapaTesteProj\MapaTeste.dfm</Transaction> | |
| 18 | + <Transaction>2013/11/11 16:29:05.925.dproj,C:\Documents and Settings\adriano\Desktop\Mapa0.2\MapaTesteProj02.dproj=C:\devel\cacic\agente-windows\MapaTesteProj\MapaTesteProj02.dproj</Transaction> | |
| 19 | + <Transaction>2013/11/11 16:29:36.615.pas,C:\Documents and Settings\adriano\Desktop\Mapa0.2\AcessoMapaTeste.pas=C:\devel\cacic\agente-windows\MapaTesteProj\AcessoMapaTeste.pas</Transaction> | |
| 20 | + <Transaction>2013/11/11 16:29:36.615.dfm,C:\Documents and Settings\adriano\Desktop\Mapa0.2\AcessoMapaTeste.dfm=C:\devel\cacic\agente-windows\MapaTesteProj\AcessoMapaTeste.dfm</Transaction> | |
| 21 | + <Transaction>2013/11/12 18:18:32.539.dproj,C:\devel\cacic\agente-windows\MapaTesteProj\MapaTesteProj02.dproj=C:\devel\cacic\agente-windows\MapaTesteProj\MapaCACIC.dproj</Transaction> | |
| 22 | + <Transaction>2013/11/22 16:35:45.536.dproj,C:\devel\cacic\agente-windows\MapaTesteProj\MapaCACIC.dproj=C:\devel\cacic\agente-windows\MapaTesteProj\MapaCACIC_teste.dproj</Transaction> | |
| 23 | + <Transaction>2013/11/22 16:36:47.288.dproj,C:\devel\cacic\agente-windows\MapaTesteProj\MapaCACIC_teste.dproj=C:\devel\cacic\agente-windows\MapaTesteProj\MapaCACICteste.dproj</Transaction> | |
| 24 | + </Transactions> | |
| 25 | +</BorlandProject> | ... | ... |
No preview for this file type
No preview for this file type
No preview for this file type
| ... | ... | @@ -0,0 +1,642 @@ |
| 1 | +object frmMapaCacic: TfrmMapaCacic | |
| 2 | + Left = 0 | |
| 3 | + Top = -55 | |
| 4 | + Caption = 'frmMapaCacic' | |
| 5 | + ClientHeight = 634 | |
| 6 | + ClientWidth = 789 | |
| 7 | + Color = clBtnFace | |
| 8 | + Font.Charset = DEFAULT_CHARSET | |
| 9 | + Font.Color = clWindowText | |
| 10 | + Font.Height = -11 | |
| 11 | + Font.Name = 'Tahoma' | |
| 12 | + Font.Style = [] | |
| 13 | + OldCreateOrder = False | |
| 14 | + Position = poDesigned | |
| 15 | + OnActivate = FormActivate | |
| 16 | + OnClose = FormClose | |
| 17 | + OnCreate = FormCreate | |
| 18 | + DesignSize = ( | |
| 19 | + 789 | |
| 20 | + 634) | |
| 21 | + PixelsPerInch = 96 | |
| 22 | + TextHeight = 13 | |
| 23 | + object edWebManagerAddress: TLabel | |
| 24 | + Left = 155 | |
| 25 | + Top = 682 | |
| 26 | + Width = 500 | |
| 27 | + Height = 14 | |
| 28 | + Anchors = [akBottom] | |
| 29 | + AutoSize = False | |
| 30 | + Font.Charset = DEFAULT_CHARSET | |
| 31 | + Font.Color = clWindowText | |
| 32 | + Font.Height = -11 | |
| 33 | + Font.Name = 'Arial' | |
| 34 | + Font.Style = [fsBold] | |
| 35 | + ParentFont = False | |
| 36 | + ExplicitLeft = 159 | |
| 37 | + ExplicitTop = 537 | |
| 38 | + end | |
| 39 | + object lbWebManagerAddress: TLabel | |
| 40 | + Left = 0 | |
| 41 | + Top = 683 | |
| 42 | + Width = 153 | |
| 43 | + Height = 13 | |
| 44 | + Anchors = [akLeft, akBottom] | |
| 45 | + AutoSize = False | |
| 46 | + Caption = 'Endere'#231'o do Servidor de Aplica'#231#227'o:' | |
| 47 | + Font.Charset = DEFAULT_CHARSET | |
| 48 | + Font.Color = clWindowText | |
| 49 | + Font.Height = -9 | |
| 50 | + Font.Name = 'Arial' | |
| 51 | + Font.Style = [] | |
| 52 | + ParentFont = False | |
| 53 | + ExplicitTop = 538 | |
| 54 | + end | |
| 55 | + object btGravarInformacoes: TButton | |
| 56 | + Left = 188 | |
| 57 | + Top = 580 | |
| 58 | + Width = 401 | |
| 59 | + Height = 35 | |
| 60 | + Anchors = [] | |
| 61 | + Caption = 'Grava e Envia Informa'#231#245'es Patrimoniais ao Gerente WEB' | |
| 62 | + Enabled = False | |
| 63 | + Font.Charset = DEFAULT_CHARSET | |
| 64 | + Font.Color = clWindowText | |
| 65 | + Font.Height = -13 | |
| 66 | + Font.Name = 'Arial' | |
| 67 | + Font.Style = [fsBold] | |
| 68 | + ParentFont = False | |
| 69 | + TabOrder = 0 | |
| 70 | + Visible = False | |
| 71 | + OnClick = AtualizaPatrimonio | |
| 72 | + end | |
| 73 | + object gbInformacoesSobreComputador: TGroupBox | |
| 74 | + Left = 1 | |
| 75 | + Top = 64 | |
| 76 | + Width = 780 | |
| 77 | + Height = 497 | |
| 78 | + Anchors = [] | |
| 79 | + Caption = | |
| 80 | + ' Informa'#231#245'es sobre localiza'#231#227'o f'#237'sica e patrimonial deste comput' + | |
| 81 | + 'ador ' | |
| 82 | + Font.Charset = DEFAULT_CHARSET | |
| 83 | + Font.Color = clBlue | |
| 84 | + Font.Height = -11 | |
| 85 | + Font.Name = 'MS Sans Serif' | |
| 86 | + Font.Style = [fsBold] | |
| 87 | + ParentFont = False | |
| 88 | + TabOrder = 1 | |
| 89 | + object lbEtiqueta1: TLabel | |
| 90 | + Left = 6 | |
| 91 | + Top = 226 | |
| 92 | + Width = 45 | |
| 93 | + Height = 13 | |
| 94 | + Caption = 'Etiqueta1' | |
| 95 | + Font.Charset = DEFAULT_CHARSET | |
| 96 | + Font.Color = clWindowText | |
| 97 | + Font.Height = -11 | |
| 98 | + Font.Name = 'MS Sans Serif' | |
| 99 | + Font.Style = [] | |
| 100 | + ParentFont = False | |
| 101 | + Visible = False | |
| 102 | + end | |
| 103 | + object lbEtiqueta2: TLabel | |
| 104 | + Left = 266 | |
| 105 | + Top = 226 | |
| 106 | + Width = 250 | |
| 107 | + Height = 13 | |
| 108 | + AutoSize = False | |
| 109 | + Caption = 'Etiqueta2' | |
| 110 | + Font.Charset = DEFAULT_CHARSET | |
| 111 | + Font.Color = clWindowText | |
| 112 | + Font.Height = -11 | |
| 113 | + Font.Name = 'MS Sans Serif' | |
| 114 | + Font.Style = [] | |
| 115 | + ParentFont = False | |
| 116 | + Visible = False | |
| 117 | + end | |
| 118 | + object lbEtiqueta3: TLabel | |
| 119 | + Left = 530 | |
| 120 | + Top = 226 | |
| 121 | + Width = 250 | |
| 122 | + Height = 13 | |
| 123 | + AutoSize = False | |
| 124 | + Caption = 'Etiqueta3' | |
| 125 | + Font.Charset = DEFAULT_CHARSET | |
| 126 | + Font.Color = clWindowText | |
| 127 | + Font.Height = -11 | |
| 128 | + Font.Name = 'MS Sans Serif' | |
| 129 | + Font.Style = [] | |
| 130 | + ParentFont = False | |
| 131 | + Visible = False | |
| 132 | + end | |
| 133 | + object lbEtiqueta4: TLabel | |
| 134 | + Left = 3 | |
| 135 | + Top = 275 | |
| 136 | + Width = 250 | |
| 137 | + Height = 13 | |
| 138 | + AutoSize = False | |
| 139 | + Caption = 'Etiqueta4' | |
| 140 | + Font.Charset = DEFAULT_CHARSET | |
| 141 | + Font.Color = clWindowText | |
| 142 | + Font.Height = -11 | |
| 143 | + Font.Name = 'MS Sans Serif' | |
| 144 | + Font.Style = [] | |
| 145 | + ParentFont = False | |
| 146 | + Visible = False | |
| 147 | + end | |
| 148 | + object lbEtiqueta5: TLabel | |
| 149 | + Left = 266 | |
| 150 | + Top = 275 | |
| 151 | + Width = 250 | |
| 152 | + Height = 13 | |
| 153 | + AutoSize = False | |
| 154 | + Caption = 'Etiqueta5' | |
| 155 | + Font.Charset = DEFAULT_CHARSET | |
| 156 | + Font.Color = clWindowText | |
| 157 | + Font.Height = -11 | |
| 158 | + Font.Name = 'MS Sans Serif' | |
| 159 | + Font.Style = [] | |
| 160 | + ParentFont = False | |
| 161 | + Visible = False | |
| 162 | + end | |
| 163 | + object lbEtiqueta6: TLabel | |
| 164 | + Left = 530 | |
| 165 | + Top = 275 | |
| 166 | + Width = 250 | |
| 167 | + Height = 13 | |
| 168 | + AutoSize = False | |
| 169 | + Caption = 'Etiqueta6' | |
| 170 | + Font.Charset = DEFAULT_CHARSET | |
| 171 | + Font.Color = clWindowText | |
| 172 | + Font.Height = -11 | |
| 173 | + Font.Name = 'MS Sans Serif' | |
| 174 | + Font.Style = [] | |
| 175 | + ParentFont = False | |
| 176 | + Visible = False | |
| 177 | + end | |
| 178 | + object lbEtiquetaUserLogado: TLabel | |
| 179 | + Left = 420 | |
| 180 | + Top = 33 | |
| 181 | + Width = 250 | |
| 182 | + Height = 13 | |
| 183 | + AutoSize = False | |
| 184 | + Caption = 'Usu'#225'rio Logado' | |
| 185 | + Font.Charset = DEFAULT_CHARSET | |
| 186 | + Font.Color = clWindowText | |
| 187 | + Font.Height = -11 | |
| 188 | + Font.Name = 'MS Sans Serif' | |
| 189 | + Font.Style = [] | |
| 190 | + ParentFont = False | |
| 191 | + Visible = False | |
| 192 | + end | |
| 193 | + object lbEtiquetaNomeComputador: TLabel | |
| 194 | + Left = 107 | |
| 195 | + Top = 146 | |
| 196 | + Width = 250 | |
| 197 | + Height = 13 | |
| 198 | + AutoSize = False | |
| 199 | + Caption = 'Computador' | |
| 200 | + Font.Charset = DEFAULT_CHARSET | |
| 201 | + Font.Color = clWindowText | |
| 202 | + Font.Height = -11 | |
| 203 | + Font.Name = 'MS Sans Serif' | |
| 204 | + Font.Style = [] | |
| 205 | + ParentFont = False | |
| 206 | + Visible = False | |
| 207 | + end | |
| 208 | + object lbEtiquetaCpfUser: TLabel | |
| 209 | + Left = 420 | |
| 210 | + Top = 89 | |
| 211 | + Width = 250 | |
| 212 | + Height = 13 | |
| 213 | + AutoSize = False | |
| 214 | + Caption = 'CPF' | |
| 215 | + Font.Charset = DEFAULT_CHARSET | |
| 216 | + Font.Color = clWindowText | |
| 217 | + Font.Height = -11 | |
| 218 | + Font.Name = 'MS Sans Serif' | |
| 219 | + Font.Style = [] | |
| 220 | + ParentFont = False | |
| 221 | + Visible = False | |
| 222 | + end | |
| 223 | + object lbEtiquetaIpComputador: TLabel | |
| 224 | + Left = 420 | |
| 225 | + Top = 146 | |
| 226 | + Width = 250 | |
| 227 | + Height = 13 | |
| 228 | + AutoSize = False | |
| 229 | + Caption = 'IP' | |
| 230 | + Font.Charset = DEFAULT_CHARSET | |
| 231 | + Font.Color = clWindowText | |
| 232 | + Font.Height = -11 | |
| 233 | + Font.Name = 'MS Sans Serif' | |
| 234 | + Font.Style = [] | |
| 235 | + ParentFont = False | |
| 236 | + Visible = False | |
| 237 | + end | |
| 238 | + object lbEtiquetaPatrimonioPc: TLabel | |
| 239 | + Left = 107 | |
| 240 | + Top = 33 | |
| 241 | + Width = 250 | |
| 242 | + Height = 13 | |
| 243 | + AutoSize = False | |
| 244 | + Caption = 'Patrim'#244'nio' | |
| 245 | + Font.Charset = DEFAULT_CHARSET | |
| 246 | + Font.Color = clWindowText | |
| 247 | + Font.Height = -11 | |
| 248 | + Font.Name = 'MS Sans Serif' | |
| 249 | + Font.Style = [] | |
| 250 | + ParentFont = False | |
| 251 | + Visible = False | |
| 252 | + end | |
| 253 | + object lbEtiquetaNome: TLabel | |
| 254 | + Left = 107 | |
| 255 | + Top = 89 | |
| 256 | + Width = 250 | |
| 257 | + Height = 13 | |
| 258 | + AutoSize = False | |
| 259 | + Caption = 'Nome' | |
| 260 | + Font.Charset = DEFAULT_CHARSET | |
| 261 | + Font.Color = clWindowText | |
| 262 | + Font.Height = -11 | |
| 263 | + Font.Name = 'MS Sans Serif' | |
| 264 | + Font.Style = [] | |
| 265 | + ParentFont = False | |
| 266 | + Visible = False | |
| 267 | + end | |
| 268 | + object edTeInfoPatrimonio1: TEdit | |
| 269 | + Left = 5 | |
| 270 | + Top = 245 | |
| 271 | + Width = 251 | |
| 272 | + Height = 24 | |
| 273 | + Font.Charset = DEFAULT_CHARSET | |
| 274 | + Font.Color = clWindowText | |
| 275 | + Font.Height = -13 | |
| 276 | + Font.Name = 'Arial' | |
| 277 | + Font.Style = [] | |
| 278 | + MaxLength = 100 | |
| 279 | + ParentFont = False | |
| 280 | + ParentShowHint = False | |
| 281 | + ShowHint = True | |
| 282 | + TabOrder = 0 | |
| 283 | + Visible = False | |
| 284 | + end | |
| 285 | + object edTeInfoPatrimonio4: TEdit | |
| 286 | + Left = 6 | |
| 287 | + Top = 294 | |
| 288 | + Width = 250 | |
| 289 | + Height = 24 | |
| 290 | + Font.Charset = DEFAULT_CHARSET | |
| 291 | + Font.Color = clWindowText | |
| 292 | + Font.Height = -13 | |
| 293 | + Font.Name = 'MS Sans Serif' | |
| 294 | + Font.Style = [] | |
| 295 | + MaxLength = 20 | |
| 296 | + ParentFont = False | |
| 297 | + ParentShowHint = False | |
| 298 | + ShowHint = True | |
| 299 | + TabOrder = 3 | |
| 300 | + Visible = False | |
| 301 | + end | |
| 302 | + object edTeInfoPatrimonio2: TEdit | |
| 303 | + Left = 262 | |
| 304 | + Top = 245 | |
| 305 | + Width = 250 | |
| 306 | + Height = 24 | |
| 307 | + Font.Charset = DEFAULT_CHARSET | |
| 308 | + Font.Color = clWindowText | |
| 309 | + Font.Height = -13 | |
| 310 | + Font.Name = 'MS Sans Serif' | |
| 311 | + Font.Style = [] | |
| 312 | + MaxLength = 20 | |
| 313 | + ParentFont = False | |
| 314 | + ParentShowHint = False | |
| 315 | + ShowHint = True | |
| 316 | + TabOrder = 1 | |
| 317 | + Visible = False | |
| 318 | + end | |
| 319 | + object edTeInfoPatrimonio3: TEdit | |
| 320 | + Left = 530 | |
| 321 | + Top = 245 | |
| 322 | + Width = 250 | |
| 323 | + Height = 24 | |
| 324 | + Font.Charset = DEFAULT_CHARSET | |
| 325 | + Font.Color = clWindowText | |
| 326 | + Font.Height = -13 | |
| 327 | + Font.Name = 'MS Sans Serif' | |
| 328 | + Font.Style = [] | |
| 329 | + MaxLength = 20 | |
| 330 | + ParentFont = False | |
| 331 | + ParentShowHint = False | |
| 332 | + ShowHint = True | |
| 333 | + TabOrder = 2 | |
| 334 | + Visible = False | |
| 335 | + end | |
| 336 | + object edTeInfoPatrimonio5: TEdit | |
| 337 | + Left = 266 | |
| 338 | + Top = 294 | |
| 339 | + Width = 250 | |
| 340 | + Height = 24 | |
| 341 | + Font.Charset = DEFAULT_CHARSET | |
| 342 | + Font.Color = clWindowText | |
| 343 | + Font.Height = -13 | |
| 344 | + Font.Name = 'MS Sans Serif' | |
| 345 | + Font.Style = [] | |
| 346 | + MaxLength = 20 | |
| 347 | + ParentFont = False | |
| 348 | + ParentShowHint = False | |
| 349 | + ShowHint = True | |
| 350 | + TabOrder = 4 | |
| 351 | + Visible = False | |
| 352 | + end | |
| 353 | + object edTeInfoPatrimonio6: TEdit | |
| 354 | + Left = 530 | |
| 355 | + Top = 294 | |
| 356 | + Width = 250 | |
| 357 | + Height = 24 | |
| 358 | + Font.Charset = DEFAULT_CHARSET | |
| 359 | + Font.Color = clWindowText | |
| 360 | + Font.Height = -13 | |
| 361 | + Font.Name = 'MS Sans Serif' | |
| 362 | + Font.Style = [] | |
| 363 | + MaxLength = 20 | |
| 364 | + ParentFont = False | |
| 365 | + ParentShowHint = False | |
| 366 | + ShowHint = True | |
| 367 | + TabOrder = 5 | |
| 368 | + Visible = False | |
| 369 | + end | |
| 370 | + object pnDivisoria01: TPanel | |
| 371 | + Left = 3 | |
| 372 | + Top = 211 | |
| 373 | + Width = 772 | |
| 374 | + Height = 3 | |
| 375 | + TabOrder = 6 | |
| 376 | + end | |
| 377 | + object btCombosUpdate: TButton | |
| 378 | + Left = 684 | |
| 379 | + Top = 10 | |
| 380 | + Width = 94 | |
| 381 | + Height = 20 | |
| 382 | + Caption = 'Recarregar' | |
| 383 | + Enabled = False | |
| 384 | + TabOrder = 7 | |
| 385 | + OnClick = btCombosUpdateClick | |
| 386 | + end | |
| 387 | + object edTeInfoUserLogado: TEdit | |
| 388 | + Left = 420 | |
| 389 | + Top = 52 | |
| 390 | + Width = 250 | |
| 391 | + Height = 24 | |
| 392 | + Enabled = False | |
| 393 | + Font.Charset = DEFAULT_CHARSET | |
| 394 | + Font.Color = clWindowText | |
| 395 | + Font.Height = -13 | |
| 396 | + Font.Name = 'MS Sans Serif' | |
| 397 | + Font.Style = [] | |
| 398 | + MaxLength = 20 | |
| 399 | + ParentFont = False | |
| 400 | + ParentShowHint = False | |
| 401 | + ShowHint = True | |
| 402 | + TabOrder = 8 | |
| 403 | + Visible = False | |
| 404 | + end | |
| 405 | + object edTeInfoNomeComputador: TEdit | |
| 406 | + Left = 107 | |
| 407 | + Top = 165 | |
| 408 | + Width = 250 | |
| 409 | + Height = 24 | |
| 410 | + Enabled = False | |
| 411 | + Font.Charset = DEFAULT_CHARSET | |
| 412 | + Font.Color = clWindowText | |
| 413 | + Font.Height = -13 | |
| 414 | + Font.Name = 'MS Sans Serif' | |
| 415 | + Font.Style = [] | |
| 416 | + MaxLength = 20 | |
| 417 | + ParentFont = False | |
| 418 | + ParentShowHint = False | |
| 419 | + ShowHint = True | |
| 420 | + TabOrder = 9 | |
| 421 | + Visible = False | |
| 422 | + end | |
| 423 | + object edTeInfoCpfUser: TEdit | |
| 424 | + Left = 420 | |
| 425 | + Top = 108 | |
| 426 | + Width = 250 | |
| 427 | + Height = 24 | |
| 428 | + Enabled = False | |
| 429 | + Font.Charset = DEFAULT_CHARSET | |
| 430 | + Font.Color = clWindowText | |
| 431 | + Font.Height = -13 | |
| 432 | + Font.Name = 'MS Sans Serif' | |
| 433 | + Font.Style = [] | |
| 434 | + MaxLength = 20 | |
| 435 | + ParentFont = False | |
| 436 | + ParentShowHint = False | |
| 437 | + ShowHint = True | |
| 438 | + TabOrder = 10 | |
| 439 | + Visible = False | |
| 440 | + end | |
| 441 | + object edTeInfoIpComputador: TEdit | |
| 442 | + Left = 420 | |
| 443 | + Top = 165 | |
| 444 | + Width = 250 | |
| 445 | + Height = 24 | |
| 446 | + Enabled = False | |
| 447 | + Font.Charset = DEFAULT_CHARSET | |
| 448 | + Font.Color = clWindowText | |
| 449 | + Font.Height = -13 | |
| 450 | + Font.Name = 'MS Sans Serif' | |
| 451 | + Font.Style = [] | |
| 452 | + MaxLength = 20 | |
| 453 | + ParentFont = False | |
| 454 | + ParentShowHint = False | |
| 455 | + ShowHint = True | |
| 456 | + TabOrder = 11 | |
| 457 | + Visible = False | |
| 458 | + end | |
| 459 | + object edTePatrimonioPc: TEdit | |
| 460 | + Left = 107 | |
| 461 | + Top = 52 | |
| 462 | + Width = 250 | |
| 463 | + Height = 24 | |
| 464 | + Enabled = False | |
| 465 | + Font.Charset = DEFAULT_CHARSET | |
| 466 | + Font.Color = clWindowText | |
| 467 | + Font.Height = -13 | |
| 468 | + Font.Name = 'MS Sans Serif' | |
| 469 | + Font.Style = [] | |
| 470 | + MaxLength = 20 | |
| 471 | + ParentFont = False | |
| 472 | + ParentShowHint = False | |
| 473 | + ShowHint = True | |
| 474 | + TabOrder = 12 | |
| 475 | + Visible = False | |
| 476 | + end | |
| 477 | + object edTeInfoNome: TEdit | |
| 478 | + Left = 107 | |
| 479 | + Top = 108 | |
| 480 | + Width = 250 | |
| 481 | + Height = 24 | |
| 482 | + Enabled = False | |
| 483 | + Font.Charset = DEFAULT_CHARSET | |
| 484 | + Font.Color = clWindowText | |
| 485 | + Font.Height = -13 | |
| 486 | + Font.Name = 'MS Sans Serif' | |
| 487 | + Font.Style = [] | |
| 488 | + MaxLength = 20 | |
| 489 | + ParentFont = False | |
| 490 | + ParentShowHint = False | |
| 491 | + ShowHint = True | |
| 492 | + TabOrder = 13 | |
| 493 | + Visible = False | |
| 494 | + end | |
| 495 | + object bgTermoResponsabilidade: TGroupBox | |
| 496 | + Left = 8 | |
| 497 | + Top = 328 | |
| 498 | + Width = 761 | |
| 499 | + Height = 161 | |
| 500 | + Caption = 'Termo de Responsabilidade' | |
| 501 | + TabOrder = 14 | |
| 502 | + object mmTermoResponsabilidade: TMemo | |
| 503 | + Left = 8 | |
| 504 | + Top = 21 | |
| 505 | + Width = 745 | |
| 506 | + Height = 108 | |
| 507 | + Enabled = False | |
| 508 | + Lines.Strings = ( | |
| 509 | + 'mmTermoResponsabilidade') | |
| 510 | + ReadOnly = True | |
| 511 | + ScrollBars = ssVertical | |
| 512 | + TabOrder = 0 | |
| 513 | + end | |
| 514 | + object rdConcordaTermos: TRadioButton | |
| 515 | + Left = 24 | |
| 516 | + Top = 135 | |
| 517 | + Width = 337 | |
| 518 | + Height = 17 | |
| 519 | + Caption = 'Eu aceito os termos e condi'#231#245'es etc...' | |
| 520 | + TabOrder = 1 | |
| 521 | + OnClick = rdConcordaTermosClick | |
| 522 | + end | |
| 523 | + end | |
| 524 | + end | |
| 525 | + object gbLeiaComAtencao: TGroupBox | |
| 526 | + Left = 1 | |
| 527 | + Top = 11 | |
| 528 | + Width = 780 | |
| 529 | + Height = 53 | |
| 530 | + Anchors = [] | |
| 531 | + Caption = ' Leia com aten'#231#227'o ' | |
| 532 | + Color = clBtnFace | |
| 533 | + Font.Charset = DEFAULT_CHARSET | |
| 534 | + Font.Color = clRed | |
| 535 | + Font.Height = -13 | |
| 536 | + Font.Name = 'MS Sans Serif' | |
| 537 | + Font.Style = [fsBold] | |
| 538 | + ParentColor = False | |
| 539 | + ParentFont = False | |
| 540 | + TabOrder = 2 | |
| 541 | + DesignSize = ( | |
| 542 | + 780 | |
| 543 | + 53) | |
| 544 | + object lbLeiaComAtencao: TLabel | |
| 545 | + Left = 14 | |
| 546 | + Top = 18 | |
| 547 | + Width = 769 | |
| 548 | + Height = 32 | |
| 549 | + Anchors = [] | |
| 550 | + AutoSize = False | |
| 551 | + Caption = | |
| 552 | + 'O preenchimento correto dos campos abaixo define a exatid'#227'o do c' + | |
| 553 | + 'ontrole de patrim'#244'nio e localiza'#231#227'o f'#237'sica do equipamento.' | |
| 554 | + Font.Charset = DEFAULT_CHARSET | |
| 555 | + Font.Color = clBlack | |
| 556 | + Font.Height = -13 | |
| 557 | + Font.Name = 'MS Sans Serif' | |
| 558 | + Font.Style = [] | |
| 559 | + ParentFont = False | |
| 560 | + WordWrap = True | |
| 561 | + end | |
| 562 | + end | |
| 563 | + object pnVersao: TPanel | |
| 564 | + Left = 676 | |
| 565 | + Top = 676 | |
| 566 | + Width = 105 | |
| 567 | + Height = 20 | |
| 568 | + Anchors = [akRight, akBottom] | |
| 569 | + BevelInner = bvLowered | |
| 570 | + Caption = 'Vers'#227'o' | |
| 571 | + Font.Charset = DEFAULT_CHARSET | |
| 572 | + Font.Color = clWindowText | |
| 573 | + Font.Height = -11 | |
| 574 | + Font.Name = 'MS Sans Serif' | |
| 575 | + Font.Style = [fsBold] | |
| 576 | + ParentFont = False | |
| 577 | + TabOrder = 3 | |
| 578 | + end | |
| 579 | + object pnMessageBox: TPanel | |
| 580 | + Left = 1 | |
| 581 | + Top = 246 | |
| 582 | + Width = 780 | |
| 583 | + Height = 45 | |
| 584 | + BevelInner = bvLowered | |
| 585 | + Color = clInactiveBorder | |
| 586 | + Font.Charset = DEFAULT_CHARSET | |
| 587 | + Font.Color = clMenuHighlight | |
| 588 | + Font.Height = -13 | |
| 589 | + Font.Name = 'Arial' | |
| 590 | + Font.Style = [] | |
| 591 | + ParentBackground = False | |
| 592 | + ParentFont = False | |
| 593 | + TabOrder = 4 | |
| 594 | + Visible = False | |
| 595 | + object lbMensagens: TLabel | |
| 596 | + Left = 2 | |
| 597 | + Top = 2 | |
| 598 | + Width = 776 | |
| 599 | + Height = 41 | |
| 600 | + Align = alClient | |
| 601 | + Alignment = taCenter | |
| 602 | + AutoSize = False | |
| 603 | + Color = clGrayText | |
| 604 | + Font.Charset = DEFAULT_CHARSET | |
| 605 | + Font.Color = clWindowText | |
| 606 | + Font.Height = -13 | |
| 607 | + Font.Name = 'MS Sans Serif' | |
| 608 | + Font.Style = [] | |
| 609 | + ParentColor = False | |
| 610 | + ParentFont = False | |
| 611 | + Layout = tlCenter | |
| 612 | + ExplicitLeft = -38 | |
| 613 | + ExplicitTop = 4 | |
| 614 | + end | |
| 615 | + end | |
| 616 | + object timerMessageBoxShowOrHide: TTimer | |
| 617 | + Enabled = False | |
| 618 | + Interval = 500 | |
| 619 | + Left = 34 | |
| 620 | + Top = 569 | |
| 621 | + end | |
| 622 | + object timerMessageShowTime: TTimer | |
| 623 | + Enabled = False | |
| 624 | + Interval = 0 | |
| 625 | + OnTimer = timerMessageShowTimeTimer | |
| 626 | + Left = 2 | |
| 627 | + Top = 569 | |
| 628 | + end | |
| 629 | + object timerProcessos: TTimer | |
| 630 | + Enabled = False | |
| 631 | + Interval = 1 | |
| 632 | + OnTimer = timerProcessosTimer | |
| 633 | + Left = 66 | |
| 634 | + Top = 569 | |
| 635 | + end | |
| 636 | + object IdIPWatch1: TIdIPWatch | |
| 637 | + Active = False | |
| 638 | + HistoryFilename = 'iphist.dat' | |
| 639 | + Left = 96 | |
| 640 | + Top = 568 | |
| 641 | + end | |
| 642 | +end | ... | ... |
| ... | ... | @@ -0,0 +1,785 @@ |
| 1 | +(** | |
| 2 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 3 | +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Dataprev - Empresa de Tecnologia e Informações da Previdência Social, Brasil | |
| 4 | + | |
| 5 | +Este arquivo é parte do programa CACIC - Configurador Automático e Coletor de Informações Computacionais | |
| 6 | + | |
| 7 | +O CACIC é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como | |
| 8 | +publicada pela Fundação do Software Livre (FSF); na versão 2 da Licença, ou (na sua opinião) qualquer versão. | |
| 9 | + | |
| 10 | +Este programa é distribuido na esperança que possa ser util, mas SEM NENHUMA GARANTIA; sem uma garantia implicita de ADEQUAÇÂO a qualquer | |
| 11 | +MERCADO ou APLICAÇÃO EM PARTICULAR. Veja a Licença Pública Geral GNU para maiores detalhes. | |
| 12 | + | |
| 13 | +Você deve ter recebido uma cópia da Licença Pública Geral GNU, sob o título "LICENCA.txt", junto com este programa, se não, escreva para a Fundação do Software | |
| 14 | +Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |
| 15 | +--------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 16 | +*) | |
| 17 | + | |
| 18 | +unit MapaTeste; | |
| 19 | + | |
| 20 | +interface | |
| 21 | + | |
| 22 | +uses | |
| 23 | + Windows, | |
| 24 | + SysUtils, // Deve ser colocado após o Windows acima, nunca antes | |
| 25 | + StrUtils, | |
| 26 | + StdCtrls, | |
| 27 | + Controls, | |
| 28 | + Classes, | |
| 29 | + Forms, | |
| 30 | + ExtCtrls, | |
| 31 | + Graphics, | |
| 32 | + Dialogs, | |
| 33 | + CACIC_Library, | |
| 34 | + CACIC_Comm, | |
| 35 | + ComCtrls, | |
| 36 | + Commctrl, | |
| 37 | + ShellAPI, | |
| 38 | + AcessoMapaTeste, | |
| 39 | + Types, | |
| 40 | + IdIPWatch, | |
| 41 | + Registry, | |
| 42 | + Math, IdBaseComponent, IdComponent; | |
| 43 | + | |
| 44 | +function IsUserAnAdmin() : boolean; external shell32; | |
| 45 | + | |
| 46 | +var strCollectsPatrimonioLast, | |
| 47 | + strConfigsPatrimonioCombos, | |
| 48 | + strFieldsAndValuesToRequest, | |
| 49 | + strIdUON1, | |
| 50 | + strFrmAtual, | |
| 51 | + strShowOrHide : string; | |
| 52 | + textFileAguarde : TextFile; | |
| 53 | + boolFinalizando : boolean; | |
| 54 | + objCacic : TCACIC; | |
| 55 | + Fechar : boolean; | |
| 56 | + Dummy : integer; | |
| 57 | + OldValue : LongBool; | |
| 58 | + | |
| 59 | +type | |
| 60 | + TfrmMapaCacic = class(TForm) | |
| 61 | + btGravarInformacoes: TButton; | |
| 62 | + edWebManagerAddress: TLabel; | |
| 63 | + gbInformacoesSobreComputador: TGroupBox; | |
| 64 | + lbEtiqueta1: TLabel; | |
| 65 | + lbEtiqueta2: TLabel; | |
| 66 | + lbEtiqueta3: TLabel; | |
| 67 | + lbEtiqueta4: TLabel; | |
| 68 | + lbEtiqueta5: TLabel; | |
| 69 | + lbEtiqueta6: TLabel; | |
| 70 | + edTeInfoPatrimonio1: TEdit; | |
| 71 | + edTeInfoPatrimonio4: TEdit; | |
| 72 | + edTeInfoPatrimonio2: TEdit; | |
| 73 | + edTeInfoPatrimonio3: TEdit; | |
| 74 | + edTeInfoPatrimonio5: TEdit; | |
| 75 | + edTeInfoPatrimonio6: TEdit; | |
| 76 | + pnDivisoria01: TPanel; | |
| 77 | + btCombosUpdate: TButton; | |
| 78 | + gbLeiaComAtencao: TGroupBox; | |
| 79 | + lbLeiaComAtencao: TLabel; | |
| 80 | + lbWebManagerAddress: TLabel; | |
| 81 | + pnVersao: TPanel; | |
| 82 | + timerMessageBoxShowOrHide: TTimer; | |
| 83 | + timerMessageShowTime: TTimer; | |
| 84 | + timerProcessos: TTimer; | |
| 85 | + edTeInfoUserLogado: TEdit; | |
| 86 | + edTeInfoNomeComputador: TEdit; | |
| 87 | + edTeInfoCpfUser: TEdit; | |
| 88 | + edTeInfoIpComputador: TEdit; | |
| 89 | + lbEtiquetaUserLogado: TLabel; | |
| 90 | + lbEtiquetaNomeComputador: TLabel; | |
| 91 | + lbEtiquetaCpfUser: TLabel; | |
| 92 | + lbEtiquetaIpComputador: TLabel; | |
| 93 | + IdIPWatch1: TIdIPWatch; | |
| 94 | + lbEtiquetaPatrimonioPc: TLabel; | |
| 95 | + edTePatrimonioPc: TEdit; | |
| 96 | + edTeInfoNome: TEdit; | |
| 97 | + lbEtiquetaNome: TLabel; | |
| 98 | + bgTermoResponsabilidade: TGroupBox; | |
| 99 | + mmTermoResponsabilidade: TMemo; | |
| 100 | + rdConcordaTermos: TRadioButton; | |
| 101 | + pnMessageBox: TPanel; | |
| 102 | + lbMensagens: TLabel; | |
| 103 | + | |
| 104 | + procedure FormCreate(Sender: TObject); | |
| 105 | + procedure AtualizaPatrimonio(Sender: TObject); | |
| 106 | + procedure mapa; | |
| 107 | + procedure FormClose(Sender: TObject; var Action: TCloseAction); | |
| 108 | + procedure FormActivate(Sender: TObject); | |
| 109 | + procedure btCombosUpdateClick(Sender: TObject); | |
| 110 | + procedure timerMessageShowTimeTimer(Sender: TObject); | |
| 111 | + procedure timerProcessosTimer(Sender: TObject); | |
| 112 | + function NomeComputador : String; | |
| 113 | + function UserName : String; | |
| 114 | + function getConfigs : String; | |
| 115 | + function SetCpfUser : String; | |
| 116 | + function SetPatrimonioPC : String; | |
| 117 | + function FormatarCpf(strCpfUser : String) : String; | |
| 118 | + procedure rdConcordaTermosClick(Sender: TObject); | |
| 119 | + | |
| 120 | + | |
| 121 | + private | |
| 122 | + strTeInfoPatrimonio1, | |
| 123 | + strTeInfoPatrimonio2, | |
| 124 | + strTeInfoPatrimonio3, | |
| 125 | + strTeInfoPatrimonio4, | |
| 126 | + strTeInfoPatrimonio5, | |
| 127 | + strTeInfoPatrimonio6 : String; | |
| 128 | + | |
| 129 | + procedure SetFocus; | |
| 130 | + procedure MontaInterface; | |
| 131 | + procedure RecuperaValoresAnteriores; | |
| 132 | + procedure Sair; | |
| 133 | + | |
| 134 | + public | |
| 135 | + foco, | |
| 136 | + boolAcessoOK : boolean; | |
| 137 | + strId_usuario, | |
| 138 | + strChkSisInfFileName, | |
| 139 | + strGerColsInfFileName : String; | |
| 140 | + | |
| 141 | + procedure Finalizar(p_pausa:boolean); | |
| 142 | + procedure Mensagem(p_strMsg : String; p_boolAlerta : boolean = false; p_intPausaSegundos : integer = 0); | |
| 143 | + | |
| 144 | + end; | |
| 145 | + | |
| 146 | +var frmMapaCacic: TfrmMapaCacic; | |
| 147 | + | |
| 148 | +implementation | |
| 149 | + | |
| 150 | +{$R *.dfm} | |
| 151 | + | |
| 152 | +procedure TfrmMapaCacic.Mensagem(p_strMsg : String; p_boolAlerta : boolean; p_intPausaSegundos : integer); | |
| 153 | +Begin | |
| 154 | + strShowOrHide := 'Show'; | |
| 155 | + | |
| 156 | + objCacic.writeDebugLog('Mensagem: ' + p_strMsg); | |
| 157 | + | |
| 158 | + if p_boolAlerta then | |
| 159 | + lbMensagens.Font.Color := clRed | |
| 160 | + else | |
| 161 | + lbMensagens.Font.Color := clBlack; | |
| 162 | + | |
| 163 | + lbMensagens.Caption := p_strMsg; | |
| 164 | + | |
| 165 | + objCacic.writeDailyLog(lbMensagens.Caption); | |
| 166 | + Application.ProcessMessages; | |
| 167 | + | |
| 168 | + if (p_intPausaSegundos > 0) then | |
| 169 | + timerMessageShowTime.Interval := p_intPausaSegundos * 1000; | |
| 170 | + | |
| 171 | + timerMessageBoxShowOrHide.Enabled := true; | |
| 172 | + | |
| 173 | + Application.ProcessMessages; | |
| 174 | +End; | |
| 175 | + | |
| 176 | +procedure TfrmMapaCacic.Sair; | |
| 177 | +Begin | |
| 178 | + Application.Terminate; | |
| 179 | +End; | |
| 180 | + | |
| 181 | +procedure TfrmMapaCacic.Finalizar(p_pausa:boolean); | |
| 182 | +Begin | |
| 183 | + gbLeiaComAtencao.Visible := false; | |
| 184 | + gbInformacoesSobreComputador.Visible := false; | |
| 185 | + btGravarInformacoes.Visible := false; | |
| 186 | + | |
| 187 | + Mensagem('Finalizando o MapaCacic...'); | |
| 188 | + | |
| 189 | + Application.ProcessMessages; | |
| 190 | + | |
| 191 | + Sleep(1000); | |
| 192 | + | |
| 193 | + Sair; | |
| 194 | +End; | |
| 195 | + | |
| 196 | +procedure TfrmMapaCacic.rdConcordaTermosClick(Sender: TObject); | |
| 197 | +begin | |
| 198 | + btGravarInformacoes.Enabled:= true; | |
| 199 | +end; | |
| 200 | + | |
| 201 | +//------------------------------------------------------------------------------ | |
| 202 | +//------------------FUNÇÃO PARA RETORNAR O NOME DO COMPUTADOR.------------------ | |
| 203 | +//------------------------------------------------------------------------------ | |
| 204 | + | |
| 205 | +Function TfrmMapaCacic.NomeComputador : String; | |
| 206 | +var | |
| 207 | + lpBuffer : PChar; | |
| 208 | + nSize : DWord; | |
| 209 | +const Buff_Size = MAX_COMPUTERNAME_LENGTH + 1; | |
| 210 | +begin | |
| 211 | + nSize := Buff_Size; | |
| 212 | + lpBuffer := StrAlloc(Buff_Size); | |
| 213 | + GetComputerName(lpBuffer,nSize); | |
| 214 | + Result := String(lpBuffer); | |
| 215 | + StrDispose(lpBuffer); | |
| 216 | +end; | |
| 217 | + | |
| 218 | +//------------------------------------------------------------------------------ | |
| 219 | +//------------------FUNÇÃO PARA RETORNAR O NOME DO USUARIO.--------------------- | |
| 220 | +//------------------------------------------------------------------------------ | |
| 221 | + | |
| 222 | +Function TfrmMapaCacic.UserName : String; | |
| 223 | +var | |
| 224 | + lpBuffer : PChar; | |
| 225 | + nSize : DWord; | |
| 226 | +const Buff_Size = MAX_COMPUTERNAME_LENGTH + 1; | |
| 227 | +begin | |
| 228 | + nSize := Buff_Size; | |
| 229 | + lpBuffer := StrAlloc(Buff_Size); | |
| 230 | + GetUserName(lpBuffer,nSize); | |
| 231 | + Result := String(lpBuffer); | |
| 232 | + StrDispose(lpBuffer); | |
| 233 | +end; | |
| 234 | + | |
| 235 | +//------------------------------------------------------------------------------ | |
| 236 | +//----------------------FUNÇÃO PARA RETORNAR O PATRIMONIO----------------------- | |
| 237 | +//------------------------------------------------------------------------------ | |
| 238 | + | |
| 239 | +function TfrmMapaCacic.SetPatrimonioPC : String; | |
| 240 | +var | |
| 241 | + strPatrimonioPc, | |
| 242 | + strNomePC : String; | |
| 243 | +begin | |
| 244 | + Result:=''; | |
| 245 | + strNomePC:=NomeComputador; | |
| 246 | + | |
| 247 | + if (pos('-',strNomePC) > 0) then | |
| 248 | + strPatrimonioPc:=copy(strNomePC, 0, (pos('-', strNomePC)-1)); | |
| 249 | + Result:=strPatrimonioPC; | |
| 250 | +end; | |
| 251 | + | |
| 252 | +//------------------------------------------------------------------------------ | |
| 253 | +//--------------------FUNÇÃO PARA FORMATAR O CPF-------------------------------- | |
| 254 | +//------------------------------------------------------------------------------ | |
| 255 | + | |
| 256 | +function TfrmMapaCacic.FormatarCpf(strCpfUser : String) : String; | |
| 257 | +var | |
| 258 | + strCpfFormatado : String; | |
| 259 | +begin | |
| 260 | + Result:=''; | |
| 261 | + strCpfFormatado:= Copy(strCpfUser, 1,3) | |
| 262 | + | |
| 263 | + + '.' + Copy(strCpfUser, 4,3) | |
| 264 | + | |
| 265 | + + '.' + Copy(strCpfUser, 7,3) | |
| 266 | + | |
| 267 | + + '-' + Copy(strCpfUser, 10,2); | |
| 268 | + Result:=strCpfFormatado; | |
| 269 | + | |
| 270 | +end; | |
| 271 | +//------------------------------------------------------------------------------ | |
| 272 | +//--------------------FUNÇÃO PARA RETORNAR O CPF DO USUARIO--------------------- | |
| 273 | +//------------------------------------------------------------------------------ | |
| 274 | + | |
| 275 | +function TfrmMapaCacic.SetCpfUser : String; | |
| 276 | +var | |
| 277 | + strCpfUser, | |
| 278 | + strUser : String; | |
| 279 | +begin | |
| 280 | + Result:=''; | |
| 281 | + strUser:=UserName; | |
| 282 | + | |
| 283 | + if (pos('-',strUser) > 0) then | |
| 284 | + strCpfUser:=copy(strUser, 0, (pos('-', strUser)-1)); | |
| 285 | + | |
| 286 | + Result:=strCpfUser; | |
| 287 | +end; | |
| 288 | + | |
| 289 | +function TfrmMapaCacic.getConfigs : String; | |
| 290 | +Begin | |
| 291 | + btCombosUpdate.Enabled := false; | |
| 292 | + | |
| 293 | + Result := Comm(objCacic.getWebManagerAddress + objCacic.getWebServicesFolderName + 'get/config', strFieldsAndValuesToRequest,objCacic.getLocalFolderName); | |
| 294 | + objCacic.setBoolCipher(not objCacic.isInDebugMode); | |
| 295 | + | |
| 296 | + objCacic.writeDebugLog('FormActivate: Retorno de getConfigs: "'+Result+'"'); | |
| 297 | + | |
| 298 | + if (Result <> '0') then | |
| 299 | + Begin | |
| 300 | + Mensagem('Comunicação Efetuada com Sucesso! Salvando as Configurações Obtidas...',false,1); | |
| 301 | + objCacic.setValueToFile('Configs' ,'Patrimonio_Combos' , objCacic.getValueFromTags('Configs_Patrimonio_Combos' , Result), strGerColsInfFileName); | |
| 302 | + objCacic.setValueToFile('Configs' ,'Patrimonio_Interface' , objCacic.getValueFromTags('Configs_Patrimonio_Interface', Result), strGerColsInfFileName); | |
| 303 | + objCacic.setValueToFile('Collects','Patrimonio_Last' , objCacic.getValueFromTags('Collects_Patrimonio_Last' , Result), strGerColsInfFileName); | |
| 304 | + End; | |
| 305 | + btCombosUpdate.Enabled := true; | |
| 306 | +End; | |
| 307 | + | |
| 308 | +procedure TfrmMapaCacic.RecuperaValoresAnteriores; | |
| 309 | +var strCollectsPatrimonioLast, | |
| 310 | + strConfigsPatrimonioInterface : String; | |
| 311 | +begin | |
| 312 | + btCombosUpdate.Enabled := false; | |
| 313 | + | |
| 314 | + Mensagem('Recuperando Valores Anteriores...',false,1); | |
| 315 | + | |
| 316 | + strCollectsPatrimonioLast := objCacic.deCrypt( objCacic.GetValueFromFile | |
| 317 | + ('Collects','Patrimonio_Last', | |
| 318 | + strGerColsInfFileName)); | |
| 319 | + | |
| 320 | + if (strCollectsPatrimonioLast <> '') then | |
| 321 | + Begin | |
| 322 | + strConfigsPatrimonioInterface := objCacic.deCrypt( objCacic.GetValueFromFile | |
| 323 | + ('Configs','Patrimonio_Interface', | |
| 324 | + strGerColsInfFileName)); | |
| 325 | + | |
| 326 | + lbEtiqueta1.Caption := objCacic.getValueFromTags('te_etiqueta1', | |
| 327 | + strConfigsPatrimonioInterface); | |
| 328 | + | |
| 329 | + if (strTeInfoPatrimonio1='') then | |
| 330 | + strTeInfoPatrimonio1 := objCacic.getValueFromTags('TeInfoPatrimonio1', | |
| 331 | + strCollectsPatrimonioLast); | |
| 332 | + if (strTeInfoPatrimonio2='') then | |
| 333 | + strTeInfoPatrimonio2 := objCacic.getValueFromTags('TeInfoPatrimonio2', | |
| 334 | + strCollectsPatrimonioLast); | |
| 335 | + if (strTeInfoPatrimonio3='') then | |
| 336 | + strTeInfoPatrimonio3 := objCacic.getValueFromTags('TeInfoPatrimonio3', | |
| 337 | + strCollectsPatrimonioLast); | |
| 338 | + if (strTeInfoPatrimonio4='') then | |
| 339 | + strTeInfoPatrimonio4 := objCacic.getValueFromTags('TeInfoPatrimonio4', | |
| 340 | + strCollectsPatrimonioLast); | |
| 341 | + if (strTeInfoPatrimonio5='') then | |
| 342 | + strTeInfoPatrimonio5 := objCacic.getValueFromTags('TeInfoPatrimonio5', | |
| 343 | + strCollectsPatrimonioLast); | |
| 344 | + if (strTeInfoPatrimonio6='') then | |
| 345 | + strTeInfoPatrimonio6 := objCacic.getValueFromTags('TeInfoPatrimonio6', | |
| 346 | + strCollectsPatrimonioLast); | |
| 347 | + End; | |
| 348 | + btCombosUpdate.Enabled := true; | |
| 349 | + Application.ProcessMessages; | |
| 350 | +end; | |
| 351 | + | |
| 352 | +procedure TfrmMapaCacic.AtualizaPatrimonio(Sender: TObject); | |
| 353 | +var strColetaAtual, | |
| 354 | + strRetorno: String; | |
| 355 | +begin | |
| 356 | + | |
| 357 | + Mensagem('Enviando Informações Coletadas ao Banco de Dados...',false,1); | |
| 358 | + | |
| 359 | + strFieldsAndValuesToRequest := 'CollectType=' + objCacic.replaceInvalidHTTPChars(objCacic.enCrypt('col_patr')) ; | |
| 360 | + | |
| 361 | + strColetaAtual := StringReplace('[TeInfoPatrimonio]' + edTePatrimonioPc.Text + '[/TeInfoPatrimonio]' + | |
| 362 | + '[TeInfoUser]' + edTeInfoUserLogado.Text + '[/TeInfoUser]' + | |
| 363 | + '[TeInfoNome]' + edTeInfoNome.Text + '[/TeInfoNome]' + | |
| 364 | + '[TeInfoCpfUser]' + edTeInfoCpfUser.Text + '[/TeInfoCpfUser]' + | |
| 365 | + '[TeInfoPatrimonio1]' + edTeInfoPatrimonio1.Text + '[/TeInfoPatrimonio1]' + | |
| 366 | + '[TeInfoPatrimonio2]' + edTeInfoPatrimonio2.Text + '[/TeInfoPatrimonio2]' + | |
| 367 | + '[TeInfoPatrimonio3]' + edTeInfoPatrimonio3.Text + '[/TeInfoPatrimonio3]' + | |
| 368 | + '[TeInfoPatrimonio4]' + edTeInfoPatrimonio4.Text + '[/TeInfoPatrimonio4]' + | |
| 369 | + '[TeInfoPatrimonio5]' + edTeInfoPatrimonio5.Text + '[/TeInfoPatrimonio5]' + | |
| 370 | + '[TeInfoPatrimonio6]' + edTeInfoPatrimonio6.Text + '[/TeInfoPatrimonio6]',',','[[COMMA]]',[rfReplaceAll]); | |
| 371 | + | |
| 372 | + strFieldsAndValuesToRequest := strFieldsAndValuesToRequest + ',col_patr=' + | |
| 373 | + objCacic.replaceInvalidHTTPChars(objCacic.enCrypt(strColetaAtual)); | |
| 374 | + | |
| 375 | + strRetorno := Comm(objCacic.getWebManagerAddress + objCacic.getWebServicesFolderName + 'gercols/set/collects', strFieldsAndValuesToRequest, | |
| 376 | + objCacic.getLocalFolderName); | |
| 377 | + | |
| 378 | + objCacic.setBoolCipher(not objCacic.isInDebugMode); | |
| 379 | + | |
| 380 | + if (strRetorno = '0') then | |
| 381 | + Mensagem('ATENÇÃO: PROBLEMAS NO ENVIO DAS INFORMAÇÕES COLETADAS AO BANCO DE DADOS...',true,1) | |
| 382 | + else | |
| 383 | + Begin | |
| 384 | + Mensagem('Salvando Informações Coletadas em Base Local...',false,1); | |
| 385 | + objCacic.setValueToFile('Collects','Patrimonio_Last' , | |
| 386 | + objCacic.enCrypt(strColetaAtual), strGerColsInfFileName); | |
| 387 | + | |
| 388 | + End; | |
| 389 | + objCacic.writeDebugLog(#13#10 + 'AtualizaPatrimonio: Dados Enviados ao Servidor!'); | |
| 390 | + Application.ProcessMessages; | |
| 391 | + | |
| 392 | + Finalizar(true); | |
| 393 | + | |
| 394 | +end; | |
| 395 | + | |
| 396 | + | |
| 397 | +procedure TfrmMapaCacic.MontaInterface; | |
| 398 | +var strConfigsPatrimonioInterface : String; | |
| 399 | +Begin | |
| 400 | + btCombosUpdate.Enabled := false; | |
| 401 | + | |
| 402 | + Mensagem('Montando Interface para Coleta de Informações...',false,1); | |
| 403 | + | |
| 404 | +//-------------------------PATRIMONIO DA MAQUINA-------------------------------- | |
| 405 | + edTePatrimonioPc.Text := SetPatrimonioPc; | |
| 406 | + if edTePatrimonioPc.Text <> '' then | |
| 407 | + Begin | |
| 408 | + lbEtiquetaPatrimonioPc.Visible := true; | |
| 409 | + edTePatrimonioPc.Visible := true; | |
| 410 | + end; | |
| 411 | + | |
| 412 | + //-------------------------------NOME USUARIO----------------------------------- | |
| 413 | + edTeInfoNome.Text := 'Nome'; | |
| 414 | + if edTeInfoNome.Text <> '' then | |
| 415 | + begin | |
| 416 | + edTeInfoNome.Visible := true; | |
| 417 | + lbEtiquetaNome.Visible := true; | |
| 418 | + end; | |
| 419 | + | |
| 420 | +//-----------------------NOME DO COMPUTADOR PARA O EDTEXT----------------------- | |
| 421 | + edTeInfoNomeComputador.Text := NomeComputador; | |
| 422 | + if edTeInfoNomeComputador.Text <> '' then | |
| 423 | + begin | |
| 424 | + lbEtiquetaNomeComputador.Visible := true; | |
| 425 | + edTeInfoNomeComputador.Visible := true; | |
| 426 | + end; | |
| 427 | + | |
| 428 | +//-----------------------------USUARIO LOGADO----------------------------------- | |
| 429 | + | |
| 430 | + edTeInfoUserLogado.Text := UserName; | |
| 431 | + if edTeInfoUserLogado.Text <> '' then | |
| 432 | + begin | |
| 433 | + lbEtiquetaUserLogado.Visible := true; | |
| 434 | + edTeInfoUserLogado.Visible := true; | |
| 435 | + end; | |
| 436 | + | |
| 437 | +//-------------------------------CPF USUARIO------------------------------------ | |
| 438 | + | |
| 439 | + edTeInfoCpfUser.Text := FormatarCpf(SetCpfUser); | |
| 440 | + if edTeInfoCpfUser.Text <> '' then | |
| 441 | + begin | |
| 442 | + lbEtiquetaCpfUser.Visible := true; | |
| 443 | + edTeInfoCpfUser.Visible := true; | |
| 444 | + end; | |
| 445 | + | |
| 446 | +//-----------------------PUXA O IP DA MÁQUINA PARA O EDTEXT------------------------------------- | |
| 447 | + edTeInfoIpComputador.Text := idipwatch1.LocalIP; | |
| 448 | + if edTeInfoIpComputador.Text <> '' then | |
| 449 | + begin | |
| 450 | + lbEtiquetaIpComputador.Visible := true; | |
| 451 | + edTeInfoIpComputador.Visible := true; | |
| 452 | + end; | |
| 453 | + | |
| 454 | + | |
| 455 | + //----------VALOR DE strGerColsInfFileName ALTERADO PARA ARQUIVO TESTE----------------------------- | |
| 456 | + strConfigsPatrimonioInterface := objCacic.deCrypt( objCacic.getValueFromFile('Configs','Patrimonio_Interface',strGerColsInfFileName)); | |
| 457 | + | |
| 458 | + objCacic.writeDebugLog('MontaInterface: in_exibir_etiqueta1 -> "' + | |
| 459 | + objCacic.getValueFromTags('in_exibir_etiqueta1', | |
| 460 | + strConfigsPatrimonioInterface)+'"'); | |
| 461 | + | |
| 462 | + if (trim(objCacic.getValueFromTags('in_exibir_etiqueta1', strConfigsPatrimonioInterface)) = 'S') then | |
| 463 | + begin | |
| 464 | + lbEtiqueta1.Caption := objCacic.getValueFromTags('te_etiqueta1', strConfigsPatrimonioInterface); | |
| 465 | + lbEtiqueta1.Visible := true; | |
| 466 | + edTeInfoPatrimonio1.Hint := objCacic.getValueFromTags('te_help_etiqueta1', strConfigsPatrimonioInterface); | |
| 467 | + edTeInfoPatrimonio1.Text := strTeInfoPatrimonio1; | |
| 468 | + edTeInfoPatrimonio1.visible := True; | |
| 469 | + end; | |
| 470 | + | |
| 471 | + objCacic.writeDebugLog('MontaInterface: in_exibir_etiqueta2 -> "' + | |
| 472 | + objCacic.getValueFromTags('in_exibir_etiqueta2', | |
| 473 | + strConfigsPatrimonioInterface)+'"'); | |
| 474 | + | |
| 475 | + if (trim(objCacic.getValueFromTags('in_exibir_etiqueta2', strConfigsPatrimonioInterface)) = 'S') then | |
| 476 | + begin | |
| 477 | + lbEtiqueta2.Caption := objCacic.getValueFromTags('te_etiqueta2', strConfigsPatrimonioInterface); | |
| 478 | + lbEtiqueta2.Visible := true; | |
| 479 | + edTeInfoPatrimonio2.Hint := objCacic.getValueFromTags('te_help_etiqueta2', strConfigsPatrimonioInterface); | |
| 480 | + edTeInfoPatrimonio2.Text := strTeInfoPatrimonio2; | |
| 481 | + edTeInfoPatrimonio2.visible := True; | |
| 482 | + end; | |
| 483 | + | |
| 484 | + objCacic.writeDebugLog('MontaInterface: in_exibir_etiqueta3 -> "' + | |
| 485 | + objCacic.getValueFromTags('in_exibir_etiqueta3', | |
| 486 | + strConfigsPatrimonioInterface)+'"'); | |
| 487 | + | |
| 488 | + if (trim(objCacic.getValueFromTags('in_exibir_etiqueta3', strConfigsPatrimonioInterface)) = 'S') then | |
| 489 | + begin | |
| 490 | + lbEtiqueta3.Caption := objCacic.getValueFromTags('te_etiqueta3', strConfigsPatrimonioInterface); | |
| 491 | + lbEtiqueta3.Visible := true; | |
| 492 | + edTeInfoPatrimonio3.Hint := objCacic.getValueFromTags('te_help_etiqueta3', strConfigsPatrimonioInterface); | |
| 493 | + edTeInfoPatrimonio3.Text := strTeInfoPatrimonio3; | |
| 494 | + edTeInfoPatrimonio3.visible := True; | |
| 495 | + end; | |
| 496 | + | |
| 497 | + objCacic.writeDebugLog('MontaInterface: in_exibir_etiqueta4 -> "' + | |
| 498 | + objCacic.getValueFromTags('in_exibir_etiqueta4', | |
| 499 | + strConfigsPatrimonioInterface)+'"'); | |
| 500 | + | |
| 501 | + if (trim(objCacic.getValueFromTags('in_exibir_etiqueta4', strConfigsPatrimonioInterface)) = 'S') then | |
| 502 | + begin | |
| 503 | + lbEtiqueta4.Caption := objCacic.getValueFromTags('te_etiqueta4', strConfigsPatrimonioInterface); | |
| 504 | + lbEtiqueta4.Visible := true; | |
| 505 | + edTeInfoPatrimonio4.Hint := objCacic.getValueFromTags('te_help_etiqueta4', strConfigsPatrimonioInterface); | |
| 506 | + edTeInfoPatrimonio4.Text := strTeInfoPatrimonio4; | |
| 507 | + edTeInfoPatrimonio4.visible := True; | |
| 508 | + end; | |
| 509 | + | |
| 510 | + objCacic.writeDebugLog('MontaInterface: in_exibir_etiqueta5 -> "' + | |
| 511 | + objCacic.getValueFromTags('in_exibir_etiqueta5', | |
| 512 | + strConfigsPatrimonioInterface)+'"'); | |
| 513 | + | |
| 514 | + if (trim(objCacic.getValueFromTags('in_exibir_etiqueta5', strConfigsPatrimonioInterface)) = 'S') then | |
| 515 | + begin | |
| 516 | + lbEtiqueta5.Caption := objCacic.getValueFromTags('te_etiqueta5', strConfigsPatrimonioInterface); | |
| 517 | + lbEtiqueta5.Visible := true; | |
| 518 | + edTeInfoPatrimonio5.Hint := objCacic.getValueFromTags('te_help_etiqueta5', strConfigsPatrimonioInterface); | |
| 519 | + edTeInfoPatrimonio5.Text := strTeInfoPatrimonio5; | |
| 520 | + edTeInfoPatrimonio5.visible := True; | |
| 521 | + end; | |
| 522 | + | |
| 523 | + objCacic.writeDebugLog('MontaInterface: in_exibir_etiqueta6 -> "' + | |
| 524 | + objCacic.getValueFromTags('in_exibir_etiqueta6', | |
| 525 | + strConfigsPatrimonioInterface)+'"'); | |
| 526 | + | |
| 527 | + if (trim(objCacic.getValueFromTags('in_exibir_etiqueta6', strConfigsPatrimonioInterface)) = 'S') then | |
| 528 | + begin | |
| 529 | + lbEtiqueta6.Caption := objCacic.getValueFromTags('te_etiqueta6', strConfigsPatrimonioInterface); | |
| 530 | + lbEtiqueta6.Visible := true; | |
| 531 | + edTeInfoPatrimonio6.Hint := objCacic.getValueFromTags('te_help_etiqueta6', strConfigsPatrimonioInterface); | |
| 532 | + edTeInfoPatrimonio6.Text := strTeInfoPatrimonio6; | |
| 533 | + edTeInfoPatrimonio6.visible := True; | |
| 534 | + end; | |
| 535 | + | |
| 536 | + Mensagem('',false,1); | |
| 537 | + btGravarInformacoes.Visible := true; | |
| 538 | + btCombosUpdate.Enabled := true; | |
| 539 | + | |
| 540 | + Application.ProcessMessages; | |
| 541 | +end; | |
| 542 | + | |
| 543 | +procedure TfrmMapaCacic.FormClose(Sender: TObject; var Action: TCloseAction); | |
| 544 | +begin | |
| 545 | + If Not fechar Then //se a variavel de fechamento fecha estiver falsa | |
| 546 | + Action := caNone // nao realizará nenhuma operação | |
| 547 | + Else | |
| 548 | + begin | |
| 549 | + Action := caFree; | |
| 550 | + objCacic.writeDebugLog('FormClose: ' + Sender.ClassName); | |
| 551 | + Finalizar(true); | |
| 552 | + end; | |
| 553 | +end; | |
| 554 | + | |
| 555 | + | |
| 556 | +procedure TfrmMapaCacic.mapa; | |
| 557 | +begin | |
| 558 | + Try | |
| 559 | + MontaInterface; | |
| 560 | + RecuperaValoresAnteriores; | |
| 561 | + Except | |
| 562 | + on E:Exception do | |
| 563 | + Begin | |
| 564 | + objCacic.writeExceptionLog(E.Message,e.ClassName); | |
| 565 | + End; | |
| 566 | + End; | |
| 567 | +End; | |
| 568 | + | |
| 569 | +procedure TfrmMapaCacic.FormCreate(Sender: TObject); | |
| 570 | + | |
| 571 | +begin | |
| 572 | + | |
| 573 | + | |
| 574 | + frmMapaCacic.boolAcessoOK := true; | |
| 575 | + Fechar:=TRUE; //Definido TRUE para que a aplicação possa ser fechada normalmente | |
| 576 | + foco:=True; //DEFINIDO COMO TRUE PARA QUE A JANELA NÃO SEJA FECHADA | |
| 577 | + Try | |
| 578 | + strFrmAtual := 'Principal'; | |
| 579 | + objCacic := TCACIC.Create(); | |
| 580 | + | |
| 581 | + objCacic.setBoolCipher(true); | |
| 582 | + objCacic.setLocalFolderName('Cacic'); | |
| 583 | + objCacic.setWebServicesFolderName('/ws'); | |
| 584 | + | |
| 585 | + //Se foco for verdadeiro, executar procedimento SetFocus, o qual modifica | |
| 586 | + //propriedades do form e starta o timer para esconder o processo no gerenciador. | |
| 587 | + if foco then | |
| 588 | + SetFocus; | |
| 589 | + | |
| 590 | + if IsUserAnAdmin then | |
| 591 | + Begin | |
| 592 | + strChkSisInfFileName := objCacic.getWinDir + 'chksis.inf'; | |
| 593 | + | |
| 594 | + Mensagem('Caminho local para a aplicação CACIC: "' + | |
| 595 | + objCacic.GetValueFromFile('Configs','LocalFolderName', | |
| 596 | + strChkSisInfFileName)+'"'); | |
| 597 | + if not (objCacic.GetValueFromFile('Configs','LocalFolderName', | |
| 598 | + strChkSisInfFileName) = '') then | |
| 599 | + | |
| 600 | + Begin | |
| 601 | + | |
| 602 | + objCacic.setLocalFolderName(objCacic.GetValueFromFile | |
| 603 | + ('Configs', 'LocalFolderName', | |
| 604 | + strChkSisInfFileName)); | |
| 605 | + | |
| 606 | + objCacic.setWebServicesFolderName(objCacic.GetValueFromFile | |
| 607 | + ('Configs','WebServicesFolderName', | |
| 608 | + strChkSisInfFileName)); | |
| 609 | + | |
| 610 | + objCacic.setWebManagerAddress(objCacic.GetValueFromFile | |
| 611 | + ('Configs','WebManagerAddress', | |
| 612 | + strChkSisInfFileName)); | |
| 613 | + | |
| 614 | + | |
| 615 | + strGerColsInfFileName := objCacic.getLocalFolderName + 'GerCols.inf'; | |
| 616 | + | |
| 617 | + // A existência e bloqueio do arquivo abaixo evitará que o Agente Principal entre em ação | |
| 618 | + | |
| 619 | +//ATENÇÃO-> O caminho do arquivo "aguarde_MAPACACIC.txt" foi modificado, pois o | |
| 620 | +//agente instalado estava excluíndo sempre que o mesmo era criado, dando conflito | |
| 621 | +//com o Mapa. | |
| 622 | + | |
| 623 | + //AssignFile(textFileAguarde,objCacic.getLocalFolderName + | |
| 624 | + // '\temp\aguarde_MAPACACIC.txt'); //Associa o arquivo a uma variável do tipo TextFile | |
| 625 | + | |
| 626 | + AssignFile(textFileAguarde, 'C:\Documents and Settings\adriano\Desktop\TesteLerArquivo\aguarde_MAPACACIC.txt'); | |
| 627 | + | |
| 628 | + //$IOChecks off | |
| 629 | + Reset(textFileAguarde); //Abre o arquivo texto | |
| 630 | + //$IOChecks on | |
| 631 | + if (IOResult <> 0) then // Arquivo não existe, será recriado. | |
| 632 | + Rewrite (textFileAguarde); | |
| 633 | + | |
| 634 | + Append(textFileAguarde); | |
| 635 | + Writeln(textFileAguarde,'Apenas um pseudo-cookie para o Agente Principal esperar o término de MapaCACIC'); | |
| 636 | + Append(textFileAguarde); | |
| 637 | + | |
| 638 | + frmMapaCacic.edWebManagerAddress.Caption := objCacic.GetValueFromFile('Configs','WebManagerAddress', strChkSisInfFileName); | |
| 639 | + | |
| 640 | + frmMapaCacic.lbMensagens.Caption := 'Entrada de Dados para Autenticação no Módulo Gerente WEB Cacic'; | |
| 641 | + objCacic.writeDebugLog('FormActivate: Versão do MapaCacic...: ' + | |
| 642 | + pnVersao.Caption); | |
| 643 | + objCacic.writeDebugLog('FormActivate: Hash-Code do MapaCacic: ' + | |
| 644 | + objCacic.getFileHash(ParamStr(0))); | |
| 645 | + | |
| 646 | + pnMessageBox.Visible := true; | |
| 647 | + Mensagem('Efetuando Comunicação com o Módulo Gerente WEB em "'+objCacic.GetValueFromFile('Configs','WebManagerAddress', strChkSisInfFileName)+'"...',false,1); | |
| 648 | + // Povoamento com dados de configurações da interface patrimonial | |
| 649 | + // Solicita ao servidor as configurações para a Coleta de Informações de Patrimônio | |
| 650 | + pnMessageBox.Visible := false; | |
| 651 | + objCacic.writeDebugLog('FormActivate: Requisitando informações de patrimônio da estação...'); | |
| 652 | + | |
| 653 | + if (getConfigs <> '0') then | |
| 654 | + mapa | |
| 655 | + else | |
| 656 | + Sair; | |
| 657 | + end | |
| 658 | + else | |
| 659 | + Begin | |
| 660 | + frmMapaCacic.boolAcessoOK := false; | |
| 661 | + MessageDLG(#13#10+'Atenção! É necessário reinstalar o CACIC nesta estação.' + #13#10 + #13#10 + | |
| 662 | + 'A estrutura encontra-se corrompida.' + #13#10,mtError,[mbOK],0); | |
| 663 | + Application.ProcessMessages; | |
| 664 | + frmMapaCacic.Finalizar(false); | |
| 665 | + End; | |
| 666 | + End | |
| 667 | + else | |
| 668 | + Begin // Se NT/2000/XP/... | |
| 669 | + MessageDLG(#13#10+'ATENÇÃO! Essa aplicação requer execução com nível administrativo.',mtError,[mbOK],0); | |
| 670 | + objCacic.writeDailyLog('SEM PRIVILÉGIOS: Necessário ser administrador "local" ou de Domínio!'); | |
| 671 | + Sair; | |
| 672 | + End | |
| 673 | + Finally | |
| 674 | + End; | |
| 675 | +end; | |
| 676 | + | |
| 677 | +procedure TfrmMapaCacic.FormActivate(Sender: TObject); | |
| 678 | +begin | |
| 679 | + pnVersao.Caption := 'Versão: ' + objCacic.getVersionInfo(ParamStr(0)); | |
| 680 | + strFrmAtual := 'Principal'; | |
| 681 | +end; | |
| 682 | + | |
| 683 | +procedure TfrmMapaCacic.btCombosUpdateClick(Sender: TObject); | |
| 684 | +begin | |
| 685 | + | |
| 686 | + getConfigs; | |
| 687 | + MontaInterface; | |
| 688 | + RecuperaValoresAnteriores; | |
| 689 | + | |
| 690 | +end; | |
| 691 | + | |
| 692 | +procedure TfrmMapaCacic.timerMessageShowTimeTimer(Sender: TObject); | |
| 693 | +begin | |
| 694 | + timerMessageShowTime.Enabled := false; | |
| 695 | + timerMessageShowTime.Interval := 0; | |
| 696 | + strShowOrHide := 'Hide'; | |
| 697 | + timerMessageBoxShowOrHide.Enabled := true; | |
| 698 | +end; | |
| 699 | + | |
| 700 | + | |
| 701 | +//------------------------------------------------------------------------------ | |
| 702 | +//PROCEDURE CRIADO PARA DEIXAR O FORM FULLSCREEN E FOCADO, SEM QUE SEJA POSSÍVEL | |
| 703 | +//FECHAR OU ALTERNAR ENTRE OUTRAS JANELAS ATÉ QUE ATUALIZE O PATRIMONIO. | |
| 704 | +procedure TfrmMapaCacic.SetFocus; | |
| 705 | +var | |
| 706 | + r : TRect; | |
| 707 | +begin | |
| 708 | + Fechar := False; | |
| 709 | + BorderIcons := BorderIcons - [biSystemMenu] - [biMinimize] - [biMaximize]; | |
| 710 | + BorderStyle := bsNone; | |
| 711 | + FormStyle := fsStayOnTop; | |
| 712 | + SystemParametersInfo(SPI_GETWORKAREA, 0, @r,0); | |
| 713 | + SetBounds(r.Left, r.Top, r.Right-r.Left, r.Bottom-r.Top); | |
| 714 | + timerProcessos.Enabled := True; | |
| 715 | +end; | |
| 716 | + | |
| 717 | +//------------------------------------------------------------------------------ | |
| 718 | +//-----------------BEGIN-----RETIRA PROCESSO DO GERENCIADOR--------------------- | |
| 719 | +//------------------------------------------------------------------------------ | |
| 720 | + | |
| 721 | +procedure TfrmMapaCacic.timerProcessosTimer(Sender: TObject); | |
| 722 | +var | |
| 723 | + dwSize,dwNumBytes,PID,hProc: Cardinal; | |
| 724 | + PLocalShared,PSysShared: PlvItem; | |
| 725 | + h: THandle; | |
| 726 | + iCount,i: integer; | |
| 727 | + szTemp: string; | |
| 728 | +begin | |
| 729 | + //Pega o Handle da ListView | |
| 730 | + h:=FindWindow('#32770',nil); | |
| 731 | + h:=FindWindowEx(h,0,'#32770',nil); | |
| 732 | + h:=FindWindowEx(h,0,'SysListView32',nil); | |
| 733 | + | |
| 734 | + //Pega o número de itens da ListView | |
| 735 | + iCount:=SendMessage(h, LVM_GETITEMCOUNT,0,0); | |
| 736 | + for i:=0 to iCount-1 do | |
| 737 | + begin | |
| 738 | + //Define o tamanho de cada item da ListView | |
| 739 | + dwSize:=sizeof(LV_ITEM) + sizeof(CHAR) * MAX_PATH; | |
| 740 | + | |
| 741 | + //Abre um espaço na memória do NOSSO programa para o PLocalShared | |
| 742 | + PLocalShared:=VirtualAlloc(nil, dwSize, MEM_RESERVE + MEM_COMMIT, PAGE_READWRITE); | |
| 743 | + | |
| 744 | + //Pega o PID do processo taskmgr | |
| 745 | + GetWindowThreadProcessId(h,@PID); | |
| 746 | + | |
| 747 | + //Abre o processo taskmgr | |
| 748 | + hProc:=OpenProcess(PROCESS_ALL_ACCESS,false,PID); | |
| 749 | + | |
| 750 | + //Abre um espaço na memória do taskmgr para o PSysShared | |
| 751 | + PSysShared:=VirtualAllocEx(hProc, nil, dwSize, MEM_RESERVE OR MEM_COMMIT, PAGE_READWRITE); | |
| 752 | + | |
| 753 | + //Define as propriedades do PLocalShared | |
| 754 | + PLocalShared.mask:=LVIF_TEXT; | |
| 755 | + PLocalShared.iItem:=0; | |
| 756 | + PLocalShared.iSubItem:=0; | |
| 757 | + PLocalShared.pszText:=LPTSTR(dword(PSysShared) + sizeof(LV_ITEM)); | |
| 758 | + PLocalShared.cchTextMax:=20; | |
| 759 | + | |
| 760 | + //Escreve PLocalShared no espaço de memória que abriu no taskmgr | |
| 761 | + WriteProcessMemory(hProc,PSysShared,PLocalShared,1024,dwNumBytes); | |
| 762 | + | |
| 763 | + //Pega o texto to item i e passa pro PSysShared | |
| 764 | + SendMessage(h,LVM_GETITEMTEXT,i,LPARAM(PSysShared)); | |
| 765 | + | |
| 766 | + //Passa o PSysShared para o PLocalShared | |
| 767 | + ReadProcessMemory(hProc,PSysShared,PLocalShared,1024,dwNumBytes); | |
| 768 | + | |
| 769 | + //Passa o texto do Item para szTemp | |
| 770 | + szTemp:=pchar(dword(PLocalShared)+sizeof(LV_ITEM)); | |
| 771 | + | |
| 772 | + //Se esse texto contiver a string proc deleta o item | |
| 773 | + if LowerCase(szTemp) = 'mapacacicteste.exe' then | |
| 774 | + ListView_DeleteItem(h,i); | |
| 775 | + | |
| 776 | + //Libera os espaços de memória utilizados | |
| 777 | + VirtualFree(pLocalShared, 0, MEM_RELEASE); | |
| 778 | + VirtualFreeEx(hProc, pSysShared, 0, MEM_RELEASE); | |
| 779 | + | |
| 780 | + //Fecha o handle do processo | |
| 781 | + CloseHandle(hProc); | |
| 782 | + end; | |
| 783 | +end; | |
| 784 | + | |
| 785 | +end. | ... | ... |
No preview for this file type