Buscar

Modularização

Esta é uma pré-visualização de arquivo. Entre para ver o arquivo original

06_Modulariza��o/Procedures/prjModularizacao.dpr
program prjModularizacao;
uses
 Vcl.Forms,
 unModularizacaopas in 'unModularizacaopas.pas' {frmModularizacao},
 unBiblioteca in 'unBiblioteca.pas';
{$R *.res}
begin
 Application.Initialize;
 Application.MainFormOnTaskbar := True;
 Application.CreateForm(TfrmModularizacao, frmModularizacao);
 Application.Run;
end.
06_Modulariza��o/Procedures/prjModularizacao.dproj
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 <PropertyGroup>
 <ProjectGuid>{32C24E37-F0DC-4230-B7A8-3F9CDC5D0A61}</ProjectGuid>
 <ProjectVersion>18.2</ProjectVersion>
 <FrameworkType>VCL</FrameworkType>
 <MainSource>prjModularizacao.dpr</MainSource>
 <Base>True</Base>
 <Config Condition="'$(Config)'==''">Debug</Config>
 <Platform Condition="'$(Platform)'==''">Win32</Platform>
 <TargetedPlatforms>1</TargetedPlatforms>
 <AppType>Application</AppType>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
 <Base>true</Base>
 </PropertyGroup>
 <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
 <Base_Win32>true</Base_Win32>
 <CfgParent>Base</CfgParent>
 <Base>true</Base>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
 <Cfg_1>true</Cfg_1>
 <CfgParent>Base</CfgParent>
 <Base>true</Base>
 </PropertyGroup>
 <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
 <Cfg_1_Win32>true</Cfg_1_Win32>
 <CfgParent>Cfg_1</CfgParent>
 <Cfg_1>true</Cfg_1>
 <Base>true</Base>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
 <Cfg_2>true</Cfg_2>
 <CfgParent>Base</CfgParent>
 <Base>true</Base>
 </PropertyGroup>
 <PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
 <Cfg_2_Win32>true</Cfg_2_Win32>
 <CfgParent>Cfg_2</CfgParent>
 <Cfg_2>true</Cfg_2>
 <Base>true</Base>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Base)'!=''">
 <UWP_DelphiLogo150>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png</UWP_DelphiLogo150>
 <Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
 <SanitizedProjectName>prjModularizacao</SanitizedProjectName>
 <UWP_DelphiLogo44>$(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png</UWP_DelphiLogo44>
 <DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
 <DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
 <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
 <DCC_E>false</DCC_E>
 <DCC_N>false</DCC_N>
 <DCC_S>false</DCC_S>
 <DCC_F>false</DCC_F>
 <DCC_K>false</DCC_K>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Base_Win32)'!=''">
 <VerInfo_Locale>1033</VerInfo_Locale>
 <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
 <DCC_UsePackage>DBXSqliteDriver;RESTComponents;fmxase;DBXDb2Driver;DBXInterBaseDriver;vclactnband;vclFireDAC;emsclientfiredac;tethering;svnui;DataSnapFireDAC;FireDACADSDriver;DBXMSSQLDriver;DatasnapConnectorsFreePascal;FireDACMSSQLDriver;vcltouch;vcldb;bindcompfmx;svn;DBXOracleDriver;inetdb;FmxTeeUI;emsedge;FireDACIBDriver;fmx;fmxdae;frx24;FireDACDBXDriver;dbexpress;IndyCore;vclx;dsnap;emsclient;DataSnapCommon;FireDACCommon;RESTBackendComponents;DataSnapConnectors;VCLRESTComponents;soapserver;vclie;bindengine;DBXMySQLDriver;CloudService;FireDACOracleDriver;FireDACMySQLDriver;DBXFirebirdDriver;FireDACCommonODBC;FireDACCommonDriver;DataSnapClient;inet;IndyIPCommon;bindcompdbx;vcl;IndyIPServer;DBXSybaseASEDriver;IndySystem;FireDACDb2Driver;dsnapcon;FireDACMSAccDriver;fmxFireDAC;FireDACInfxDriver;vclimg;TeeDB;FireDAC;emshosting;FireDACSqliteDriver;FireDACPgDriver;FireDACASADriver;DBXOdbcDriver;FireDACTDataDriver;FMXTee;soaprtl;DbxCommonDriver;Tee;DataSnapServer;xmlrtl;soapmidas;DataSnapNativeClient;fmxobj;vclwinx;FireDACDSDriver;rtl;DbxClientDriver;DBXSybaseASADriver;frxTee24;CustomIPTransport;vcldsnap;bindcomp;appanalytics;DBXInformixDriver;IndyIPClient;bindcompvcl;frxe24;TeeUI;dbxcds;VclSmp;adortl;FireDACODBCDriver;DataSnapIndy10ServerTransport;frxDB24;dsnapxml;DataSnapProviderClient;dbrtl;IndyProtocols;inetdbxpress;FireDACMongoDBDriver;DataSnapServerMidas;$(DCC_UsePackage)</DCC_UsePackage>
 <BT_BuildType>Debug</BT_BuildType>
 <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
 <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
 <VerInfo_Keys>CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Cfg_1)'!=''">
 <DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
 <DCC_DebugDCUs>true</DCC_DebugDCUs>
 <DCC_Optimize>false</DCC_Optimize>
 <DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
 <DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
 <DCC_RemoteDebug>true</DCC_RemoteDebug>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
 <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
 <AppEnableHighDPI>true</AppEnableHighDPI>
 <DCC_RemoteDebug>false</DCC_RemoteDebug>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Cfg_2)'!=''">
 <DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
 <DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
 <DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
 <DCC_DebugInformation>0</DCC_DebugInformation>
 </PropertyGroup>
 <PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
 <AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
 <AppEnableHighDPI>true</AppEnableHighDPI>
 </PropertyGroup>
 <ItemGroup>
 <DelphiCompile Include="$(MainSource)">
 <MainSource>MainSource</MainSource>
 </DelphiCompile>
 <DCCReference Include="unModularizacaopas.pas">
 <Form>frmModularizacao</Form>
 <FormType>dfm</FormType>
 </DCCReference>
 <DCCReference Include="unBiblioteca.pas"/>
 <BuildConfiguration Include="Release">
 <Key>Cfg_2</Key>
 <CfgParent>Base</CfgParent>
 </BuildConfiguration>
 <BuildConfiguration Include="Base">
 <Key>Base</Key>
 </BuildConfiguration>
 <BuildConfiguration Include="Debug">
 <Key>Cfg_1</Key>
 <CfgParent>Base</CfgParent>
 </BuildConfiguration>
 </ItemGroup>
 <ProjectExtensions>
 <Borland.Personality>Delphi.Personality.12</Borland.Personality>
 <Borland.ProjectType>Application</Borland.ProjectType>
 <BorlandProject>
 <Delphi.Personality>
 <Source>
 <Source Name="MainSource">prjModularizacao.dpr</Source>
 </Source>
 </Delphi.Personality>
 <Deployment Version="3">
 <DeployFile LocalName="Win32\Debug\prjModularizacao.exe" Configuration="Debug" Class="ProjectOutput">
 <Platform Name="Win32">
 <RemoteName>prjModularizacao.exe</RemoteName>
 <Overwrite>true</Overwrite>
 </Platform>
 </DeployFile>
 <DeployClass Name="DependencyModule">
 <Platform Name="Win32">
<Operation>0</Operation>
 <Extensions>.dll;.bpl</Extensions>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectOSXResource">
 <Platform Name="OSX32">
 <RemoteDir>Contents\Resources</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AndroidClassesDexFile">
 <Platform Name="Android">
 <RemoteDir>classes</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AdditionalDebugSymbols">
 <Platform Name="Win32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>0</Operation>
 </Platform>
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPad_Launch768">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_LauncherIcon144">
 <Platform Name="Android">
 <RemoteDir>res\drawable-xxhdpi</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AndroidLibnativeMipsFile">
 <Platform Name="Android">
 <RemoteDir>library\lib\mips</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Required="true" Name="ProjectOutput">
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="Win32">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="Linux64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 <Platform Name="Android">
 <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="DependencyFramework">
 <Platform Name="Win32">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>1</Operation>
 <Extensions>.framework</Extensions>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectUWPManifest">
 <Platform Name="Win32">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="Win64">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPhone_Launch640">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPad_Launch1024">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectiOSDeviceDebug">
 <Platform Name="iOSDevice64">
 <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPhone_Launch320">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectiOSInfoPList">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AndroidLibnativeArmeabiFile">
 <Platform Name="Android">
 <RemoteDir>library\lib\armeabi</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="DebugSymbols">
<Platform Name="Win32">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPad_Launch1536">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_SplashImage470">
 <Platform Name="Android">
 <RemoteDir>res\drawable-normal</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_LauncherIcon96">
 <Platform Name="Android">
 <RemoteDir>res\drawable-xhdpi</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_SplashImage640">
 <Platform Name="Android">
 <RemoteDir>res\drawable-large</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPhone_Launch640x1136">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="UWP_DelphiLogo44">
 <Platform Name="Win32">
 <RemoteDir>Assets</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 <Platform Name="Win64">
 <RemoteDir>Assets</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectiOSEntitlements">
 <Platform Name="iOSDevice64">
 <RemoteDir>..\</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <RemoteDir>..\</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_LauncherIcon72">
 <Platform Name="Android">
 <RemoteDir>res\drawable-hdpi</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AndroidGDBServer">
 <Platform Name="Android">
 <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectOSXInfoPList">
 <Platform Name="OSX32">
 <RemoteDir>Contents</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectOSXEntitlements">
 <Platform Name="OSX32">
 <RemoteDir>..\</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="UWP_DelphiLogo150">
 <Platform Name="Win32">
 <RemoteDir>Assets</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 <Platform Name="Win64">
 <RemoteDir>Assets</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="iPad_Launch2048">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AndroidSplashStyles">
 <Platform Name="Android">
 <RemoteDir>res\values</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_SplashImage426">
 <Platform Name="Android">
 <RemoteDir>res\drawable-small</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="AndroidSplashImageDef">
 <Platform Name="Android">
 <RemoteDir>res\drawable</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectiOSResource">
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectAndroidManifest">
 <Platform Name="Android">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_DefaultAppIcon">
 <Platform Name="Android">
 <RemoteDir>res\drawable</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="File">
 <Platform Name="Win32">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
 <Operation>0</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="Android">
 <Operation>0</Operation>
 </Platform>
 <Platform Name="iOSSimulator">
 <Operation>0</Operation>
</Platform>
 </DeployClass>
 <DeployClass Name="AndroidServiceOutput">
 <Platform Name="Android">
 <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Required="true" Name="DependencyPackage">
 <Platform Name="Win32">
 <Operation>0</Operation>
 <Extensions>.bpl</Extensions>
 </Platform>
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 <Platform Name="OSX32">
 <RemoteDir>Contents\MacOS</RemoteDir>
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 <Platform Name="iOSSimulator">
 <Operation>1</Operation>
 <Extensions>.dylib</Extensions>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_LauncherIcon48">
 <Platform Name="Android">
 <RemoteDir>res\drawable-mdpi</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_SplashImage960">
 <Platform Name="Android">
 <RemoteDir>res\drawable-xlarge</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="Android_LauncherIcon36">
 <Platform Name="Android">
 <RemoteDir>res\drawable-ldpi</RemoteDir>
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <DeployClass Name="ProjectiOSDeviceResourceRules">
 <Platform Name="iOSDevice64">
 <Operation>1</Operation>
 </Platform>
 <Platform Name="iOSDevice32">
 <Operation>1</Operation>
 </Platform>
 </DeployClass>
 <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
 <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
 <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>
 <ProjectRoot Platform="Linux64" Name="$(PROJECTNAME)"/>
 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
 <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
 </Deployment>
 <Platforms>
 <Platform value="Win32">True</Platform>
 </Platforms>
 </BorlandProject>
 <ProjectFileVersion>12</ProjectFileVersion>
 </ProjectExtensions>
 <Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
 <Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
 <Import Project="$(MSBuildProjectName).deployproj" Condition="Exists('$(MSBuildProjectName).deployproj')"/>
</Project>
06_Modulariza��o/Procedures/prjModularizacao.dproj.local
 
	 
 2017/09/13 18:58:49.000.970,=C:\Users\anasc\Documents\Embarcadero\Studio\Projects\Unit1.pas
 2017/09/13 18:59:58.000.959,C:\Users\anasc\Documents\Aulas Delphi\06_Modularização\Procedures\unModularizacaopas.pas=C:\Users\anasc\Documents\Embarcadero\Studio\Projects\Unit1.pas
 2017/09/13 18:59:58.000.959,C:\Users\anasc\Documents\Aulas Delphi\06_Modularização\Procedures\unModularizacaopas.dfm=C:\Users\anasc\Documents\Embarcadero\Studio\Projects\Unit1.dfm
 2017/09/13 19:00:08.000.993,C:\Users\anasc\Documents\Aulas Delphi\06_Modularização\Procedures\prjModularizacao.dproj=C:\Users\anasc\Documents\Embarcadero\Studio\Projects\Project1.dproj
 2017/09/15 22:29:03.000.362,=C:\Users\anasc\Documents\Aulas Delphi\06_Modularização\Procedures\Unit1.pas
 2017/09/15 22:30:30.000.432,C:\Users\anasc\Documents\Aulas Delphi\06_Modularização\Procedures\Unit1.pas=C:\Users\anasc\Documents\Aulas Delphi\06_Modularização\Procedures\unBiblioteca.pas
 
06_Modulariza��o/Procedures/prjModularizacao.identcache
06_Modulariza��o/Procedures/prjModularizacao.res
06_Modulariza��o/Procedures/prjModularizacao.stat
[Stats]
EditorSecs=2204
DesignerSecs=500
InspectorSecs=650
CompileSecs=37842
OtherSecs=769
StartTime=15/09/2017 21:28:57
RealKeys=0
EffectiveKeys=0
DebugSecs=1
06_Modulariza��o/Procedures/unBiblioteca.pas
unit unBiblioteca;
interface
 procedure msgOk(texto: String);
 //função com parametro com valor default e sobrecarga
 function msgSN(texto: String; cancelar: boolean = false): smallint; overload;
 //função com sobrecarga
 function msgSN(opcao: smallint) : boolean; overload;
implementation
uses
 Forms, Windows;
const
 nomeProjeto = 'Modularização';
procedure msgOk(texto: String);
begin
 Application.MessageBox(PWideChar(texto), nomeProjeto, MB_OK);
end;
function msgSN(texto: String; cancelar: boolean = false): smallint;
begin
 if cancelar then
 Result := Application.MessageBox (PWideChar(texto), nomeProjeto, MB_YESNOCANCEL)
 else
 Result := Application.MessageBox (PWideChar(texto), nomeProjeto, MB_YESNO)
end;
function msgSN(opcao: smallint) : boolean;
var
 msg: String;
begin
 case opcao of
 0: msg := 'Deseja Sair?';
 1: msg := 'Confirma a operação? ';
 end;
 Result := Application.MessageBox(PWideChar(msg), nomeProjeto, MB_YESNO) = IDYES;
end;
end.
06_Modulariza��o/Procedures/unModularizacaopas.dfm
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 845
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 OnCloseQuery = FormCloseQuery
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 845
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 object GroupBox6: TGroupBox
 Left = 257
 Top = 15
 Width = 586
 Height = 160
 Align = alClient
 Caption = 'Declara'#231#227'o GLOBAL - Param'#234'tro como CONSTANTE'
 TabOrder = 1
 object btnConsultar: TButton
 Left = 32
 Top = 48
 Width = 297
 Height = 25
 Caption = 'Consultar Data e Hora da Cria'#231#227'o de Arquivo'
 TabOrder = 0
 OnClick = btnConsultarClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 845
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 201
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtSite: TLabeledEdit
 Left = 11
 Top = 39
 Width = 174
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 203
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 end
 object btnAcessarCampus: TButton
 Left = 264
 Top = 94
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 OnClick = btnAcessarCampusClick
 end
 object GroupBox5: TGroupBox
 Left = 395
 Top = 15
 Width = 448
 Height = 300
 Align = alClient
 Caption = 'Par'#226'metro POR PREFER'#202'NCIA'
 TabOrder = 3
 object Label1: TLabel
 Left = 208
 Top = 144
 Width = 31
 Height = 13
 Caption = 'Label1'
 end
 object Panel1: TPanel
 Left = 2
 Top = 15
 Width = 444
 Height = 66
 Align = alTop
 BevelOuter = bvNone
 TabOrder = 0
 object edtBusca: TLabeledEdit
 Left = 16
 Top = 24
 Width = 250
 Height = 21
 EditLabel.Width = 152
 EditLabel.Height = 13
 EditLabel.Caption = 'Informe o que deseja pesquisar'
 TabOrder = 0
 end
 object btnBuscar: TButton
 Left = 272
 Top = 21
 Width = 169
 Height = 24
 Caption = 'Pesquisar no Google'
 TabOrder = 1
 OnClick = btnBuscarClick
 end
 end
 object WebBrowser: TWebBrowser
 Left = 2
 Top = 81
 Width = 444
 Height = 217
 Align = alClient
 TabOrder = 1
 ExplicitLeft = 6
 ExplicitTop = 80
 ControlData = {
 4C000000E42D00006D1600000000000000000000000000000000000000000000
 000000004C000000000000000000000001000000E0D057007335CF11AE690800
 2B2E126208000000000000004C0000000114020000000000C000000000000046
 8000000000000000000000000000000000000000000000000000000000000000
 00000000000000000100000000000000000000000000000000000000}
 end
 end
 end
 object opdArquivo: TOpenDialog
 Left = 680
 Top = 64
 end
end
06_Modulariza��o/Procedures/unModularizacaopas.pas
unit unModularizacaopas;
interface
uses
 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Winapi.UrlMon, Vcl.StdCtrls,
 Vcl.ExtCtrls, Vcl.OleCtrls, SHDocVw; {Winapi.UrlMon -> não vem padrão no Delphi}
type
 TfrmModularizacao = class(TForm)
 GroupBox1: TGroupBox;
 GroupBox2: TGroupBox;
 GroupBox3: TGroupBox;
 edtSite: TLabeledEdit;
 btnAcessar: TButton;
 GroupBox4: TGroupBox;
 edtURL: TLabeledEdit;
 edtDestino: TLabeledEdit;
 btnDownload: TButton;
 rdgCampus: TRadioGroup;
 btnAcessarCampus: TButton;
 GroupBox5: TGroupBox;
 Panel1: TPanel;
 edtBusca: TLabeledEdit;
 btnBuscar: TButton;
 WebBrowser: TWebBrowser;
 GroupBox6: TGroupBox;
 btnConsultar: TButton;
 opdArquivo: TOpenDialog;
 Label1: TLabel;
 procedure btnAcessarClick(Sender: TObject);
 procedure btnDownloadClick(Sender: TObject);
 procedure btnAcessarCampusClick(Sender: TObject);
 procedure btnBuscarClick(Sender: TObject);
 procedure btnConsultarClick(Sender: TObject);
 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
 private
 { Private declarations }
 //definir cabeçalho do procedimento
 //Declaração GLOBAL - Passagem de parâmetro POR VALOR
 procedure AcessarSiteUTF(campus: smallint);
 //Declaração GLOBAL - Passagem de parâmetro POR REFERÊNCIA
 procedure AjustaString(var busca: String);
 //Declaração GLOBAL - passagem de parâmetro COMO CONSTANTE
 function DataHoraArquivo(const Arquivo: String): TDateTime;
 public
 { Public declarations }
 end;
var
 frmModularizacao: TfrmModularizacao;
implementation
{$R *.dfm}
uses unBiblioteca;
procedure TfrmModularizacao.AcessarSiteUTF(campus: smallint);
const
 siteUTF = 'http://utfpr.edu.br';
begin
 case campus of
 0: HlinkNavigateString(nil, siteUTF + '/curitiba');
 1: HlinkNavigateString(nil, siteUTF + '/franciscobeltrao');
 2: HlinkNavigateString(nil, siteUTF + '/patobranco');
 end;
 campus := 50;
end;
procedure TfrmModularizacao.AjustaString(var busca: String);
begin
 //Substitui espaços em branco por '+' para todas as ocorrências
 busca := StringReplace(busca, ' ', '+', [rfReplaceAll]);
end;
procedure TfrmModularizacao.btnAcessarCampusClick(Sender: TObject);
var
 campus: smallint;
begin
 campus := rdgCampus.ItemIndex;
 AcessarSiteUTF(campus);
 ShowMessage(IntToStr(campus));
end;
procedure TfrmModularizacao.btnAcessarClick(Sender: TObject);
 //procedure declarada localmente (sem parametros)
 procedure AcessarSite;
 const
 http = 'http://';
 begin
 //localizou o prefixo;
 //pos (1º o q eu quero pesquisar, 2º onde eu quero pesquisar)
 if Pos(http, edtSite.Text) > 0 then
 HlinkNavigateString(nil, PWideChar(edtSite.Text))
 else
 HlinkNavigateString(nil, PWideChar(http + edtSite.Text));
 end;
begin
 //executa o procedimento local
 AcessarSite();
end;
procedure TfrmModularizacao.btnBuscarClick(Sender: TObject);
const
 urlConsultaGoogle = 'http://google.com.br/#q=';
var
 pesquisa: String;
begin
 pesquisa := edtBusca.Text;
 AjustaString(pesquisa);
 WebBrowser.Navigate(urlConsultaGoogle + pesquisa);
end;
procedure TfrmModularizacao.btnConsultarClick(Sender: TObject);
var
 filename, filedate: String;
begin
 if opdArquivo.Execute then // se o usuário selecionou algum arquivo
 begin
 filename := QuotedStr(ExtractFileName(opdArquivo.FileName));
 filedate := DateTimeToStr(DataHoraArquivo(opdArquivo.FileName));
 msgOk('O arquivo' + filename + ' foi criado em: ' + filedate);
// ShowMessage('O arquivo' + filename + ' foi criado em: ' + filedate);
 end;
end;
procedure TfrmModularizacao.btnDownloadClick(Sender: TObject);
 //function declarado localmente
 function DownloadFile: Boolean;
 var
 resultadoDownload: Integer;
 begin
 resultadoDownload := URLDownloadToFile(nil, PWideChar(edtURL.Text), PChar(edtDestino.Text), 0, nil);
 //Result := resultadoDownload
= 0;
 if (resultadoDownload = 0) then
 Result := true
 else
 Result := false;
 end;
begin
 //Executa a função
 if DownloadFile then
 ShowMessage('Download concluído com sucesso!')
 else
 ShowMessage('Não foi possível realizar o download!');
end;
function TfrmModularizacao.DataHoraArquivo(const Arquivo: String): TDateTime;
begin
 FileAge(arquivo, Result);
end;
procedure TfrmModularizacao.FormCloseQuery(Sender: TObject;
 var CanClose: Boolean);
begin
 CanClose := msgSN(0);
end;
end.
06_Modulariza��o/Procedures/Win32/Debug/logo.png
06_Modulariza��o/Procedures/Win32/Debug/prjModularizacao.exe
06_Modulariza��o/Procedures/Win32/Debug/unBiblioteca.dcu
06_Modulariza��o/Procedures/Win32/Debug/unModularizacaopas.dcu
06_Modulariza��o/Procedures/__history/prjModularizacao.dpr.~1~
program prjModularizacao;
uses
 Vcl.Forms,
 unModularizacaopas in 'unModularizacaopas.pas' {Form1};
{$R *.res}
begin
 Application.Initialize;
 Application.MainFormOnTaskbar := True;
 Application.CreateForm(TForm1, Form1);
 Application.Run;
end.
06_Modulariza��o/Procedures/__history/prjModularizacao.dpr.~2~
program prjModularizacao;
uses
 Vcl.Forms,
 unModularizacaopas in 'unModularizacaopas.pas' {frmModularizacao};
{$R *.res}
begin
 Application.Initialize;
 Application.MainFormOnTaskbar := True;
 Application.CreateForm(TfrmModularizacao, frmModularizacao);
 Application.Run;
end.
06_Modulariza��o/Procedures/__history/unBiblioteca.pas.~1~
unit unBiblioteca;
interface
implementation
end.
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~1~
object Form1: TForm1
 Left = 0
 Top = 0
 Caption = 'Form1'
 ClientHeight = 201
 ClientWidth = 447
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~2~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 402
 ClientWidth = 562
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 562
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 ExplicitHeight = 137
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 562
 Height = 225
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitTop = 105
 ExplicitHeight = 297
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 208
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 ExplicitLeft = 3
 ExplicitTop = 14
 ExplicitHeight = 280
 object edtSite: TLabeledEdit
 Left = 11
 Top = 40
 Width = 214
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~3~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 694
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 694
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 ExplicitWidth = 562
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 ExplicitHeight = 137
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 694
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitTop = 105
 ExplicitWidth = 562
 ExplicitHeight = 297
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 ExplicitLeft = 3
 ExplicitTop = 14
 ExplicitHeight = 280
 object edtSite: TLabeledEdit
 Left = 11
 Top = 40
 Width = 214
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 257
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 end
 object btnAcessarCampos: TButton
 Left = 336
 Top = 64
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 end
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~4~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 694
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 694
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 ExplicitWidth = 562
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 ExplicitHeight = 137
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 694
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitTop = 105
 ExplicitWidth = 562
 ExplicitHeight = 297
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 ExplicitLeft = 3
 ExplicitTop = 14
 ExplicitHeight = 280
 object edtSite: TLabeledEdit
 Left = 11
 Top = 40
 Width = 214
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 257
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 end
 object btnAcessarCampus: TButton
 Left = 336
 Top = 64
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 OnClick = btnAcessarCampusClick
 end
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~5~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 774
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 774
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 ExplicitWidth = 694
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 774
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitWidth = 694
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtSite: TLabeledEdit
 Left = 11
 Top = 40
 Width = 214
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 257
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 end
 object btnAcessarCampus: TButton
 Left = 336
 Top = 64
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 OnClick = btnAcessarCampusClick
 end
 object GroupBox5: TGroupBox
 Left = 449
 Top = 15
 Width = 323
 Height = 300
 Align = alClient
 Caption = 'Par'#226'metro POR PREFER'#202'NCIA'
 TabOrder = 3
 ExplicitLeft = 256
 ExplicitTop = 104
 ExplicitWidth = 185
 ExplicitHeight = 105
 object Panel1: TPanel
 Left = 2
 Top = 15
 Width = 319
 Height = 41
 Align = alTop
 BevelOuter = bvNone
 TabOrder = 0
 ExplicitLeft = 72
 ExplicitTop = 128
 ExplicitWidth = 185
 end
 end
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~6~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 845
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 845
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 ExplicitWidth = 694
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height
= 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 845
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitWidth = 694
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 201
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtSite: TLabeledEdit
 Left = 11
 Top = 39
 Width = 174
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 203
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 ExplicitLeft = 257
 end
 object btnAcessarCampus: TButton
 Left = 264
 Top = 94
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 OnClick = btnAcessarCampusClick
 end
 object GroupBox5: TGroupBox
 Left = 395
 Top = 15
 Width = 448
 Height = 300
 Align = alClient
 Caption = 'Par'#226'metro POR PREFER'#202'NCIA'
 TabOrder = 3
 ExplicitLeft = 256
 ExplicitTop = 104
 ExplicitWidth = 185
 ExplicitHeight = 105
 object Panel1: TPanel
 Left = 2
 Top = 15
 Width = 444
 Height = 66
 Align = alTop
 BevelOuter = bvNone
 TabOrder = 0
 object edtBusca: TLabeledEdit
 Left = 16
 Top = 24
 Width = 250
 Height = 21
 EditLabel.Width = 152
 EditLabel.Height = 13
 EditLabel.Caption = 'Informe o que deseja pesquisar'
 TabOrder = 0
 end
 object btnBuscar: TButton
 Left = 272
 Top = 21
 Width = 169
 Height = 24
 Caption = 'Pesquisar no Google'
 TabOrder = 1
 end
 end
 object WebBrowser: TWebBrowser
 Left = 2
 Top = 81
 Width = 444
 Height = 217
 Align = alClient
 TabOrder = 1
 ExplicitLeft = 32
 ExplicitTop = 110
 ExplicitWidth = 300
 ExplicitHeight = 150
 ControlData = {
 4C000000E42D00006D1600000000000000000000000000000000000000000000
 000000004C000000000000000000000001000000E0D057007335CF11AE690800
 2B2E126208000000000000004C0000000114020000000000C000000000000046
 8000000000000000000000000000000000000000000000000000000000000000
 00000000000000000100000000000000000000000000000000000000}
 end
 end
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~7~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 845
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 OnCloseQuery = FormCloseQuery
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 845
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 ExplicitWidth = 694
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 object GroupBox6: TGroupBox
 Left = 257
 Top = 15
 Width = 586
 Height = 160
 Align = alClient
 Caption = 'Declara'#231#227'o GLOBAL - Param'#234'tro como CONSTANTE'
 TabOrder = 1
 ExplicitLeft = 328
 ExplicitTop = 40
 ExplicitWidth = 185
 ExplicitHeight = 105
 object btnConsultar: TButton
 Left = 32
 Top = 48
 Width = 297
 Height = 25
 Caption = 'Consultar Data e Hora da Cria'#231#227'o de Arquivo'
 TabOrder = 0
 OnClick = btnConsultarClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 845
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitLeft = -8
 ExplicitTop = 97
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 201
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtSite: TLabeledEdit
 Left = 11
 Top = 39
 Width = 174
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 203
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 ExplicitLeft = 257
 end
 object btnAcessarCampus: TButton
 Left = 264
 Top = 94
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 OnClick = btnAcessarCampusClick
 end
 object GroupBox5: TGroupBox
 Left = 395
 Top = 15
 Width = 448
 Height = 300
 Align = alClient
 Caption = 'Par'#226'metro POR PREFER'#202'NCIA'
 TabOrder = 3
 ExplicitLeft = 256
 ExplicitTop = 104
 ExplicitWidth = 185
 ExplicitHeight = 105
 object Panel1: TPanel
 Left = 2
 Top = 15
 Width = 444
 Height = 66
Align = alTop
 BevelOuter = bvNone
 TabOrder = 0
 object edtBusca: TLabeledEdit
 Left = 16
 Top = 24
 Width = 250
 Height = 21
 EditLabel.Width = 152
 EditLabel.Height = 13
 EditLabel.Caption = 'Informe o que deseja pesquisar'
 TabOrder = 0
 end
 object btnBuscar: TButton
 Left = 272
 Top = 21
 Width = 169
 Height = 24
 Caption = 'Pesquisar no Google'
 TabOrder = 1
 OnClick = btnBuscarClick
 end
 end
 object WebBrowser: TWebBrowser
 Left = 2
 Top = 81
 Width = 444
 Height = 217
 Align = alClient
 TabOrder = 1
 ExplicitLeft = 32
 ExplicitTop = 110
 ExplicitWidth = 300
 ExplicitHeight = 150
 ControlData = {
 4C000000E42D00006D1600000000000000000000000000000000000000000000
 000000004C000000000000000000000001000000E0D057007335CF11AE690800
 2B2E126208000000000000004C0000000114020000000000C000000000000046
 8000000000000000000000000000000000000000000000000000000000000000
 00000000000000000100000000000000000000000000000000000000}
 end
 end
 end
 object opdArquivo: TOpenDialog
 Left = 680
 Top = 64
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.dfm.~8~
object frmModularizacao: TfrmModularizacao
 Left = 0
 Top = 0
 ActiveControl = edtSite
 Caption = 'Procedures, Functions e Modulariza'#231#227'o'
 ClientHeight = 494
 ClientWidth = 845
 Color = clBtnFace
 Font.Charset = DEFAULT_CHARSET
 Font.Color = clWindowText
 Font.Height = -11
 Font.Name = 'Tahoma'
 Font.Style = []
 OldCreateOrder = False
 OnCloseQuery = FormCloseQuery
 PixelsPerInch = 96
 TextHeight = 13
 object GroupBox1: TGroupBox
 Left = 0
 Top = 0
 Width = 845
 Height = 177
 Align = alTop
 Caption = 'FUNCTION'
 TabOrder = 0
 ExplicitWidth = 694
 object GroupBox4: TGroupBox
 Left = 2
 Top = 15
 Width = 255
 Height = 160
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtURL: TLabeledEdit
 Left = 3
 Top = 29
 Width = 222
 Height = 21
 AutoSelect = False
 EditLabel.Width = 19
 EditLabel.Height = 13
 EditLabel.Caption = 'URL'
 TabOrder = 0
 Text = 'http://www.utfpr.edu.br/logo.png'
 end
 object edtDestino: TLabeledEdit
 Left = 3
 Top = 72
 Width = 222
 Height = 21
 EditLabel.Width = 36
 EditLabel.Height = 13
 EditLabel.Caption = 'Destino'
 TabOrder = 1
 Text = 'logo.png'
 end
 object btnDownload: TButton
 Left = 72
 Top = 112
 Width = 75
 Height = 25
 Caption = 'Download'
 TabOrder = 2
 OnClick = btnDownloadClick
 end
 end
 object GroupBox6: TGroupBox
 Left = 257
 Top = 15
 Width = 586
 Height = 160
 Align = alClient
 Caption = 'Declara'#231#227'o GLOBAL - Param'#234'tro como CONSTANTE'
 TabOrder = 1
 ExplicitLeft = 328
 ExplicitTop = 40
 ExplicitWidth = 185
 ExplicitHeight = 105
 object btnConsultar: TButton
 Left = 32
 Top = 48
 Width = 297
 Height = 25
 Caption = 'Consultar Data e Hora da Cria'#231#227'o de Arquivo'
 TabOrder = 0
 OnClick = btnConsultarClick
 end
 end
 end
 object GroupBox2: TGroupBox
 Left = 0
 Top = 177
 Width = 845
 Height = 317
 Align = alClient
 Caption = 'PROCEDURE'
 TabOrder = 1
 ExplicitLeft = -8
 ExplicitTop = 97
 object GroupBox3: TGroupBox
 Left = 2
 Top = 15
 Width = 201
 Height = 300
 Align = alLeft
 Caption = 'Declara'#231#227'o LOCAL - Sem Parametros'
 TabOrder = 0
 object edtSite: TLabeledEdit
 Left = 11
 Top = 39
 Width = 174
 Height = 21
 EditLabel.Width = 22
 EditLabel.Height = 13
 EditLabel.Caption = 'Site:'
 TabOrder = 0
 Text = 'http://utfpr.edu.br'
 end
 object btnAcessar: TButton
 Left = 11
 Top = 80
 Width = 75
 Height = 25
 Caption = 'Acessar'
 TabOrder = 1
 OnClick = btnAcessarClick
 end
 end
 object rdgCampus: TRadioGroup
 Left = 203
 Top = 15
 Width = 192
 Height = 300
 Align = alLeft
 Caption = 'Par'#226'metro POR VALOR'
 ItemIndex = 2
 Items.Strings = (
 'Curitiba'
 'Francisco Beltr'#227'o'
 'Pato Branco')
 TabOrder = 1
 ExplicitLeft = 257
 end
 object btnAcessarCampus: TButton
 Left = 264
 Top = 94
 Width = 107
 Height = 25
 Caption = 'Acessar C'#226'mpus'
 TabOrder = 2
 OnClick = btnAcessarCampusClick
 end
 object GroupBox5: TGroupBox
 Left = 395
 Top = 15
 Width = 448
 Height = 300
 Align = alClient
 Caption = 'Par'#226'metro POR PREFER'#202'NCIA'
 TabOrder = 3
 ExplicitLeft = 256
 ExplicitTop = 104
 ExplicitWidth = 185
 ExplicitHeight = 105
 object Panel1: TPanel
 Left = 2
 Top = 15
 Width = 444
 Height = 66
 Align = alTop
 BevelOuter = bvNone
 TabOrder = 0
 object edtBusca: TLabeledEdit
 Left = 16
 Top = 24
 Width = 250
 Height = 21
 EditLabel.Width = 152
 EditLabel.Height = 13
 EditLabel.Caption = 'Informe o que deseja pesquisar'
 TabOrder = 0
 end
 object btnBuscar: TButton
 Left = 272
 Top = 21
 Width = 169
 Height = 24
 Caption = 'Pesquisar no Google'
 TabOrder = 1
 OnClick = btnBuscarClick
 end
 end
 object WebBrowser: TWebBrowser
 Left = 2
 Top = 81
 Width = 444
 Height = 217
 Align = alClient
 TabOrder = 1
 ExplicitLeft = 32
 ExplicitTop = 110
 ExplicitWidth = 300
 ExplicitHeight = 150
 ControlData = {
 4C000000E42D00006D1600000000000000000000000000000000000000000000
 000000004C000000000000000000000001000000E0D057007335CF11AE690800
 2B2E126208000000000000004C0000000114020000000000C000000000000046
 8000000000000000000000000000000000000000000000000000000000000000
 00000000000000000100000000000000000000000000000000000000}
 end
 end
 end
 object opdArquivo: TOpenDialog
 Left = 680
 Top = 64
 end
end
06_Modulariza��o/Procedures/__history/unModularizacaopas.pas.~1~
unit unModularizacaopas;
interface
uses
 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
 Vcl.Controls, Vcl.Forms, Vcl.Dialogs;
type
 TForm1 = class(TForm)
 private
 { Private declarations }
 public
 { Public declarations }
 end;
var
 Form1: TForm1;
implementation
{$R *.dfm}
end.
06_Modulariza��o/Procedures/__history/unModularizacaopas.pas.~2~
unit unModularizacaopas;
interface
uses
 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Winapi.UrlMon, Vcl.StdCtrls,
 Vcl.ExtCtrls; {Winapi.UrlMon -> não vem padrão no Delphi}
type
 TfrmModularizacao = class(TForm)
 GroupBox1: TGroupBox;
 GroupBox2: TGroupBox;
 GroupBox3: TGroupBox;
 edtSite: TLabeledEdit;
 btnAcessar: TButton;
 GroupBox4: TGroupBox;
 edtURL: TLabeledEdit;
edtDestino: TLabeledEdit;
 btnDownload: TButton;
 procedure btnAcessarClick(Sender: TObject);
 procedure btnDownloadClick(Sender: TObject);
 private
 { Private declarations }
 public
 { Public declarations }
 end;
var
 frmModularizacao: TfrmModularizacao;
implementation
{$R *.dfm}
procedure TfrmModularizacao.btnAcessarClick(Sender: TObject);
 //procedure declarada localmente (sem parametros)
 procedure AcessarSite;
 const
 http = 'http://';
 begin
 //localizou o prefixo;
 //pos (1º o q eu quero pesquisar, 2º onde eu quero pesquisar)
 if Pos(http, edtSite.Text) > 0 then
 HlinkNavigateString(nil, PWideChar(edtSite.Text))
 else
 HlinkNavigateString(nil, PWideChar(http + edtSite.Text));
 end;
begin
 //executa o procedimento local
 AcessarSite();
end;
procedure TfrmModularizacao.btnDownloadClick(Sender: TObject);
 //function declarado localmente
 function DownloadFile: Boolean;
 var
 resultadoDownload: Integer;
 begin
 resultadoDownload := URLDownloadToFile(nil, PWideChar(edtURL.Text), PChar(edtDestino.Text), 0, nil);
 //Result := resultadoDownload = 0;
 if (resultadoDownload = 0) then
 Result := true
 else
 Result := false;
 end;
begin
 //Executa a função
 if DownloadFile then
 ShowMessage('Download concluído com sucesso!')
 else
 ShowMessage('Não foi possível realizar o download!');
end;
end.
06_Modulariza��o/Procedures/__history/unModularizacaopas.pas.~3~
unit unModularizacaopas;
interface
uses
 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Winapi.UrlMon, Vcl.StdCtrls,
 Vcl.ExtCtrls; {Winapi.UrlMon -> não vem padrão no Delphi}
type
 TfrmModularizacao = class(TForm)
 GroupBox1: TGroupBox;
 GroupBox2: TGroupBox;
 GroupBox3: TGroupBox;
 edtSite: TLabeledEdit;
 btnAcessar: TButton;
 GroupBox4: TGroupBox;
 edtURL: TLabeledEdit;
 edtDestino: TLabeledEdit;
 btnDownload: TButton;
 rdgCampus: TRadioGroup;
 btnAcessarCampos: TButton;
 procedure btnAcessarClick(Sender: TObject);
 procedure btnDownloadClick(Sender: TObject);
 private
 { Private declarations }
 public
 { Public declarations }
 end;
var
 frmModularizacao: TfrmModularizacao;
implementation
{$R *.dfm}
procedure TfrmModularizacao.btnAcessarClick(Sender: TObject);
 //procedure declarada localmente (sem parametros)
 procedure AcessarSite;
 const
 http = 'http://';
 begin
 //localizou o prefixo;
 //pos (1º o q eu quero pesquisar, 2º onde eu quero pesquisar)
 if Pos(http, edtSite.Text) > 0 then
 HlinkNavigateString(nil, PWideChar(edtSite.Text))
 else
 HlinkNavigateString(nil, PWideChar(http + edtSite.Text));
 end;
begin
 //executa o procedimento local
 AcessarSite();
end;
procedure TfrmModularizacao.btnDownloadClick(Sender: TObject);
 //function declarado localmente
 function DownloadFile: Boolean;
 var
 resultadoDownload: Integer;
 begin
 resultadoDownload := URLDownloadToFile(nil, PWideChar(edtURL.Text), PChar(edtDestino.Text), 0, nil);
 //Result := resultadoDownload = 0;
 if (resultadoDownload = 0) then
 Result := true
 else
 Result := false;
 end;
begin
 //Executa a função
 if DownloadFile then
 ShowMessage('Download concluído com sucesso!')
 else
 ShowMessage('Não foi possível realizar o download!');
end;
end.
06_Modulariza��o/Procedures/__history/unModularizacaopas.pas.~4~
unit unModularizacaopas;
interface
uses
 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Winapi.UrlMon, Vcl.StdCtrls,
 Vcl.ExtCtrls; {Winapi.UrlMon -> não vem padrão no Delphi}
type
 TfrmModularizacao = class(TForm)
 GroupBox1: TGroupBox;
 GroupBox2: TGroupBox;
 GroupBox3: TGroupBox;
 edtSite: TLabeledEdit;
 btnAcessar: TButton;
 GroupBox4: TGroupBox;
 edtURL: TLabeledEdit;
 edtDestino: TLabeledEdit;
 btnDownload: TButton;
 rdgCampus: TRadioGroup;
 btnAcessarCampus: TButton;
 procedure btnAcessarClick(Sender: TObject);
 procedure btnDownloadClick(Sender: TObject);
 procedure btnAcessarCampusClick(Sender: TObject);
 private
 { Private declarations }
 //definir cabeçalho do procedimento
 procedure AcessarSiteUTF(var campus: smallint);
 public
 { Public declarations }
 end;
var
 frmModularizacao: TfrmModularizacao;
implementation
{$R *.dfm}
procedure TfrmModularizacao.AcessarSiteUTF(var campus: smallint);
const
 siteUTF = 'http://utfpr.edu.br';
begin
 case campus of
 0: HlinkNavigateString(nil, siteUTF + '/curitiba');
 1: HlinkNavigateString(nil, siteUTF + '/franciscobeltrao');
 2: HlinkNavigateString(nil, siteUTF + '/patobranco');
 end;
 campus := 50;
end;
procedure TfrmModularizacao.btnAcessarCampusClick(Sender: TObject);
var
 campus: smallint;
begin
 campus := rdgCampus.ItemIndex;
 AcessarSiteUTF(campus);
 ShowMessage(IntToStr(campus));
end;
procedure TfrmModularizacao.btnAcessarClick(Sender: TObject);
 //procedure declarada localmente (sem parametros)
 procedure AcessarSite;
 const
 http = 'http://';
 begin
 //localizou o prefixo;
 //pos (1º o q eu quero pesquisar, 2º onde eu quero pesquisar)
 if Pos(http, edtSite.Text) > 0 then
 HlinkNavigateString(nil, PWideChar(edtSite.Text))
 else
 HlinkNavigateString(nil, PWideChar(http + edtSite.Text));
 end;
begin
 //executa o procedimento local
 AcessarSite();
end;
procedure TfrmModularizacao.btnDownloadClick(Sender: TObject);
 //function declarado localmente
 function DownloadFile: Boolean;
 var
 resultadoDownload: Integer;
 begin
 resultadoDownload := URLDownloadToFile(nil, PWideChar(edtURL.Text), PChar(edtDestino.Text), 0, nil);
 //Result := resultadoDownload = 0;
 if (resultadoDownload = 0) then
 Result := true
 else
 Result := false;
 end;
begin
 //Executa a função
 if DownloadFile then
 ShowMessage('Download concluído com sucesso!')
 else
 ShowMessage('Não foi possível realizar o download!');
end;
end.
06_Modulariza��o/Procedures/__history/unModularizacaopas.pas.~5~
unit unModularizacaopas;
interface
uses
 Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
 Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Winapi.UrlMon, Vcl.StdCtrls,
 Vcl.ExtCtrls; {Winapi.UrlMon -> não vem padrão no Delphi}
type
 TfrmModularizacao = class(TForm)
 GroupBox1: TGroupBox;
 GroupBox2: TGroupBox;
 GroupBox3: TGroupBox;
 edtSite: TLabeledEdit;
 btnAcessar: TButton;
 GroupBox4: TGroupBox;
 edtURL: TLabeledEdit;
 edtDestino: TLabeledEdit;
 btnDownload: TButton;
 rdgCampus: TRadioGroup;
 btnAcessarCampus: TButton;
 GroupBox5: TGroupBox;
 Panel1: TPanel;
 procedure btnAcessarClick(Sender: TObject);
 procedure btnDownloadClick(Sender: TObject);
 procedure btnAcessarCampusClick(Sender: TObject);
 private
 { Private declarations }
 //definir cabeçalho do procedimento
 procedure AcessarSiteUTF(var campus: smallint);
 public
 { Public declarations }
 end;
var
 frmModularizacao: TfrmModularizacao;
implementation
{$R *.dfm}
procedure TfrmModularizacao.AcessarSiteUTF(var campus: smallint);
const
 siteUTF = 'http://utfpr.edu.br';
begin
 case campus of
 0: HlinkNavigateString(nil, siteUTF + '/curitiba');
 1: HlinkNavigateString(nil, siteUTF + '/franciscobeltrao');
 2: HlinkNavigateString(nil, siteUTF + '/patobranco');
 end;
 campus := 50;
end;
procedure TfrmModularizacao.btnAcessarCampusClick(Sender:

Teste o Premium para desbloquear

Aproveite todos os benefícios por 3 dias sem pagar! 😉
Já tem cadastro?

Outros materiais