-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
All remaining chapters uploaded and tested in 10 Seattle.
- Loading branch information
1 parent
10200d7
commit 0b30d04
Showing
287 changed files
with
39,181 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
program Adapter_Demo; | ||
|
||
uses | ||
Forms, | ||
mainform in 'mainform.pas' {FormAdapter}, | ||
adapter_intf in 'adapter_intf.pas'; | ||
|
||
{$R *.RES} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.CreateForm(TFormAdapter, FormAdapter); | ||
Application.Run; | ||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<ProjectGuid>{AF8A262A-057F-4526-90E4-846B301BA51C}</ProjectGuid> | ||
<MainSource>Adapter_Demo.dpr</MainSource> | ||
<Base>True</Base> | ||
<Config Condition="'$(Config)'==''">Debug</Config> | ||
<TargetedPlatforms>1</TargetedPlatforms> | ||
<AppType>Application</AppType> | ||
<FrameworkType>VCL</FrameworkType> | ||
<ProjectVersion>18.1</ProjectVersion> | ||
<Platform Condition="'$(Platform)'==''">Win32</Platform> | ||
</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="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''"> | ||
<Base_Win64>true</Base_Win64> | ||
<CfgParent>Base</CfgParent> | ||
<Base>true</Base> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''"> | ||
<Cfg_1>true</Cfg_1> | ||
<CfgParent>Base</CfgParent> | ||
<Base>true</Base> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Config)'=='Debug' 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)'!=''"> | ||
<SanitizedProjectName>Adapter_Demo</SanitizedProjectName> | ||
<DCC_K>false</DCC_K> | ||
<VerInfo_Locale>1033</VerInfo_Locale> | ||
<DCC_S>false</DCC_S> | ||
<DCC_N>false</DCC_N> | ||
<DCC_E>false</DCC_E> | ||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;CFBundleName=</VerInfo_Keys> | ||
<DCC_Namespace>Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace> | ||
<DCC_F>false</DCC_F> | ||
<DCC_ImageBase>00400000</DCC_ImageBase> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Base_Win32)'!=''"> | ||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> | ||
<DCC_Namespace>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_Locale>1033</VerInfo_Locale> | ||
<Icon_MainIcon>Adapter_Demo_Icon.ico</Icon_MainIcon> | ||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> | ||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Base_Win64)'!=''"> | ||
<Icon_MainIcon>Adapter_Demo_Icon.ico</Icon_MainIcon> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Cfg_1)'!=''"> | ||
<DCC_DebugInformation>0</DCC_DebugInformation> | ||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo> | ||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define> | ||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Cfg_2)'!=''"> | ||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames> | ||
<DCC_Optimize>false</DCC_Optimize> | ||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''"> | ||
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput> | ||
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon> | ||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo> | ||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes> | ||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys> | ||
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<DelphiCompile Include="$(MainSource)"> | ||
<MainSource>MainSource</MainSource> | ||
</DelphiCompile> | ||
<DCCReference Include="mainform.pas"> | ||
<Form>FormAdapter</Form> | ||
</DCCReference> | ||
<DCCReference Include="adapter_intf.pas"/> | ||
<BuildConfiguration Include="Debug"> | ||
<Key>Cfg_2</Key> | ||
<CfgParent>Base</CfgParent> | ||
</BuildConfiguration> | ||
<BuildConfiguration Include="Base"> | ||
<Key>Base</Key> | ||
</BuildConfiguration> | ||
<BuildConfiguration Include="Release"> | ||
<Key>Cfg_1</Key> | ||
<CfgParent>Base</CfgParent> | ||
</BuildConfiguration> | ||
</ItemGroup> | ||
<ProjectExtensions> | ||
<Borland.Personality>Delphi.Personality.12</Borland.Personality> | ||
<Borland.ProjectType/> | ||
<BorlandProject> | ||
<Delphi.Personality> | ||
<Source> | ||
<Source Name="MainSource">Adapter_Demo.dpr</Source> | ||
</Source> | ||
<Excluded_Packages> | ||
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k230.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages> | ||
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp230.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages> | ||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k230.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages> | ||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp230.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages> | ||
</Excluded_Packages> | ||
</Delphi.Personality> | ||
<Platforms> | ||
<Platform value="Win32">True</Platform> | ||
<Platform value="Win64">False</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')"/> | ||
</Project> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
unit IEdit; | ||
|
||
interface | ||
|
||
uses | ||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, | ||
StdCtrls, adapter_intf; | ||
|
||
type | ||
TEdit = class(StdCtrls.TEdit, ITextAndValue) | ||
private | ||
{ Private declarations } | ||
protected | ||
procedure SetText(const Value: string); | ||
procedure SetValue(const Value: Integer); | ||
function GetText: string; | ||
function GetValue: Integer; | ||
public | ||
{ Public declarations } | ||
published | ||
{ Published declarations } | ||
end; | ||
|
||
implementation | ||
|
||
{ TIEdit } | ||
|
||
function TEdit.GetText: string; | ||
begin | ||
Result := Text; | ||
end; | ||
|
||
function TEdit.GetValue: Integer; | ||
begin | ||
Result := StrToIntDef (Text, 0); | ||
end; | ||
|
||
procedure TEdit.SetText(const Value: string); | ||
begin | ||
Text := Value; | ||
end; | ||
|
||
procedure TEdit.SetValue(const Value: Integer); | ||
begin | ||
Text := IntToStr (Value); | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
unit ILabel; | ||
|
||
interface | ||
|
||
uses | ||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, | ||
StdCtrls, adapter_intf; | ||
|
||
type | ||
TLabel = class(StdCtrls.TLabel, ITextAndValue) | ||
private | ||
{ Private declarations } | ||
protected | ||
procedure SetText(const Value: string); | ||
procedure SetValue(const Value: Integer); | ||
function GetText: string; | ||
function GetValue: Integer; | ||
public | ||
{ Public declarations } | ||
published | ||
{ Published declarations } | ||
end; | ||
|
||
implementation | ||
|
||
{ TILabel } | ||
|
||
function TLabel.GetText: string; | ||
begin | ||
Result := Caption; | ||
end; | ||
|
||
function TLabel.GetValue: Integer; | ||
begin | ||
Result := StrToIntDef (Caption, 0); | ||
end; | ||
|
||
procedure TLabel.SetText(const Value: string); | ||
begin | ||
Caption := Value; | ||
end; | ||
|
||
procedure TLabel.SetValue(const Value: Integer); | ||
begin | ||
Caption := IntToStr (Value); | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
unit IProgressBar; | ||
|
||
interface | ||
|
||
uses | ||
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, | ||
ComCtrls, adapter_intf; | ||
|
||
type | ||
TProgressBar = class(ComCtrls.TProgressBar, ITextAndValue) | ||
private | ||
{ Private declarations } | ||
protected | ||
procedure SetText(const Value: string); | ||
procedure SetValue(const Value: Integer); | ||
function GetText: string; | ||
function GetValue: Integer; | ||
public | ||
{ Public declarations } | ||
published | ||
{ Published declarations } | ||
end; | ||
|
||
implementation | ||
|
||
{ TIProgressBar } | ||
|
||
function TProgressBar.GetText: string; | ||
begin | ||
Result := IntToStr (Position); | ||
end; | ||
|
||
function TProgressBar.GetValue: Integer; | ||
begin | ||
Result := Position; | ||
end; | ||
|
||
procedure TProgressBar.SetText(const Value: string); | ||
begin | ||
Position := StrToIntDef (Value, 0); | ||
end; | ||
|
||
procedure TProgressBar.SetValue(const Value: Integer); | ||
begin | ||
Position := Value; | ||
end; | ||
|
||
end. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
unit adapter_intf; | ||
|
||
interface | ||
|
||
type | ||
ITextAndValue = interface | ||
['{51018CF1-0D3C-488E-81B0-0470B09013EB}'] | ||
procedure SetText(const Value: string); | ||
procedure SetValue(const Value: Integer); | ||
function GetText: string; | ||
function GetValue: Integer; | ||
property Text: string read GetText write SetText; | ||
property Value: Integer read GetValue write SetValue; | ||
end; | ||
|
||
implementation | ||
|
||
end. |
Oops, something went wrong.