├── 05 ├── FileAccess │ ├── SomeText.txt │ ├── FileAccess.res │ ├── FileAccessThemed.res │ ├── FileAccess.dpr │ ├── FileAccessThemed.dpr │ ├── FileAccessCopy.dpr │ └── FileAccessForm.dfm ├── DWrite │ ├── DWrite.res │ ├── DWrite.dpr │ └── DWrite_MainForm.dfm ├── D2DIntro │ ├── D2DIntro.res │ ├── D2DIntro.dpr │ └── D2DIntro_MainForm.dfm ├── TiffViewer │ ├── einstein.tif │ ├── TiffViewer.res │ ├── TiffViewer.dpr │ └── TiffViewer_MainForm.dfm ├── Win7Taskbar │ ├── Win7Taskbar.res │ ├── Win7Taskbar.dpr │ └── TaskbarSupportUnit.pas ├── D2DCanvasMix │ ├── D2DCanvasMix.res │ ├── D2DCanvasMix.dpr │ ├── D2DCanvasMix_MainForm.dfm │ └── D2DCanvasMix_MainForm.pas ├── D2DGradients │ ├── D2DGradients.res │ ├── D2DGradients.dpr │ └── D2DGradientsForm.dfm ├── GetOSVersion │ ├── GetOSVersion.res │ ├── GetOSVersion_Icon.ico │ ├── GetOSVersion.dpr │ ├── GetOSVersionForm.dfm │ └── GetOSVersionForm.pas ├── D2DLinesSpeed │ ├── D2DLinesSpeed.res │ ├── D2DLinesSpeed.dpr │ ├── D2DLinesSpeed_Direct2DOnly.dfm │ └── D2DLinesSpeed_MainForm.dfm └── Win7Libraries │ ├── Win7Libraries.res │ ├── Win7Libraries.dpr │ └── Win7Libraries_MainForm.dfm ├── README.md ├── 08 ├── Rest1 │ ├── Rest1.res │ ├── customer.cds │ ├── Rest1Client.res │ ├── Rest1Client.dpr │ ├── Rest1_MainForm.dfm │ ├── Rest1_MainForm.pas │ ├── Rest1.dpr │ ├── Rest1_WebModule.dfm │ ├── TrivialXmlWriter.pas │ └── Rest1Group.groupproj ├── YahooMap │ ├── temp.png │ ├── YahooMap.res │ ├── customer.cds │ └── YahooMap.dpr ├── LargeXml │ ├── LargeXml.res │ ├── LargeXml.dpr │ └── saxphilo.pas ├── RssClient │ ├── RssClient.res │ ├── RssClient.dpr │ └── RssClientForm.dfm ├── GeoLocation │ ├── customer.cds │ ├── GeoLocation.res │ └── GeoLocation.dpr ├── DataRestServer │ ├── customer.cds │ ├── DataRestServer.res │ ├── DataRestServer_ServerClass.dfm │ ├── DataRestServer_MainForm.dfm │ ├── DataRestServer_MainForm.pas │ ├── DataRestServer.dpr │ ├── DataRestServer_WebModule.dfm │ ├── jRestClientSimple.html │ ├── DataRestServer_ServerClass.pas │ ├── DataRestServer_WebModule.pas │ └── jRestClient.html ├── TranslateJson │ ├── Translate.res │ ├── Translate.dpr │ └── TranslateMainForm.pas ├── ObjectsRestServer │ ├── ObjectsRestServer.res │ ├── ObjectsRestServer_MainForm.dfm │ ├── ObjectsRestServer_MainForm.pas │ ├── ObjectsRestServer.dpr │ ├── ObjectsRestServer_Class.dfm │ ├── ObjectsRestServer_WebModule.dfm │ └── ObjectsRestServer_WebModule.pas └── FirstSimpleRestServer │ ├── FirstRestClient.res │ ├── Fsrs_ServerClass.dfm │ ├── FirstSimpleRestServer.res │ ├── FirstRestClient.dpr │ ├── Fsrs_MainForm.dfm │ ├── Fsrs_MainForm.pas │ ├── FirstSimpleRestServer.dpr │ ├── Fsrs_ServerClass.pas │ ├── Fsrs_DataModule.dfm │ ├── jRestClient.html │ └── FirstRestClient_MainForm.dfm ├── 02 ├── MoveIP │ ├── MoveIP.res │ ├── MoveIP.dpr │ ├── MoveIPMainForm.dfm │ └── MoveIPMainForm.pas ├── DebugVisual │ ├── DebugVisual.res │ ├── DebugVisualMainForm.pas │ ├── DebugVisual.dpr │ └── DebugVisualMainForm.dfm ├── NamedThreads │ ├── NamedThreads.res │ ├── NamedThreads.dpr │ ├── MyThreadClass.pas │ ├── NamedThreadsMainForm.dfm │ └── NamedThreadsMainForm.pas └── CustomVisualizers │ ├── CustomVisualizers.res │ └── CustomVisualizers.dpk ├── 03 ├── RttiAccess │ ├── RttiAccess_project.tvsconfig │ ├── RttiAccess.res │ ├── RttiAccess.dpr │ └── RttiAccessMainForm.dfm ├── RttiIntro │ ├── RttiIntro_project.tvsconfig │ ├── RttiIntro.res │ ├── RttiIntro.dpr │ ├── RttiIntro_MainForm.dfm │ └── RttiIntro_MainForm.pas ├── MiniPack │ ├── MiniPack.res │ ├── MiniPack.dpr │ ├── MiniForm.dfm │ └── MiniForm.pas ├── MiniSize │ ├── MiniSize.res │ └── MiniSize.dpr ├── TypesList │ ├── TypesList.res │ ├── TypesList.dpr │ ├── TypesListMainForm.dfm │ └── TypeInfoForm.dfm ├── RttiAttrib │ ├── RttiAttrib.res │ ├── RttiAttrib.dpr │ └── RttiAttribMainForm.dfm ├── TValueTest │ ├── TValueTest.res │ ├── TValueTest.dpr │ ├── TValueTestMainForm.dfm │ └── TValueTestMainForm.pas ├── XmlPersist │ ├── XmlPersist.res │ ├── XmlPersist.dpr │ ├── XmlPersistRtti_Classes.pas │ ├── XmlPersistPublish_Classes.pas │ ├── XmlPersistAttrib_Classes.pas │ └── XmlPersist_MainForm.dfm ├── ExeSizeTest │ ├── ExeSizeTest.res │ ├── ExeSizeTest.dpr │ ├── ExeSizeTestMainForm.dfm │ ├── ExeSizeTestMainForm.pas │ └── Utf8Text.txt ├── XmlPersistPublish │ ├── XmlPersist.res │ ├── XmlPersistPublish.res │ ├── XmlPersist.dpr │ ├── XmlPersistPublish.dpr │ ├── XmlPersistPublish_MainForm.dfm │ ├── XmlPersistPublish_Classes.pas │ └── XmlPersistPublish_MainForm.pas └── DescriptionAttribute │ ├── DescriptionAttribute.res │ ├── DescriptionAttribute.dpr │ └── DescriptionAttribute_MainForm.dfm ├── 04 ├── ClassCtor │ ├── ClassCtor.res │ ├── ClassCtor.dpr │ ├── ClassCtorMainForm.dfm │ └── ClassCtorMainForm.pas ├── RtlLists │ ├── RtlLists.res │ ├── RtlLists.dpr │ └── RtlListsMainForm.dfm ├── ObjFromIntf │ ├── ObjFromIntf.res │ ├── ObjFromIntf.dpr │ └── ObjFromIntfMainForm.dfm ├── DelayedLoading │ ├── DelayedLoading.res │ ├── DelayedLoading.dpr │ ├── DelayedLoadingMainForm.dfm │ └── DelayedLoadingMainForm.pas ├── ReadOnlyRecord │ ├── ReadOnlyRecord.res │ ├── ReadOnlyRecord.dpr │ ├── ReadOnlyRecordMainForm.dfm │ └── ReadOnlyRecordMainForm.pas ├── StopWatchTest │ ├── StopWatchTest.res │ ├── StopWatchTest.dpr │ ├── StopWatchTestMainForm.dfm │ └── StopWatchTestMainForm.pas ├── IoFilesInFolder │ ├── IoFilesInFolder.res │ ├── IoFilesInFolder_Icon.ico │ └── IoFilesInFolder.dpr └── GenericClassCtor │ ├── GenericClassCtor.res │ ├── GenericClassCtor.dpr │ ├── GenericClassCtor_MainForm.dfm │ ├── GenericClassCtor_Classes.pas │ └── GenericClassCtor_MainForm.pas ├── 07 ├── JsonTests │ ├── jsonTests.res │ ├── jsonTests.dpr │ └── JsonTests_MainForm.dfm ├── DbxMulti2010 │ ├── DbxMulti.res │ ├── DbxMultiNet.res │ ├── DbxMultiForm.dfm │ ├── DbxMulti.dpr │ ├── trace.log │ └── DbGridFix.pas ├── JsonMarshal │ ├── JsonMarshal.res │ ├── JsonMarshal.dpr │ └── JsonMarshal_MainForm.dfm ├── DSnapGateway │ ├── DSnapGateway.res │ ├── DSnapServer.dpr │ ├── DSnapGateway.dpr │ ├── ServerMethodsUnit2.pas │ ├── DSnapGateway_WebModule.dfm │ ├── ServerContainerUnit1.dfm │ ├── DSnapGateway_WebModule.pas │ └── ServerContainerUnit1.pas ├── DSnapJson │ ├── DSnapJsonClient.res │ ├── DSnapJsonServer.res │ ├── DSnapJsonClient.dpr │ ├── DSnapJsonServer_MainForm.dfm │ ├── DSnapJsonServer_MainForm.pas │ ├── DSnapJson_MyData.pas │ ├── DSnapJsonServer_Container.dfm │ ├── DSnapJsonServer.dpr │ ├── DSnapJsonServer_Container.pas │ ├── DSnapJsonClient_MainForm.dfm │ ├── DSnapJsonServer_Methods.pas │ └── DSnapJsonGroup.groupproj ├── DSnapWebAppDebug │ ├── Project1.res │ ├── DSnapWadClient.res │ ├── DSnapWebAppDebug.res │ ├── Project1.dpr │ ├── DSnapWadClient.dpr │ ├── DSnapWebAppMainForm.dfm │ ├── DSnapWebAppMainForm.pas │ ├── DSnapWebAppDebug.dpr │ ├── DSnapWebAppModule.dfm │ ├── DSnapServerMethods.pas │ ├── Unit2.pas │ ├── DSnapWadClient_MainForm.pas │ ├── DSnapServerMethods.dfm │ ├── DSnapWebAppModule.pas │ ├── main.html │ ├── ProjectGroup1.groupproj │ └── DSnapWebAppDebugGroup.groupproj ├── DSnapFilterDemo │ ├── DSnapFilter01.res │ ├── DSnapFilter_Client.res │ ├── DSnapFilter_Server.res │ ├── DSnapFilter_Client.dpr │ ├── DSnapFilter_ServerForm.dfm │ ├── DSnapFilter_ServerForm.pas │ ├── DSnapFilter_ServerMethods.pas │ ├── DSnapFilter_Server.dpr │ ├── DSnapFilter01.dpk │ ├── DSnapFilter_ClientForm.pas │ ├── DSnapFilter_WebModule.dfm │ ├── DSnapFilter64.pas │ ├── DSnapFilter_WebModule.pas │ └── DSnapFilter_ClientForm.dfm ├── DSnapHttpConsole │ ├── ConsoleClient.res │ ├── ConsoleClient.dpr │ ├── DSnapHttpConsole.dpr │ ├── ServerMethodsUnit1.pas │ ├── ServerContainerUnit1.dfm │ ├── ConsoleClient_MainForm.pas │ └── DSnapHttpConsoleGroup.groupproj ├── First3TierHttp │ ├── First3TierHttp_Client.res │ ├── First3TierHttp_Server.res │ ├── First3TierHttp_Client.dpr │ ├── First3TierHttp_Server.dpr │ ├── First3TierHttp_ServerMainForm.dfm │ └── First3TierHttp_ServerModule.pas └── DsnapMethodsCallback │ ├── DsnapMethodsClient.res │ ├── DsnapMethodsServer.res │ ├── DsnapMethodsServer.dpr │ ├── DsnapMethodsClient.dpr │ ├── DsnapMethodsServer_MainForm.dfm │ └── DsnapMethodsClient_MainForm.dfm ├── 06 ├── FirstTouch │ ├── FirstTouch.res │ ├── FirstTouch.dpr │ ├── FirstTouch_MainForm.dfm │ └── FirstTouch_MainForm.pas ├── Gestures01 │ ├── Gestures01.res │ ├── Gestures01.dpr │ └── GesturesMainForm.pas ├── InertiaBall │ ├── InertiaBall.res │ ├── InertiaBall.dpr │ └── InertiaBall_MainForm.dfm ├── DataGestures │ ├── DataGestures.res │ ├── DataGestures.dpr │ └── DataGestures_MainForm.pas ├── EditGestures │ ├── EditGestures.res │ ├── EditGestures.dpr │ └── EditGestures_MainForm.pas ├── KeyboardTest │ ├── KeyboardTest.res │ ├── KeyboardTest.dpr │ ├── KeyboardTest_MainForm.pas │ └── KeyboardTest_MainForm.dfm └── CustomGesturesTest │ ├── CustomGestureTest.res │ └── CustomGestureTest.dpr └── 01 └── CustomInsight ├── CustomInsight.res ├── CustomInsight.dpk └── NoInspectorDescriptionPane.pas /05/FileAccess/SomeText.txt: -------------------------------------------------------------------------------- 1 | Some text here.fsdsdf 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Delphi2010Handbook 2 | Source code for Marco Cantu "Delphi 2010 Handbook" 3 | -------------------------------------------------------------------------------- /08/Rest1/Rest1.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/Rest1/Rest1.res -------------------------------------------------------------------------------- /02/MoveIP/MoveIP.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/02/MoveIP/MoveIP.res -------------------------------------------------------------------------------- /05/DWrite/DWrite.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/DWrite/DWrite.res -------------------------------------------------------------------------------- /08/Rest1/customer.cds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/Rest1/customer.cds -------------------------------------------------------------------------------- /08/YahooMap/temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/YahooMap/temp.png -------------------------------------------------------------------------------- /03/RttiAccess/RttiAccess_project.tvsconfig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /03/RttiIntro/RttiIntro_project.tvsconfig: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /03/MiniPack/MiniPack.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/MiniPack/MiniPack.res -------------------------------------------------------------------------------- /03/MiniSize/MiniSize.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/MiniSize/MiniSize.res -------------------------------------------------------------------------------- /03/RttiIntro/RttiIntro.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/RttiIntro/RttiIntro.res -------------------------------------------------------------------------------- /03/TypesList/TypesList.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/TypesList/TypesList.res -------------------------------------------------------------------------------- /04/ClassCtor/ClassCtor.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/ClassCtor/ClassCtor.res -------------------------------------------------------------------------------- /04/RtlLists/RtlLists.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/RtlLists/RtlLists.res -------------------------------------------------------------------------------- /05/D2DIntro/D2DIntro.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/D2DIntro/D2DIntro.res -------------------------------------------------------------------------------- /05/TiffViewer/einstein.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/TiffViewer/einstein.tif -------------------------------------------------------------------------------- /07/JsonTests/jsonTests.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/JsonTests/jsonTests.res -------------------------------------------------------------------------------- /08/LargeXml/LargeXml.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/LargeXml/LargeXml.res -------------------------------------------------------------------------------- /08/Rest1/Rest1Client.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/Rest1/Rest1Client.res -------------------------------------------------------------------------------- /08/RssClient/RssClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/RssClient/RssClient.res -------------------------------------------------------------------------------- /08/YahooMap/YahooMap.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/YahooMap/YahooMap.res -------------------------------------------------------------------------------- /08/YahooMap/customer.cds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/YahooMap/customer.cds -------------------------------------------------------------------------------- /03/RttiAccess/RttiAccess.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/RttiAccess/RttiAccess.res -------------------------------------------------------------------------------- /03/RttiAttrib/RttiAttrib.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/RttiAttrib/RttiAttrib.res -------------------------------------------------------------------------------- /03/TValueTest/TValueTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/TValueTest/TValueTest.res -------------------------------------------------------------------------------- /03/XmlPersist/XmlPersist.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/XmlPersist/XmlPersist.res -------------------------------------------------------------------------------- /05/FileAccess/FileAccess.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/FileAccess/FileAccess.res -------------------------------------------------------------------------------- /05/TiffViewer/TiffViewer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/TiffViewer/TiffViewer.res -------------------------------------------------------------------------------- /06/FirstTouch/FirstTouch.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/FirstTouch/FirstTouch.res -------------------------------------------------------------------------------- /06/Gestures01/Gestures01.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/Gestures01/Gestures01.res -------------------------------------------------------------------------------- /07/DbxMulti2010/DbxMulti.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DbxMulti2010/DbxMulti.res -------------------------------------------------------------------------------- /08/GeoLocation/customer.cds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/GeoLocation/customer.cds -------------------------------------------------------------------------------- /02/DebugVisual/DebugVisual.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/02/DebugVisual/DebugVisual.res -------------------------------------------------------------------------------- /03/ExeSizeTest/ExeSizeTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/ExeSizeTest/ExeSizeTest.res -------------------------------------------------------------------------------- /04/ObjFromIntf/ObjFromIntf.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/ObjFromIntf/ObjFromIntf.res -------------------------------------------------------------------------------- /05/Win7Taskbar/Win7Taskbar.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/Win7Taskbar/Win7Taskbar.res -------------------------------------------------------------------------------- /06/InertiaBall/InertiaBall.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/InertiaBall/InertiaBall.res -------------------------------------------------------------------------------- /07/DbxMulti2010/DbxMultiNet.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DbxMulti2010/DbxMultiNet.res -------------------------------------------------------------------------------- /07/JsonMarshal/JsonMarshal.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/JsonMarshal/JsonMarshal.res -------------------------------------------------------------------------------- /08/DataRestServer/customer.cds: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/DataRestServer/customer.cds -------------------------------------------------------------------------------- /08/GeoLocation/GeoLocation.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/GeoLocation/GeoLocation.res -------------------------------------------------------------------------------- /08/TranslateJson/Translate.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/TranslateJson/Translate.res -------------------------------------------------------------------------------- /02/NamedThreads/NamedThreads.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/02/NamedThreads/NamedThreads.res -------------------------------------------------------------------------------- /05/D2DCanvasMix/D2DCanvasMix.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/D2DCanvasMix/D2DCanvasMix.res -------------------------------------------------------------------------------- /05/D2DGradients/D2DGradients.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/D2DGradients/D2DGradients.res -------------------------------------------------------------------------------- /05/GetOSVersion/GetOSVersion.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/GetOSVersion/GetOSVersion.res -------------------------------------------------------------------------------- /06/DataGestures/DataGestures.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/DataGestures/DataGestures.res -------------------------------------------------------------------------------- /06/EditGestures/EditGestures.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/EditGestures/EditGestures.res -------------------------------------------------------------------------------- /06/KeyboardTest/KeyboardTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/KeyboardTest/KeyboardTest.res -------------------------------------------------------------------------------- /07/DSnapGateway/DSnapGateway.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapGateway/DSnapGateway.res -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapJson/DSnapJsonClient.res -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapJson/DSnapJsonServer.res -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/Project1.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapWebAppDebug/Project1.res -------------------------------------------------------------------------------- /07/DbxMulti2010/DbxMultiForm.dfm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DbxMulti2010/DbxMultiForm.dfm -------------------------------------------------------------------------------- /01/CustomInsight/CustomInsight.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/01/CustomInsight/CustomInsight.res -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersist.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/XmlPersistPublish/XmlPersist.res -------------------------------------------------------------------------------- /04/DelayedLoading/DelayedLoading.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/DelayedLoading/DelayedLoading.res -------------------------------------------------------------------------------- /04/ReadOnlyRecord/ReadOnlyRecord.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/ReadOnlyRecord/ReadOnlyRecord.res -------------------------------------------------------------------------------- /04/StopWatchTest/StopWatchTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/StopWatchTest/StopWatchTest.res -------------------------------------------------------------------------------- /05/D2DLinesSpeed/D2DLinesSpeed.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/D2DLinesSpeed/D2DLinesSpeed.res -------------------------------------------------------------------------------- /05/FileAccess/FileAccessThemed.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/FileAccess/FileAccessThemed.res -------------------------------------------------------------------------------- /05/Win7Libraries/Win7Libraries.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/Win7Libraries/Win7Libraries.res -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter01.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapFilterDemo/DSnapFilter01.res -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/DataRestServer/DataRestServer.res -------------------------------------------------------------------------------- /02/DebugVisual/DebugVisualMainForm.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/02/DebugVisual/DebugVisualMainForm.pas -------------------------------------------------------------------------------- /04/IoFilesInFolder/IoFilesInFolder.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/IoFilesInFolder/IoFilesInFolder.res -------------------------------------------------------------------------------- /05/GetOSVersion/GetOSVersion_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/05/GetOSVersion/GetOSVersion_Icon.ico -------------------------------------------------------------------------------- /07/DSnapHttpConsole/ConsoleClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapHttpConsole/ConsoleClient.res -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWadClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapWebAppDebug/DSnapWadClient.res -------------------------------------------------------------------------------- /04/GenericClassCtor/GenericClassCtor.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/GenericClassCtor/GenericClassCtor.res -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_Client.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapFilterDemo/DSnapFilter_Client.res -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_Server.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapFilterDemo/DSnapFilter_Server.res -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppDebug.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DSnapWebAppDebug/DSnapWebAppDebug.res -------------------------------------------------------------------------------- /02/CustomVisualizers/CustomVisualizers.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/02/CustomVisualizers/CustomVisualizers.res -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersistPublish.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/XmlPersistPublish/XmlPersistPublish.res -------------------------------------------------------------------------------- /04/IoFilesInFolder/IoFilesInFolder_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/04/IoFilesInFolder/IoFilesInFolder_Icon.ico -------------------------------------------------------------------------------- /06/CustomGesturesTest/CustomGestureTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/06/CustomGesturesTest/CustomGestureTest.res -------------------------------------------------------------------------------- /07/First3TierHttp/First3TierHttp_Client.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/First3TierHttp/First3TierHttp_Client.res -------------------------------------------------------------------------------- /07/First3TierHttp/First3TierHttp_Server.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/First3TierHttp/First3TierHttp_Server.res -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/ObjectsRestServer/ObjectsRestServer.res -------------------------------------------------------------------------------- /07/DsnapMethodsCallback/DsnapMethodsClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DsnapMethodsCallback/DsnapMethodsClient.res -------------------------------------------------------------------------------- /07/DsnapMethodsCallback/DsnapMethodsServer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/07/DsnapMethodsCallback/DsnapMethodsServer.res -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/FirstRestClient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/FirstSimpleRestServer/FirstRestClient.res -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/Fsrs_ServerClass.dfm: -------------------------------------------------------------------------------- 1 | object ServerMethods1: TServerMethods1 2 | OldCreateOrder = False 3 | Height = 150 4 | Width = 215 5 | end 6 | -------------------------------------------------------------------------------- /03/DescriptionAttribute/DescriptionAttribute.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/03/DescriptionAttribute/DescriptionAttribute.res -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/FirstSimpleRestServer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarcoDelphiBooks/Delphi2010Handbook/HEAD/08/FirstSimpleRestServer/FirstSimpleRestServer.res -------------------------------------------------------------------------------- /03/MiniPack/MiniPack.dpr: -------------------------------------------------------------------------------- 1 | program MiniPack; 2 | 3 | uses 4 | Forms, 5 | MiniForm in 'MiniForm.pas' {Form1}; 6 | 7 | {$R *.RES} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.CreateForm(TForm1, Form1); 12 | Application.Run; 13 | end. 14 | -------------------------------------------------------------------------------- /08/YahooMap/YahooMap.dpr: -------------------------------------------------------------------------------- 1 | program YahooMap; 2 | 3 | uses 4 | Forms, 5 | YahooMapForm in 'YahooMapForm.pas' {FormMap}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.CreateForm(TFormMap, FormMap); 12 | Application.Run; 13 | end. 14 | -------------------------------------------------------------------------------- /08/RssClient/RssClient.dpr: -------------------------------------------------------------------------------- 1 | program RssClient; 2 | 3 | uses 4 | Forms, 5 | RssClientForm in 'RssClientForm.pas' {RssForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.CreateForm(TRssForm, RssForm); 12 | Application.Run; 13 | end. 14 | -------------------------------------------------------------------------------- /08/GeoLocation/GeoLocation.dpr: -------------------------------------------------------------------------------- 1 | program GeoLocation; 2 | 3 | uses 4 | Forms, 5 | GeoLocationForm in 'GeoLocationForm.pas' {FormMap}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.CreateForm(TFormMap, FormMap); 12 | Application.Run; 13 | end. 14 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/Project1.dpr: -------------------------------------------------------------------------------- 1 | program Project1; 2 | 3 | uses 4 | Forms, 5 | Unit2 in 'Unit2.pas' {Form2}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm2, Form2); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /02/MoveIP/MoveIP.dpr: -------------------------------------------------------------------------------- 1 | program MoveIP; 2 | 3 | uses 4 | Forms, 5 | MoveIPMainForm in 'MoveIPMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer_ServerClass.dfm: -------------------------------------------------------------------------------- 1 | object ServerData: TServerData 2 | OldCreateOrder = False 3 | Height = 150 4 | Width = 215 5 | object ClientDataSet1: TClientDataSet 6 | Aggregates = <> 7 | FileName = 'customer.cds' 8 | Params = <> 9 | Left = 88 10 | Top = 56 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /04/ClassCtor/ClassCtor.dpr: -------------------------------------------------------------------------------- 1 | program ClassCtor; 2 | 3 | uses 4 | Forms, 5 | ClassCtorMainForm in 'ClassCtorMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/D2DIntro/D2DIntro.dpr: -------------------------------------------------------------------------------- 1 | program D2DIntro; 2 | 3 | uses 4 | Forms, 5 | D2DIntro_MainForm in 'D2DIntro_MainForm.pas' {D2DForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TD2DForm, D2DForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/DWrite/DWrite.dpr: -------------------------------------------------------------------------------- 1 | program DWrite; 2 | 3 | uses 4 | Forms, 5 | DWrite_MainForm in 'DWrite_MainForm.pas' {FormDWrite}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormDWrite, FormDWrite); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /06/Gestures01/Gestures01.dpr: -------------------------------------------------------------------------------- 1 | program Gestures01; 2 | 3 | uses 4 | Forms, 5 | GesturesMainForm in 'GesturesMainForm.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /03/RttiAccess/RttiAccess.dpr: -------------------------------------------------------------------------------- 1 | program RttiAccess; 2 | 3 | uses 4 | Forms, 5 | RttiAccessMainForm in 'RttiAccessMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /03/RttiAttrib/RttiAttrib.dpr: -------------------------------------------------------------------------------- 1 | program RttiAttrib; 2 | 3 | uses 4 | Forms, 5 | RttiAttribMainForm in 'RttiAttribMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /03/TValueTest/TValueTest.dpr: -------------------------------------------------------------------------------- 1 | program TValueTest; 2 | 3 | uses 4 | Forms, 5 | TValueTestMainForm in 'TValueTestMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/FileAccess/FileAccess.dpr: -------------------------------------------------------------------------------- 1 | program FileAccess; 2 | 3 | uses 4 | Forms, 5 | FileAccessForm in 'FileAccessForm.pas' {FormFile}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormFile, FormFile); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/GetOSVersion/GetOSVersion.dpr: -------------------------------------------------------------------------------- 1 | program GetOSVersion; 2 | 3 | uses 4 | Forms, 5 | GetOSVersionForm in 'GetOSVersionForm.pas' {Form8}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm8, Form8); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/TiffViewer/TiffViewer.dpr: -------------------------------------------------------------------------------- 1 | program TiffViewer; 2 | 3 | uses 4 | Forms, 5 | TiffViewer_MainForm in 'TiffViewer_MainForm.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /06/FirstTouch/FirstTouch.dpr: -------------------------------------------------------------------------------- 1 | program FirstTouch; 2 | 3 | uses 4 | Forms, 5 | FirstTouch_MainForm in 'FirstTouch_MainForm.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /08/LargeXml/LargeXml.dpr: -------------------------------------------------------------------------------- 1 | program LargeXml; 2 | 3 | uses 4 | Forms, 5 | LargeXmlForm in 'LargeXmlForm.pas' {Form1}, 6 | SaxForm in 'SaxForm.pas', 7 | saxphilo in 'saxphilo.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /08/Rest1/Rest1Client.dpr: -------------------------------------------------------------------------------- 1 | program Rest1Client; 2 | 3 | uses 4 | Forms, 5 | Rest1Client_MainForm in 'Rest1Client_MainForm.pas' {Form3}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm3, Form3); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /02/DebugVisual/DebugVisual.dpr: -------------------------------------------------------------------------------- 1 | program DebugVisual; 2 | 3 | uses 4 | Forms, 5 | DebugVisualMainForm in 'DebugVisualMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /04/ObjFromIntf/ObjFromIntf.dpr: -------------------------------------------------------------------------------- 1 | program ObjFromIntf; 2 | 3 | uses 4 | Forms, 5 | ObjFromIntfMainForm in 'ObjFromIntfMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /07/DbxMulti2010/DbxMulti.dpr: -------------------------------------------------------------------------------- 1 | program DbxMulti; 2 | 3 | uses 4 | Forms, 5 | DbxMultiForm in 'DbxMultiForm.pas' {Form1}, 6 | Grids in 'Grids.pas', 7 | DbGridFix in 'DbGridFix.pas'; 8 | 9 | {$R *.RES} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /07/JsonTests/jsonTests.dpr: -------------------------------------------------------------------------------- 1 | program jsonTests; 2 | 3 | uses 4 | Forms, 5 | JsonTests_MainForm in 'JsonTests_MainForm.pas' {FormJson}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormJson, FormJson); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /04/RtlLists/RtlLists.dpr: -------------------------------------------------------------------------------- 1 | program RtlLists; 2 | 3 | uses 4 | Forms, 5 | RtlListsMainForm in 'RtlListsMainForm.pas' {FormRtlLists}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormRtlLists, FormRtlLists); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/FileAccess/FileAccessThemed.dpr: -------------------------------------------------------------------------------- 1 | program FileAccessThemed; 2 | 3 | uses 4 | Forms, 5 | FileAccessForm in 'FileAccessForm.pas' {FormFile}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormFile, FormFile); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /04/StopWatchTest/StopWatchTest.dpr: -------------------------------------------------------------------------------- 1 | program StopWatchTest; 2 | 3 | uses 4 | Forms, 5 | StopWatchTestMainForm in 'StopWatchTestMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/D2DCanvasMix/D2DCanvasMix.dpr: -------------------------------------------------------------------------------- 1 | program D2DCanvasMix; 2 | 3 | uses 4 | Forms, 5 | D2DCanvasMix_MainForm in 'D2DCanvasMix_MainForm.pas' {FormMix}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormMix, FormMix); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/Win7Libraries/Win7Libraries.dpr: -------------------------------------------------------------------------------- 1 | program Win7Libraries; 2 | 3 | uses 4 | Forms, 5 | Win7Libraries_MainForm in 'Win7Libraries_MainForm.pas' {Form1}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /07/JsonMarshal/JsonMarshal.dpr: -------------------------------------------------------------------------------- 1 | program JsonMarshal; 2 | 3 | uses 4 | Forms, 5 | JsonMarshal_MainForm in 'JsonMarshal_MainForm.pas' {FormJson}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormJson, FormJson); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /03/RttiIntro/RttiIntro.dpr: -------------------------------------------------------------------------------- 1 | program RttiIntro; 2 | 3 | uses 4 | Forms, 5 | RttiIntro_MainForm in 'RttiIntro_MainForm.pas' {FormRttiIntro}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormRttiIntro, FormRttiIntro); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /04/DelayedLoading/DelayedLoading.dpr: -------------------------------------------------------------------------------- 1 | program DelayedLoading; 2 | 3 | uses 4 | Forms, 5 | DelayedLoadingMainForm in 'DelayedLoadingMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /04/ReadOnlyRecord/ReadOnlyRecord.dpr: -------------------------------------------------------------------------------- 1 | program ReadOnlyRecord; 2 | 3 | uses 4 | Forms, 5 | ReadOnlyRecordMainForm in 'ReadOnlyRecordMainForm.pas' {Form39}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm39, Form39); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWadClient.dpr: -------------------------------------------------------------------------------- 1 | program DSnapWadClient; 2 | 3 | uses 4 | Forms, 5 | DSnapWadClient_MainForm in 'DSnapWadClient_MainForm.pas' {Form2}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TForm2, Form2); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /05/D2DGradients/D2DGradients.dpr: -------------------------------------------------------------------------------- 1 | program D2DGradients; 2 | 3 | uses 4 | Forms, 5 | D2DGradientsForm in 'D2DGradientsForm.pas' {FormGradients}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormGradients, FormGradients); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /06/EditGestures/EditGestures.dpr: -------------------------------------------------------------------------------- 1 | program EditGestures; 2 | 3 | uses 4 | Forms, 5 | EditGestures_MainForm in 'EditGestures_MainForm.pas' {FormEditGest}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormEditGest, FormEditGest); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /06/KeyboardTest/KeyboardTest.dpr: -------------------------------------------------------------------------------- 1 | program KeyboardTest; 2 | 3 | uses 4 | Forms, 5 | KeyboardTest_MainForm in 'KeyboardTest_MainForm.pas' {KeyboardForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TKeyboardForm, KeyboardForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /04/IoFilesInFolder/IoFilesInFolder.dpr: -------------------------------------------------------------------------------- 1 | program IoFilesInFolder; 2 | 3 | uses 4 | Forms, 5 | IoFilesInFolderMainForm in 'IoFilesInFolderMainForm.pas' {FormIoFiles}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormIoFiles, FormIoFiles); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /06/DataGestures/DataGestures.dpr: -------------------------------------------------------------------------------- 1 | program DataGestures; 2 | 3 | uses 4 | Forms, 5 | DataGestures_MainForm in 'DataGestures_MainForm.pas' {DataGesturesForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TDataGesturesForm, DataGesturesForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonClient.dpr: -------------------------------------------------------------------------------- 1 | program DSnapJsonClient; 2 | 3 | uses 4 | Forms, 5 | DSnapJsonClient_MainForm in 'DSnapJsonClient_MainForm.pas' {FormJsonClient}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormJsonClient, FormJsonClient); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /08/TranslateJson/Translate.dpr: -------------------------------------------------------------------------------- 1 | program Translate; 2 | 3 | uses 4 | Forms, 5 | TranslateMainForm in 'TranslateMainForm.pas' {TranslateForm}, 6 | BabelGoogle in 'BabelGoogle.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TTranslateForm, TranslateForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /03/ExeSizeTest/ExeSizeTest.dpr: -------------------------------------------------------------------------------- 1 | program ExeSizeTest; 2 | 3 | {$WEAKLINKRTTI ON} 4 | {. $STRONGLINKTYPES on} 5 | 6 | uses 7 | Forms, 8 | UniCds_MainForm in 'UniCds_MainForm.pas' {FormUniCds}; 9 | 10 | {$R *.res} 11 | 12 | begin 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TFormUniCds, FormUniCds); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /06/CustomGesturesTest/CustomGestureTest.dpr: -------------------------------------------------------------------------------- 1 | program CustomGestureTest; 2 | 3 | uses 4 | Forms, 5 | CustomGestureTest_MainForm in 'CustomGestureTest_MainForm.pas' {CustomGestureForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TCustomGestureForm, CustomGestureForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/FirstRestClient.dpr: -------------------------------------------------------------------------------- 1 | program FirstRestClient; 2 | 3 | uses 4 | Forms, 5 | FirstRestClient_MainForm in 'FirstRestClient_MainForm.pas' {FormFirstRestClient}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TFormFirstRestClient, FormFirstRestClient); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /03/TypesList/TypesList.dpr: -------------------------------------------------------------------------------- 1 | program TypesList; 2 | 3 | uses 4 | Forms, 5 | TypesListMainForm in 'TypesListMainForm.pas' {FormTypesList}, 6 | TypeInfoForm in 'TypeInfoForm.pas' {FormTypeInfo}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TFormTypesList, FormTypesList); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /05/Win7Taskbar/Win7Taskbar.dpr: -------------------------------------------------------------------------------- 1 | program Win7Taskbar; 2 | 3 | uses 4 | Forms, 5 | Win7Taskbar_MainForm in 'Win7Taskbar_MainForm.pas' {Win7TaskForm}, 6 | TaskbarSupportUnit in 'TaskbarSupportUnit.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TWin7TaskForm, Win7TaskForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /06/InertiaBall/InertiaBall.dpr: -------------------------------------------------------------------------------- 1 | program InertiaBall; 2 | 3 | uses 4 | Forms, 5 | InertiaBall_MainForm in 'InertiaBall_MainForm.pas' {InertiaForm}, 6 | InertiaBall_TheBall in 'InertiaBall_TheBall.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TInertiaForm, InertiaForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /02/NamedThreads/NamedThreads.dpr: -------------------------------------------------------------------------------- 1 | program NamedThreads; 2 | 3 | uses 4 | Forms, 5 | NamedThreadsMainForm in 'NamedThreadsMainForm.pas' {FormNamedThreads}, 6 | MyThreadClass in 'MyThreadClass.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TFormNamedThreads, FormNamedThreads); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /08/Rest1/Rest1_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Rest1 (Server)' 5 | ClientHeight = 179 6 | ClientWidth = 296 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 | end 17 | -------------------------------------------------------------------------------- /03/ExeSizeTest/ExeSizeTestMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form39' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 | end 17 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_Client.dpr: -------------------------------------------------------------------------------- 1 | program DSnapFilter_Client; 2 | 3 | uses 4 | Forms, 5 | DSnapFilter_ClientForm in 'DSnapFilter_ClientForm.pas' {Form3}, 6 | DSnapFilter64 in '..\DSnapFilter01\DSnapFilter64.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TForm3, Form3); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /05/D2DLinesSpeed/D2DLinesSpeed.dpr: -------------------------------------------------------------------------------- 1 | program D2DLinesSpeed; 2 | 3 | uses 4 | Forms, 5 | D2DLinesSpeed_MainForm in 'D2DLinesSpeed_MainForm.pas' {Form1}, 6 | D2DLinesSpeed_Direct2DOnly in 'D2DLinesSpeed_Direct2DOnly.pas' {Form2}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /07/DSnapHttpConsole/ConsoleClient.dpr: -------------------------------------------------------------------------------- 1 | program ConsoleClient; 2 | 3 | uses 4 | Forms, 5 | ConsoleClient_MainForm in 'ConsoleClient_MainForm.pas' {ConsoleClientForm}, 6 | ClientProxy in 'ClientProxy.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TConsoleClientForm, ConsoleClientForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'DSnapWebApp' 5 | ClientHeight = 96 6 | ClientWidth = 290 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 | end 17 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'DSnapJsonServer' 5 | ClientHeight = 126 6 | ClientWidth = 278 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 | end 17 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'DataRestServer' 5 | ClientHeight = 138 6 | ClientWidth = 231 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 | end 17 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/Fsrs_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'FirstSimpleRestServer' 5 | ClientHeight = 123 6 | ClientWidth = 308 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 | end 17 | -------------------------------------------------------------------------------- /03/MiniPack/MiniForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 217 3 | Top = 153 4 | Caption = 'Form1' 5 | ClientHeight = 197 6 | ClientWidth = 428 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'MS Sans Serif' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | end 18 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_ServerForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'DSnapFilter_ServerForm' 5 | ClientHeight = 104 6 | ClientWidth = 310 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 | end 17 | -------------------------------------------------------------------------------- /07/DSnapGateway/DSnapServer.dpr: -------------------------------------------------------------------------------- 1 | program DSnapServer; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | uses 6 | SysUtils, 7 | ServerMethodsUnit2 in 'ServerMethodsUnit2.pas', 8 | ServerContainerUnit1 in 'ServerContainerUnit1.pas' {ServerContainer1: TDataModule}; 9 | 10 | begin 11 | try 12 | RunDSServer; 13 | except 14 | on E: Exception do 15 | Writeln(E.ClassName, ': ', E.Message); 16 | end 17 | end. 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'ObjectsRestServer' 5 | ClientHeight = 180 6 | ClientWidth = 294 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 | end 17 | -------------------------------------------------------------------------------- /03/ExeSizeTest/ExeSizeTestMainForm.pas: -------------------------------------------------------------------------------- 1 | unit ExeSizeTestMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | private 12 | { Private declarations } 13 | public 14 | { Public declarations } 15 | end; 16 | 17 | var 18 | Form39: TForm39; 19 | 20 | implementation 21 | 22 | {$R *.dfm} 23 | 24 | end. 25 | -------------------------------------------------------------------------------- /05/DWrite/DWrite_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormDWrite: TFormDWrite 2 | Left = 0 3 | Top = 0 4 | Caption = 'DWrite' 5 | ClientHeight = 374 6 | ClientWidth = 619 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 | OnPaint = FormPaint 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | end 18 | -------------------------------------------------------------------------------- /07/DSnapHttpConsole/DSnapHttpConsole.dpr: -------------------------------------------------------------------------------- 1 | program DSnapHttpConsole; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | uses 6 | SysUtils, 7 | ServerMethodsUnit1 in 'ServerMethodsUnit1.pas', 8 | ServerContainerUnit1 in 'ServerContainerUnit1.pas' {ServerContainer1: TDataModule}; 9 | 10 | begin 11 | try 12 | RunDSServer; 13 | except 14 | on E: Exception do 15 | Writeln(E.ClassName, ': ', E.Message); 16 | end 17 | end. 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /08/Rest1/Rest1_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit Rest1_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, Forms; 7 | 8 | type 9 | TForm1 = class(TForm) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | end; 15 | 16 | var 17 | Form1: TForm1; 18 | 19 | implementation 20 | 21 | uses SockApp; 22 | 23 | {$R *.dfm} 24 | 25 | initialization 26 | TWebAppSockObjectFactory.Create('rest1') 27 | 28 | end. 29 | 30 | -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersist.dpr: -------------------------------------------------------------------------------- 1 | program XmlPersist; 2 | 3 | uses 4 | Forms, 5 | XmlPersistPublish_MainForm in 'XmlPersistPublish_MainForm.pas' {Form1}, 6 | XmlPersistPublish_Classes in 'XmlPersistPublish_Classes.pas', 7 | TrivialXmlWriter in 'TrivialXmlWriter.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TForm1, Form1); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /04/GenericClassCtor/GenericClassCtor.dpr: -------------------------------------------------------------------------------- 1 | program GenericClassCtor; 2 | 3 | uses 4 | Forms, 5 | GenericClassCtor_MainForm in 'GenericClassCtor_MainForm.pas' {FormGenericClassCtor}, 6 | GenericClassCtor_Classes in 'GenericClassCtor_Classes.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TFormGenericClassCtor, FormGenericClassCtor); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /05/D2DLinesSpeed/D2DLinesSpeed_Direct2DOnly.dfm: -------------------------------------------------------------------------------- 1 | object Form2: TForm2 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form2' 5 | ClientHeight = 289 6 | ClientWidth = 362 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 | Visible = True 15 | OnPaint = FormPaint 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | end 19 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit DSnapJsonServer_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs; 8 | 9 | type 10 | TForm1 = class(TForm) 11 | private 12 | { Private declarations } 13 | public 14 | { Public declarations } 15 | end; 16 | 17 | var 18 | Form1: TForm1; 19 | 20 | implementation 21 | 22 | {$R *.dfm} 23 | 24 | end. 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /03/DescriptionAttribute/DescriptionAttribute.dpr: -------------------------------------------------------------------------------- 1 | program DescriptionAttribute; 2 | 3 | uses 4 | Forms, 5 | DescriptionAttribute_MainForm in 'DescriptionAttribute_MainForm.pas' {FormDescrAttr}, 6 | DescriptionAttribute_Classes in 'DescriptionAttribute_Classes.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TFormDescrAttr, FormDescrAttr); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersistPublish.dpr: -------------------------------------------------------------------------------- 1 | program XmlPersistPublish; 2 | 3 | uses 4 | Forms, 5 | XmlPersistPublish_MainForm in 'XmlPersistPublish_MainForm.pas' {Form1}, 6 | XmlPersistPublish_Classes in 'XmlPersistPublish_Classes.pas', 7 | TrivialXmlWriter in 'TrivialXmlWriter.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TForm1, Form1); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /05/D2DCanvasMix/D2DCanvasMix_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormMix: TFormMix 2 | Left = 0 3 | Top = 0 4 | Caption = 'D2DCanvasMix' 5 | ClientHeight = 290 6 | ClientWidth = 554 7 | Color = clWhite 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -11 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | OnPaint = FormPaint 15 | OnResize = FormResize 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | end 19 | -------------------------------------------------------------------------------- /08/Rest1/Rest1.dpr: -------------------------------------------------------------------------------- 1 | program Rest1; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | Rest1_MainForm in 'Rest1_MainForm.pas' {Form1}, 9 | Rest1_WebModule in 'Rest1_WebModule.pas' {WebModule3: TWebModule}, 10 | TrivialXmlWriter in 'TrivialXmlWriter.pas'; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | Application.Initialize; 16 | Application.CreateForm(TForm1, Form1); 17 | Application.CreateForm(TWebModule3, WebModule3); 18 | Application.Run; 19 | end. 20 | 21 | -------------------------------------------------------------------------------- /07/DSnapGateway/DSnapGateway.dpr: -------------------------------------------------------------------------------- 1 | program DSnapGateway; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | DSnapGateway_ServerForm in 'DSnapGateway_ServerForm.pas' {Form1}, 9 | DSnapGateway_WebModule in 'DSnapGateway_WebModule.pas' {WebModule3: TWebModule}; 10 | 11 | {$R *.res} 12 | 13 | begin 14 | Application.Initialize; 15 | Application.CreateForm(TForm1, Form1); 16 | Application.CreateForm(TWebModule3, WebModule3); 17 | Application.Run; 18 | end. 19 | 20 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppMainForm.pas: -------------------------------------------------------------------------------- 1 | unit DSnapWebAppMainForm; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, Forms; 7 | 8 | type 9 | TForm1 = class(TForm) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | end; 15 | 16 | var 17 | Form1: TForm1; 18 | 19 | implementation 20 | 21 | uses SockApp; 22 | 23 | {$R *.dfm} 24 | 25 | initialization 26 | TWebAppSockObjectFactory.Create('dsnap1http') 27 | 28 | end. 29 | 30 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/Fsrs_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit Fsrs_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, Forms; 7 | 8 | type 9 | TForm1 = class(TForm) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | end; 15 | 16 | var 17 | Form1: TForm1; 18 | 19 | implementation 20 | 21 | uses SockApp; 22 | 23 | {$R *.dfm} 24 | 25 | initialization 26 | TWebAppSockObjectFactory.Create('FirstSimpleRestServer') 27 | 28 | end. 29 | 30 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_ServerForm.pas: -------------------------------------------------------------------------------- 1 | unit DSnapFilter_ServerForm; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, Forms; 7 | 8 | type 9 | TForm1 = class(TForm) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | end; 15 | 16 | var 17 | Form1: TForm1; 18 | 19 | implementation 20 | 21 | uses SockApp; 22 | 23 | {$R *.dfm} 24 | 25 | initialization 26 | TWebAppSockObjectFactory.Create('filterserver') 27 | 28 | end. 29 | 30 | -------------------------------------------------------------------------------- /07/DsnapMethodsCallback/DsnapMethodsServer.dpr: -------------------------------------------------------------------------------- 1 | program DsnapMethodsServer; 2 | 3 | uses 4 | Forms, 5 | DsnapMethodsServer_MainForm in 'DsnapMethodsServer_MainForm.pas' {FormDsnapMethodsServer}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | if ParamCount > 0 then 11 | ParamLifeCycle := ParamStr(1); 12 | 13 | Application.Initialize; 14 | Application.MainFormOnTaskbar := True; 15 | Application.CreateForm(TFormDsnapMethodsServer, FormDsnapMethodsServer); 16 | Application.Run; 17 | end. 18 | -------------------------------------------------------------------------------- /07/First3TierHttp/First3TierHttp_Client.dpr: -------------------------------------------------------------------------------- 1 | program First3TierHttp_Client; 2 | 3 | uses 4 | Forms, 5 | First3TierHttp_ClientMainForm in 'First3TierHttp_ClientMainForm.pas' {FormFirst3Tier2009Client}, 6 | First3TierHttp_ClientClasses in 'First3TierHttp_ClientClasses.pas'; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TFormFirst3Tier2009Client, FormFirst3Tier2009Client); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit DataRestServer_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, Forms; 7 | 8 | type 9 | TForm1 = class(TForm) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | end; 15 | 16 | var 17 | Form1: TForm1; 18 | 19 | implementation 20 | 21 | uses SockApp; 22 | 23 | {$R *.dfm} 24 | 25 | initialization 26 | TWebAppSockObjectFactory.Create('RestDataServer') 27 | 28 | end. 29 | 30 | -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit ObjectsRestServer_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, Forms; 7 | 8 | type 9 | TForm1 = class(TForm) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | end; 15 | 16 | var 17 | Form1: TForm1; 18 | 19 | implementation 20 | 21 | uses SockApp; 22 | 23 | {$R *.dfm} 24 | 25 | initialization 26 | TWebAppSockObjectFactory.Create('RestObjects') 27 | 28 | end. 29 | 30 | -------------------------------------------------------------------------------- /05/D2DGradients/D2DGradientsForm.dfm: -------------------------------------------------------------------------------- 1 | object FormGradients: TFormGradients 2 | Left = 0 3 | Top = 0 4 | Caption = 'D2DGradients' 5 | ClientHeight = 658 6 | ClientWidth = 827 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 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | OnPaint = FormPaint 17 | OnResize = FormResize 18 | PixelsPerInch = 96 19 | TextHeight = 13 20 | end 21 | -------------------------------------------------------------------------------- /07/DsnapMethodsCallback/DsnapMethodsClient.dpr: -------------------------------------------------------------------------------- 1 | program DsnapMethodsClient; 2 | 3 | uses 4 | Forms, 5 | DsnapMethodsClient_ClientForm in 'DsnapMethodsClient_ClientForm.pas' {FormDsmcClient}, 6 | DsnapMethodsClient_MainForm in 'DsnapMethodsClient_MainForm.pas' {FormDsmcMain}, 7 | DsnapMethodsClient_Proxy in 'DsnapMethodsClient_Proxy.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.MainFormOnTaskbar := True; 14 | Application.CreateForm(TFormDsmcMain, FormDsmcMain); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /07/DSnapGateway/ServerMethodsUnit2.pas: -------------------------------------------------------------------------------- 1 | unit ServerMethodsUnit2; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer; 7 | 8 | type 9 | {$METHODINFO ON} 10 | TServerMethods2 = class(TPersistent) 11 | private 12 | { Private declarations } 13 | public 14 | { Public declarations } 15 | function EchoString(Value: string): string; 16 | end; 17 | {$METHODINFO OFF} 18 | 19 | implementation 20 | 21 | function TServerMethods2.EchoString(Value: string): string; 22 | begin 23 | Result := Value; 24 | end; 25 | 26 | end. 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /07/DbxMulti2010/trace.log: -------------------------------------------------------------------------------- 1 | Log Opened ========================================== 2 | {DRIVER VENDOR } {INTERBASE - isc_attach_database} 3 | {CONNECT } CoLog Opened ========================================== 4 | {DRIVER VENDOR } {INTERBASE - isc_attach_database} 5 | {CONNECT } ConnectionC1.Open; 6 | Log Opened ========================================== 7 | {DRIVER VENDOR } {INTERBASE - isc_attach_database} 8 | {CONNECT } CoLog Opened ========================================== 9 | {DRIVER VENDOR } {INTERBASE - isc_attach_database} 10 | {CONNECT } Co -------------------------------------------------------------------------------- /07/DSnapHttpConsole/ServerMethodsUnit1.pas: -------------------------------------------------------------------------------- 1 | unit ServerMethodsUnit1; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer; 7 | 8 | type 9 | {$METHODINFO ON} 10 | TServerMethods1 = class(TPersistent) 11 | private 12 | { Private declarations } 13 | public 14 | { Public declarations } 15 | function EchoString(Value: string): string; 16 | end; 17 | {$METHODINFO OFF} 18 | 19 | implementation 20 | 21 | function TServerMethods1.EchoString(Value: string): string; 22 | begin 23 | Result := Value; 24 | end; 25 | 26 | end. 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_ServerMethods.pas: -------------------------------------------------------------------------------- 1 | unit DSnapFilter_ServerMethods; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer; 7 | 8 | type 9 | {$METHODINFO ON} 10 | TServerMethods2 = class(TPersistent) 11 | private 12 | { Private declarations } 13 | public 14 | { Public declarations } 15 | function EchoString(Value: string): string; 16 | end; 17 | {$METHODINFO OFF} 18 | 19 | implementation 20 | 21 | function TServerMethods2.EchoString(Value: string): string; 22 | begin 23 | Result := Value; 24 | end; 25 | 26 | end. 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer.dpr: -------------------------------------------------------------------------------- 1 | program ObjectsRestServer; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | ObjectsRestServer_MainForm in 'ObjectsRestServer_MainForm.pas' {Form1}, 9 | ObjectsRestServer_Classes in 'ObjectsRestServer_Classes.pas', 10 | ObjectsRestServer_WebModule in 'ObjectsRestServer_WebModule.pas' {WebModule2: TWebModule}; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | Application.Initialize; 16 | Application.CreateForm(TForm1, Form1); 17 | Application.CreateForm(TWebModule2, WebModule2); 18 | Application.Run; 19 | end. 20 | 21 | -------------------------------------------------------------------------------- /03/XmlPersist/XmlPersist.dpr: -------------------------------------------------------------------------------- 1 | program XmlPersist; 2 | 3 | uses 4 | Forms, 5 | XmlPersist_MainForm in 'XmlPersist_MainForm.pas' {FormXmlPersist}, 6 | XmlPersistAttrib_Classes in 'XmlPersistAttrib_Classes.pas', 7 | TrivialXmlWriter in 'TrivialXmlWriter.pas', 8 | XmlPersistPublish_Classes in 'XmlPersistPublish_Classes.pas', 9 | XmlPersistRtti_Classes in 'XmlPersistRtti_Classes.pas'; 10 | 11 | {$R *.res} 12 | 13 | begin 14 | Application.Initialize; 15 | Application.MainFormOnTaskbar := True; 16 | Application.CreateForm(TFormXmlPersist, FormXmlPersist); 17 | Application.Run; 18 | end. 19 | -------------------------------------------------------------------------------- /06/FirstTouch/FirstTouch_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'FirstTouch' 5 | ClientHeight = 290 6 | ClientWidth = 554 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 Memo1: TMemo 17 | Left = 72 18 | Top = 48 19 | Width = 409 20 | Height = 201 21 | Lines.Strings = ( 22 | 'Memo1') 23 | TabOrder = 0 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /03/MiniSize/MiniSize.dpr: -------------------------------------------------------------------------------- 1 | program MiniSize; 2 | 3 | uses 4 | Windows; 5 | 6 | {$R *.RES} 7 | 8 | var 9 | nSize: Integer; 10 | hFile: THandle; 11 | strSize: String; 12 | begin 13 | // open the current file and read the size 14 | hFile := CreateFile (PChar (ParamStr (0)), 15 | 0, FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0); 16 | nSize := GetFileSize (hFile, nil); 17 | CloseHandle (hFile); 18 | 19 | // copy the size to a string and show it 20 | SetLength (strSize, 20); 21 | Str (nSize, strSize); 22 | MessageBox (0, PChar(strSize), 'Mini Program', MB_OK); 23 | end. 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /04/ClassCtor/ClassCtorMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'ClassCtor' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 Button1: TButton 17 | Left = 24 18 | Top = 32 19 | Width = 75 20 | Height = 25 21 | Caption = 'Button1' 22 | TabOrder = 0 23 | OnClick = Button1Click 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /07/DSnapGateway/DSnapGateway_WebModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule3: TWebModule3 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule3DefaultHandlerAction 9 | end> 10 | Height = 230 11 | Width = 415 12 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 13 | RESTContext = 'rest' 14 | DSHostname = 'localhost' 15 | DSPort = 211 16 | Filters = <> 17 | WebDispatch.MethodType = mtAny 18 | WebDispatch.PathInfo = 'datasnap*' 19 | Left = 112 20 | Top = 51 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_Server.dpr: -------------------------------------------------------------------------------- 1 | program DSnapFilter_Server; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | DSnapFilter_ServerForm in 'DSnapFilter_ServerForm.pas' {Form1}, 9 | DSnapFilter_ServerMethods in 'DSnapFilter_ServerMethods.pas', 10 | DSnapFilter_WebModule in 'DSnapFilter_WebModule.pas' {WebModule3: TWebModule}, 11 | DSnapFilter64 in '..\DSnapFilter01\DSnapFilter64.pas'; 12 | 13 | {$R *.res} 14 | 15 | begin 16 | Application.Initialize; 17 | Application.CreateForm(TForm1, Form1); 18 | Application.CreateForm(TWebModule3, WebModule3); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/FirstSimpleRestServer.dpr: -------------------------------------------------------------------------------- 1 | program FirstSimpleRestServer; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | Fsrs_MainForm in 'Fsrs_MainForm.pas' {Form1}, 9 | Fsrs_ServerClass in 'Fsrs_ServerClass.pas' {ServerMethods1: TDSServerModule}, 10 | Fsrs_DataModule in 'Fsrs_DataModule.pas' {WebModule2: TWebModule}; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | Application.Initialize; 16 | Application.CreateForm(TForm1, Form1); 17 | Application.CreateForm(TServerMethods1, ServerMethods1); 18 | Application.CreateForm(TWebModule2, WebModule2); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /04/DelayedLoading/DelayedLoadingMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'DelayedLoading' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 btnCall: TButton 17 | Left = 56 18 | Top = 56 19 | Width = 75 20 | Height = 25 21 | Caption = 'btnCall' 22 | TabOrder = 0 23 | OnClick = btnCallClick 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppDebug.dpr: -------------------------------------------------------------------------------- 1 | program DSnapWebAppDebug; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | DSnapWebAppMainForm in 'DSnapWebAppMainForm.pas' {Form1}, 9 | DSnapServerMethods in 'DSnapServerMethods.pas' {ServerMethods1: TDSServerModule}, 10 | DSnapWebAppModule in 'DSnapWebAppModule.pas' {WebModule2: TWebModule}; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | Application.Initialize; 16 | Application.CreateForm(TForm1, Form1); 17 | Application.CreateForm(TServerMethods1, ServerMethods1); 18 | Application.CreateForm(TWebModule2, WebModule2); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /07/First3TierHttp/First3TierHttp_Server.dpr: -------------------------------------------------------------------------------- 1 | program First3TierHttp_Server; 2 | 3 | uses 4 | Forms, 5 | First3TierHttp_ServerMainForm in 'First3TierHttp_ServerMainForm.pas' {FormFirst3Tier2009Server}, 6 | First3TierHttp_ServerModule in 'First3TierHttp_ServerModule.pas' {DSFirst3TierServerModule: TDSServerModule}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TFormFirst3Tier2009Server, FormFirst3Tier2009Server); 14 | Application.CreateForm(TDSFirst3TierServerModule, DSFirst3TierServerModule); 15 | Application.Run; 16 | end. 17 | -------------------------------------------------------------------------------- /02/MoveIP/MoveIPMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form39' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 | OnClick = FormClick 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object Button1: TButton 18 | Left = 40 19 | Top = 32 20 | Width = 75 21 | Height = 25 22 | Caption = 'Button1' 23 | TabOrder = 0 24 | OnClick = Button1Click 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /04/ReadOnlyRecord/ReadOnlyRecordMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'ReadOnlyRecord' 5 | ClientHeight = 142 6 | ClientWidth = 375 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 Button1: TButton 17 | Left = 104 18 | Top = 48 19 | Width = 113 20 | Height = 25 21 | Caption = 'btnTryWriting' 22 | TabOrder = 0 23 | OnClick = Button1Click 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer.dpr: -------------------------------------------------------------------------------- 1 | program DataRestServer; 2 | 3 | {$APPTYPE GUI} 4 | 5 | uses 6 | Forms, 7 | SockApp, 8 | DataRestServer_MainForm in 'DataRestServer_MainForm.pas' {Form1}, 9 | DataRestServer_ServerClass in 'DataRestServer_ServerClass.pas' {ServerData: TDataModule}, 10 | DataRestServer_WebModule in 'DataRestServer_WebModule.pas' {WebModule2: TWebModule}; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | Application.Initialize; 16 | Application.CreateForm(TForm1, Form1); 17 | Application.CreateForm(TServerData, ServerData); 18 | Application.CreateForm(TWebModule2, WebModule2); 19 | Application.Run; 20 | end. 21 | 22 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJson_MyData.pas: -------------------------------------------------------------------------------- 1 | unit DSnapJson_MyData; 2 | 3 | interface 4 | 5 | type 6 | TMyData = class 7 | private 8 | Name: String; 9 | Value: Integer; 10 | public 11 | constructor Create (const aName: string); 12 | function ToString: string; override; 13 | end; 14 | 15 | implementation 16 | 17 | uses 18 | SysUtils; 19 | 20 | { TMyData } 21 | 22 | constructor TMyData.Create(const aName: string); 23 | begin 24 | Name := aName; 25 | Value := Random (1000); 26 | end; 27 | 28 | function TMyData.ToString: string; 29 | begin 30 | Result := Name + ':' + IntToStr (Value); 31 | end; 32 | 33 | initialization 34 | randomize; 35 | 36 | end. 37 | -------------------------------------------------------------------------------- /07/DSnapGateway/ServerContainerUnit1.dfm: -------------------------------------------------------------------------------- 1 | object ServerContainer1: TServerContainer1 2 | OldCreateOrder = False 3 | Height = 271 4 | Width = 415 5 | object DSServer1: TDSServer 6 | AutoStart = True 7 | HideDSAdmin = False 8 | Left = 96 9 | Top = 11 10 | end 11 | object DSTCPServerTransport1: TDSTCPServerTransport 12 | PoolSize = 0 13 | Server = DSServer1 14 | BufferKBSize = 32 15 | Filters = <> 16 | Left = 96 17 | Top = 73 18 | end 19 | object DSServerClass1: TDSServerClass 20 | OnGetClass = DSServerClass1GetClass 21 | Server = DSServer1 22 | LifeCycle = 'Session' 23 | Left = 200 24 | Top = 11 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer_Container.dfm: -------------------------------------------------------------------------------- 1 | object ServerContainer1: TServerContainer1 2 | OldCreateOrder = False 3 | Height = 271 4 | Width = 415 5 | object DSServer1: TDSServer 6 | AutoStart = True 7 | HideDSAdmin = False 8 | Left = 96 9 | Top = 11 10 | end 11 | object DSTCPServerTransport1: TDSTCPServerTransport 12 | PoolSize = 0 13 | Server = DSServer1 14 | BufferKBSize = 32 15 | Filters = <> 16 | Left = 96 17 | Top = 73 18 | end 19 | object DSServerClass1: TDSServerClass 20 | OnGetClass = DSServerClass1GetClass 21 | Server = DSServer1 22 | LifeCycle = 'Session' 23 | Left = 200 24 | Top = 11 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer.dpr: -------------------------------------------------------------------------------- 1 | program DSnapJsonServer; 2 | 3 | uses 4 | Forms, 5 | DSnapJsonServer_MainForm in 'DSnapJsonServer_MainForm.pas' {Form1}, 6 | DSnapJsonServer_Methods in 'DSnapJsonServer_Methods.pas', 7 | DSnapJsonServer_Container in 'DSnapJsonServer_Container.pas' {ServerContainer1: TDataModule}, 8 | DSnapJson_MyData in 'DSnapJson_MyData.pas', 9 | DSnapJsonClient_Proxy in 'DSnapJsonClient_Proxy.pas'; 10 | 11 | {$R *.res} 12 | 13 | begin 14 | Application.Initialize; 15 | Application.MainFormOnTaskbar := True; 16 | Application.CreateForm(TForm1, Form1); 17 | Application.CreateForm(TServerContainer1, ServerContainer1); 18 | Application.Run; 19 | end. 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /02/CustomVisualizers/CustomVisualizers.dpk: -------------------------------------------------------------------------------- 1 | package CustomVisualizers; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$IMPLICITBUILD ON} 26 | 27 | requires 28 | rtl, 29 | designide; 30 | 31 | contains 32 | Ucs4CharVisualizer in 'Ucs4CharVisualizer.pas'; 33 | 34 | end. 35 | -------------------------------------------------------------------------------- /06/InertiaBall/InertiaBall_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object InertiaForm: TInertiaForm 2 | Left = 0 3 | Top = 0 4 | BorderStyle = bsSingle 5 | Caption = 'InertiaBall' 6 | ClientHeight = 575 7 | ClientWidth = 813 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'Tahoma' 13 | Font.Style = [] 14 | OldCreateOrder = False 15 | OnCreate = FormCreate 16 | OnMouseDown = FormMouseDown 17 | OnMouseMove = FormMouseMove 18 | OnMouseUp = FormMouseUp 19 | OnPaint = FormPaint 20 | PixelsPerInch = 96 21 | TextHeight = 13 22 | object Timer1: TTimer 23 | Interval = 100 24 | OnTimer = Timer1Timer 25 | Left = 272 26 | Top = 152 27 | end 28 | end 29 | -------------------------------------------------------------------------------- /03/TValueTest/TValueTestMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'TValueTest' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 btnNoConvert: TButton 17 | Left = 8 18 | Top = 14 19 | Width = 105 20 | Height = 25 21 | Caption = 'btnNoConvert' 22 | TabOrder = 0 23 | OnClick = btnNoConvertClick 24 | end 25 | object Memo1: TMemo 26 | Left = 128 27 | Top = 16 28 | Width = 409 29 | Height = 257 30 | TabOrder = 1 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /05/GetOSVersion/GetOSVersionForm.dfm: -------------------------------------------------------------------------------- 1 | object Form8: TForm8 2 | Left = 0 3 | Top = 0 4 | Caption = 'GetOSVersion' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 btnGetVersion: TButton 17 | Left = 32 18 | Top = 22 19 | Width = 75 20 | Height = 25 21 | Caption = 'Get Version' 22 | TabOrder = 0 23 | OnClick = btnGetVersionClick 24 | end 25 | object Memo1: TMemo 26 | Left = 128 27 | Top = 24 28 | Width = 305 29 | Height = 241 30 | TabOrder = 1 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /01/CustomInsight/CustomInsight.dpk: -------------------------------------------------------------------------------- 1 | package CustomInsight; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$IMPLICITBUILD ON} 26 | 27 | requires 28 | rtl, 29 | designide; 30 | 31 | contains 32 | CustomInsightCode in 'CustomInsightCode.pas', 33 | NoInspectorDescriptionPane in 'NoInspectorDescriptionPane.pas'; 34 | 35 | end. 36 | -------------------------------------------------------------------------------- /03/XmlPersist/XmlPersistRtti_Classes.pas: -------------------------------------------------------------------------------- 1 | unit XmlPersistRtti_Classes; 2 | 3 | interface 4 | 5 | uses 6 | Classes; 7 | 8 | type 9 | TNewPerson = class 10 | private 11 | FName: string; 12 | FCountry: string; 13 | published 14 | property Name: string read FName write FName; 15 | property Country: string read FCountry write FCountry; 16 | end; 17 | 18 | TNewCompany = class 19 | private 20 | FName: string; 21 | FCountry: string; 22 | FID: string; 23 | FPerson: TNewPerson; 24 | published 25 | property Name: string read FName write FName; 26 | property Country: string read FCountry write FCountry; 27 | property ID: string read FID write FID; 28 | property Boss: TNewPerson read FPerson write FPerson; 29 | end; 30 | 31 | implementation 32 | 33 | end. 34 | -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersistPublish_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 290 6 | ClientWidth = 554 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 Button1: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 105 20 | Height = 25 21 | Caption = 'Button1' 22 | TabOrder = 0 23 | OnClick = Button1Click 24 | end 25 | object Memo1: TMemo 26 | Left = 168 27 | Top = 8 28 | Width = 378 29 | Height = 274 30 | Lines.Strings = ( 31 | 'Memo1') 32 | TabOrder = 1 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /01/CustomInsight/NoInspectorDescriptionPane.pas: -------------------------------------------------------------------------------- 1 | unit NoInspectorDescriptionPane; 2 | 3 | interface 4 | 5 | procedure Register; 6 | 7 | implementation 8 | 9 | uses 10 | Forms, Classes, Controls, Dialogs; 11 | 12 | function FindObjectInspector: TComponent; 13 | var 14 | I: Integer; 15 | begin 16 | Result := nil; 17 | for I := 0 to Screen.FormCount - 1 do 18 | if Screen.Forms [I].ClassName = 'TPropertyInspector' then 19 | Exit (Screen.Forms [I]); 20 | end; 21 | 22 | procedure Register; 23 | var 24 | aComp: TComponent; 25 | begin 26 | aComp := FindObjectInspector; 27 | if Assigned (aComp) then 28 | begin 29 | aComp := aComp.FindComponent('DescriptionPane'); 30 | if Assigned (aComp) then 31 | begin 32 | (aComp as TControl).Height := 0; 33 | end; 34 | end; 35 | end; 36 | 37 | end. 38 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter01.dpk: -------------------------------------------------------------------------------- 1 | package DSnapFilter01; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO ON} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION ON} 15 | {$OVERFLOWCHECKS OFF} 16 | {$RANGECHECKS OFF} 17 | {$REFERENCEINFO OFF} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES OFF} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$IMPLICITBUILD ON} 26 | 27 | requires 28 | rtl, 29 | dbrtl, 30 | dsnap, 31 | IndyCore, 32 | IndySystem, 33 | IndyProtocols, 34 | DbxCommonDriver, 35 | DbxClientDriver; 36 | 37 | contains 38 | DSnapFilter64 in 'DSnapFilter64.pas'; 39 | 40 | end. 41 | -------------------------------------------------------------------------------- /03/XmlPersist/XmlPersistPublish_Classes.pas: -------------------------------------------------------------------------------- 1 | unit XmlPersistPublish_Classes; 2 | 3 | interface 4 | 5 | uses 6 | Classes; 7 | 8 | type 9 | TPerson = class (TPersistent) 10 | private 11 | FName: string; 12 | FCountry: string; 13 | published 14 | property Name: string read FName write FName; 15 | property Country: string read FCountry write FCountry; 16 | end; 17 | 18 | TCompany = class (TPersistent) 19 | private 20 | FName: string; 21 | FCountry: string; 22 | FID: string; 23 | FPerson: TPerson; 24 | published 25 | property Name: string read FName write FName; 26 | property Country: string read FCountry write FCountry; 27 | property ID: string read FID write FID; 28 | property Boss: TPerson read FPerson write FPerson; 29 | end; 30 | 31 | 32 | implementation 33 | 34 | 35 | end. 36 | -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersistPublish_Classes.pas: -------------------------------------------------------------------------------- 1 | unit XmlPersistPublish_Classes; 2 | 3 | interface 4 | 5 | uses 6 | Classes; 7 | 8 | type 9 | TPerson = class (TPersistent) 10 | private 11 | FName: string; 12 | FCountry: string; 13 | published 14 | property Name: string read FName write FName; 15 | property Country: string read FCountry write FCountry; 16 | end; 17 | 18 | TCompany = class (TPersistent) 19 | private 20 | FName: string; 21 | FCountry: string; 22 | FID: string; 23 | FPerson: TPerson; 24 | published 25 | property Name: string read FName write FName; 26 | property Country: string read FCountry write FCountry; 27 | property ID: string read FID write FID; 28 | property Person: TPerson read FPerson write FPerson; 29 | end; 30 | 31 | 32 | implementation 33 | 34 | 35 | end. 36 | -------------------------------------------------------------------------------- /04/DelayedLoading/DelayedLoadingMainForm.pas: -------------------------------------------------------------------------------- 1 | unit DelayedLoadingMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | btnCall: TButton; 12 | procedure btnCallClick(Sender: TObject); 13 | private 14 | { Private declarations } 15 | public 16 | { Public declarations } 17 | end; 18 | 19 | var 20 | Form39: TForm39; 21 | 22 | implementation 23 | 24 | {$R *.dfm} 25 | 26 | procedure TForm39.btnCallClick(Sender: TObject); 27 | var 28 | aPoint: TPoint; 29 | hwnd: THandle; 30 | begin 31 | aPoint := Point (100, 100); 32 | if CheckWin32Version (6, 0) then 33 | begin 34 | hwnd := WindowFromPhysicalPoint (aPoint); 35 | ShowMessage (IntToStr (hwnd)); 36 | end; 37 | end; 38 | 39 | end. 40 | -------------------------------------------------------------------------------- /03/DescriptionAttribute/DescriptionAttribute_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormDescrAttr: TFormDescrAttr 2 | Left = 0 3 | Top = 0 4 | Caption = 'DescriptionAttributes' 5 | ClientHeight = 201 6 | ClientWidth = 578 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 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object ListView1: TListView 18 | Left = 24 19 | Top = 16 20 | Width = 537 21 | Height = 169 22 | Columns = < 23 | item 24 | Caption = 'ID' 25 | Width = 150 26 | end 27 | item 28 | AutoSize = True 29 | Caption = 'Description' 30 | end> 31 | TabOrder = 0 32 | ViewStyle = vsReport 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /03/MiniPack/MiniForm.pas: -------------------------------------------------------------------------------- 1 | unit MiniForm; 2 | 3 | interface 4 | 5 | {$WARN UNIT_PLATFORM OFF} 6 | 7 | uses 8 | Windows, Forms; 9 | 10 | type 11 | TForm1 = class(TForm) 12 | procedure FormCreate(Sender: TObject); 13 | private 14 | { Private declarations } 15 | public 16 | { Public declarations } 17 | end; 18 | 19 | var 20 | Form1: TForm1; 21 | 22 | implementation 23 | 24 | {$R *.DFM} 25 | 26 | procedure TForm1.FormCreate(Sender: TObject); 27 | var 28 | nSize: Integer; 29 | hFile: THandle; 30 | strSize: String; 31 | begin 32 | hFile := CreateFile (PChar (ParamStr (0)), 33 | 0, FILE_SHARE_READ, nil, OPEN_EXISTING, 0, 0); 34 | nSize := GetFileSize (hFile, nil); 35 | CloseHandle (hFile); 36 | 37 | SetLength (strSize, 20); 38 | Str (nSize, strSize); 39 | 40 | Caption := 'Size = ' + strSize; 41 | end; 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /04/ObjFromIntf/ObjFromIntfMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'ObjFromIntf' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 btnSimpleTest: TButton 17 | Left = 56 18 | Top = 48 19 | Width = 185 20 | Height = 25 21 | Caption = 'btnSimpleTest' 22 | TabOrder = 0 23 | OnClick = btnSimpleTestClick 24 | end 25 | object btnRefCountIssue: TButton 26 | Left = 56 27 | Top = 88 28 | Width = 185 29 | Height = 25 30 | Caption = 'btnRefCountIssue' 31 | TabOrder = 1 32 | OnClick = btnRefCountIssueClick 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /07/DbxMulti2010/DbGridFix.pas: -------------------------------------------------------------------------------- 1 | unit DbGridFix; 2 | 3 | interface 4 | 5 | uses 6 | DBGrids; 7 | 8 | type 9 | TDBGrid = class (DbGrids.TDBGrid) 10 | protected 11 | procedure Paint; override; 12 | end; 13 | 14 | implementation 15 | 16 | { TDBGrid } 17 | 18 | uses 19 | Rtti; 20 | 21 | procedure TDBGrid.Paint; 22 | var 23 | oldEditorMode: TValue; 24 | context: TRttiCOntext; 25 | editorModeField: TRttiField; 26 | begin 27 | editorModeField := context.GetType(TDbGrid).GetField('FEditorMode'); 28 | if Assigned (editorModeField) then 29 | begin 30 | oldEditorMode := editorModeField.GetValue(self); 31 | editorModeField.SetValue(self, TValue.From(False)); 32 | end; 33 | 34 | // now paint 35 | inherited; 36 | 37 | if Assigned (editorModeField) then 38 | editorModeField.SetValue(self, oldEditorMode); 39 | end; 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /02/MoveIP/MoveIPMainForm.pas: -------------------------------------------------------------------------------- 1 | unit MoveIPMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | Button1: TButton; 12 | procedure Button1Click(Sender: TObject); 13 | procedure FormClick(Sender: TObject); 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | end; 19 | 20 | var 21 | Form39: TForm39; 22 | 23 | implementation 24 | 25 | {$R *.dfm} 26 | 27 | procedure TForm39.Button1Click(Sender: TObject); 28 | var 29 | X, Y: Integer; 30 | begin 31 | X := 100; 32 | Y := 50; 33 | Left := X; 34 | Top := Y; 35 | X := X + Y; 36 | (Sender as TButton).Caption := IntToStr (X); 37 | end; 38 | 39 | procedure TForm39.FormClick(Sender: TObject); 40 | begin 41 | Left := 10; 42 | end; 43 | 44 | end. 45 | -------------------------------------------------------------------------------- /08/Rest1/Rest1_WebModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule3: TWebModule3 2 | OldCreateOrder = False 3 | OnCreate = WebModuleCreate 4 | Actions = < 5 | item 6 | Default = True 7 | Name = 'actionEcho' 8 | PathInfo = '/Echo' 9 | OnAction = actionEchoAction 10 | end 11 | item 12 | Name = 'actionCustomers' 13 | PathInfo = '/Customers' 14 | OnAction = actionCustomersAction 15 | end 16 | item 17 | Name = 'actionCustData' 18 | PathInfo = '/CustData' 19 | OnAction = actionCustDataAction 20 | end 21 | item 22 | Name = 'actionCustomer' 23 | PathInfo = '/Customer/*' 24 | OnAction = actionCustomerAction 25 | end> 26 | Height = 245 27 | Width = 328 28 | object cdsCustomers: TClientDataSet 29 | Aggregates = <> 30 | FileName = 'customer.cds' 31 | Params = <> 32 | Left = 152 33 | Top = 104 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /06/KeyboardTest/KeyboardTest_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit KeyboardTest_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, Keyboard, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TKeyboardForm = class(TForm) 11 | TouchKeyboard1: TTouchKeyboard; 12 | LabeledEdit1: TLabeledEdit; 13 | LabeledEdit2: TLabeledEdit; 14 | btnTest: TButton; 15 | procedure btnTestClick(Sender: TObject); 16 | private 17 | { Private declarations } 18 | public 19 | { Public declarations } 20 | end; 21 | 22 | var 23 | KeyboardForm: TKeyboardForm; 24 | 25 | implementation 26 | 27 | {$R *.dfm} 28 | 29 | procedure TKeyboardForm.btnTestClick(Sender: TObject); 30 | var 31 | code: UINT; 32 | begin 33 | LoadkeyboardLayout ('00000409', KLF_ACTIVATE); 34 | 35 | code := MapVirtualKey(43, MAPVK_VSC_TO_VK); 36 | ShowMessage (inttostr (code)); 37 | end; 38 | 39 | end. 40 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/Fsrs_ServerClass.pas: -------------------------------------------------------------------------------- 1 | unit Fsrs_ServerClass; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer; 7 | 8 | type 9 | TServerMethods1 = class(TDSServerModule) 10 | private 11 | { Private declarations } 12 | public 13 | { Public declarations } 14 | function EchoString(Value: string): string; 15 | function TestParams (Value: string; var another: string): string; 16 | end; 17 | 18 | var 19 | ServerMethods1: TServerMethods1; 20 | 21 | implementation 22 | 23 | {$R *.dfm} 24 | 25 | function TServerMethods1.EchoString(Value: string): string; 26 | begin 27 | Result := Value + '...' + 28 | Copy (Value, 2, maxint) + '...' + 29 | Copy (Value, Length (Value) - 1, 2); 30 | end; 31 | 32 | function TServerMethods1.TestParams(Value: string; var another: string): string; 33 | begin 34 | Another := another + '*'; 35 | Result := Value + another; 36 | end; 37 | 38 | end. 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /03/XmlPersist/XmlPersistAttrib_Classes.pas: -------------------------------------------------------------------------------- 1 | unit XmlPersistAttrib_Classes; 2 | 3 | interface 4 | 5 | uses 6 | Classes, TrivialXmlWriter; 7 | 8 | type 9 | TAttrPerson = class 10 | private 11 | [xml ('Name')] 12 | FName: string; 13 | [xml] 14 | FCountry: string; 15 | published 16 | property Name: string read FName write FName; 17 | property Country: string read FCountry write FCountry; 18 | end; 19 | 20 | TAttrCompany = class 21 | private 22 | [xml ('CompanyName')] 23 | FName: string; 24 | [xml ('Country')] 25 | FCountry: string; 26 | FID: string; // omitted 27 | [xml ('TheBoss')] 28 | FPerson: TAttrPerson; 29 | published 30 | property Name: string read FName write FName; 31 | property Country: string read FCountry write FCountry; 32 | property ID: string read FID write FID; 33 | property Boss: TAttrPerson read FPerson write FPerson; 34 | end; 35 | 36 | implementation 37 | 38 | end. 39 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule2: TWebModule2 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule2DefaultHandlerAction 9 | end> 10 | Height = 230 11 | Width = 415 12 | object DSServer1: TDSServer 13 | AutoStart = True 14 | HideDSAdmin = False 15 | Left = 96 16 | Top = 11 17 | end 18 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 19 | RESTContext = 'rest' 20 | Server = DSServer1 21 | DSHostname = 'localhost' 22 | DSPort = 211 23 | Filters = <> 24 | WebDispatch.MethodType = mtAny 25 | WebDispatch.PathInfo = 'datasnap*' 26 | Left = 96 27 | Top = 75 28 | end 29 | object DSServerClass1: TDSServerClass 30 | OnGetClass = DSServerClass1GetClass 31 | Server = DSServer1 32 | LifeCycle = 'Session' 33 | Left = 200 34 | Top = 11 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer_WebModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule2: TWebModule2 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule2DefaultHandlerAction 9 | end> 10 | Height = 230 11 | Width = 415 12 | object DSServer1: TDSServer 13 | AutoStart = True 14 | HideDSAdmin = False 15 | Left = 96 16 | Top = 11 17 | end 18 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 19 | RESTContext = 'rest' 20 | Server = DSServer1 21 | DSHostname = 'localhost' 22 | DSPort = 211 23 | Filters = <> 24 | WebDispatch.MethodType = mtAny 25 | WebDispatch.PathInfo = 'datasnap*' 26 | Left = 96 27 | Top = 75 28 | end 29 | object DSServerClass1: TDSServerClass 30 | OnGetClass = DSServerClass1GetClass 31 | Server = DSServer1 32 | LifeCycle = 'Session' 33 | Left = 200 34 | Top = 11 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer_Class.dfm: -------------------------------------------------------------------------------- 1 | object WebModule2: TWebModule2 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule2DefaultHandlerAction 9 | end> 10 | Height = 230 11 | Width = 415 12 | object DSServer1: TDSServer 13 | AutoStart = True 14 | HideDSAdmin = False 15 | Left = 96 16 | Top = 11 17 | end 18 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 19 | RESTContext = 'rest' 20 | Server = DSServer1 21 | DSHostname = 'localhost' 22 | DSPort = 211 23 | Filters = <> 24 | WebDispatch.MethodType = mtAny 25 | WebDispatch.PathInfo = 'datasnap*' 26 | Left = 96 27 | Top = 75 28 | end 29 | object DSServerClass1: TDSServerClass 30 | OnGetClass = DSServerClass1GetClass 31 | Server = DSServer1 32 | LifeCycle = 'Session' 33 | Left = 200 34 | Top = 11 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /02/NamedThreads/MyThreadClass.pas: -------------------------------------------------------------------------------- 1 | unit MyThreadClass; 2 | 3 | interface 4 | 5 | uses 6 | Classes {$IFDEF MSWINDOWS} , Windows {$ENDIF}; 7 | 8 | type 9 | TMyThread = class(TThread) 10 | protected 11 | procedure Execute; override; 12 | end; 13 | 14 | function CurrentTimeAsStr: string; 15 | 16 | implementation 17 | 18 | uses 19 | NamedThreadsMainForm, SysUtils; 20 | 21 | function CurrentTimeAsStr: string; 22 | begin 23 | Result := TimeToStr (Now); 24 | end; 25 | 26 | { TMyThread } 27 | 28 | procedure TMyThread.Execute; 29 | var 30 | strTime: String; 31 | begin 32 | NameThreadForDebugging('MyThread'); 33 | FreeOnTerminate := True; 34 | { Place thread code here } 35 | while not Terminated do 36 | begin 37 | sleep (1000); 38 | strTime := CurrentTimeAsStr; // function executed in thread context 39 | Synchronize(procedure () 40 | begin 41 | FormNamedThreads.Log ('MyThread: ' + strTime); 42 | end) 43 | end; 44 | end; 45 | 46 | end. 47 | -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer_WebModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule2: TWebModule2 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule2DefaultHandlerAction 9 | end> 10 | Height = 230 11 | Width = 415 12 | object DSServer1: TDSServer 13 | AutoStart = True 14 | HideDSAdmin = False 15 | Left = 96 16 | Top = 11 17 | end 18 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 19 | RESTContext = 'rest' 20 | Server = DSServer1 21 | DSHostname = 'localhost' 22 | DSPort = 211 23 | Filters = <> 24 | WebDispatch.MethodType = mtAny 25 | WebDispatch.PathInfo = 'datasnap*' 26 | Left = 96 27 | Top = 75 28 | end 29 | object DSServerClass1: TDSServerClass 30 | OnGetClass = DSServerClass1GetClass 31 | Server = DSServer1 32 | LifeCycle = 'Session' 33 | Left = 200 34 | Top = 11 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer_Container.pas: -------------------------------------------------------------------------------- 1 | unit DSnapJsonServer_Container; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, 7 | DSTCPServerTransport, 8 | DSServer, DSCommonServer; 9 | 10 | type 11 | TServerContainer1 = class(TDataModule) 12 | DSServer1: TDSServer; 13 | DSTCPServerTransport1: TDSTCPServerTransport; 14 | DSServerClass1: TDSServerClass; 15 | procedure DSServerClass1GetClass(DSServerClass: TDSServerClass; 16 | var PersistentClass: TPersistentClass); 17 | private 18 | { Private declarations } 19 | public 20 | end; 21 | 22 | var 23 | ServerContainer1: TServerContainer1; 24 | 25 | implementation 26 | 27 | uses 28 | DSnapJsonServer_Methods; 29 | 30 | {$R *.dfm} 31 | 32 | procedure TServerContainer1.DSServerClass1GetClass( 33 | DSServerClass: TDSServerClass; var PersistentClass: TPersistentClass); 34 | begin 35 | PersistentClass := DSnapJsonServer_Methods.TDSnapJsonMethods; 36 | end; 37 | 38 | end. 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_ClientForm.pas: -------------------------------------------------------------------------------- 1 | unit DSnapFilter_ClientForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, WideStrings, DbxDatasnap, FMTBcd, StdCtrls, DB, SqlExpr; 8 | 9 | type 10 | TForm3 = class(TForm) 11 | SQLConnection1: TSQLConnection; 12 | SqlServerMethod1: TSqlServerMethod; 13 | Button1: TButton; 14 | procedure Button1Click(Sender: TObject); 15 | private 16 | { Private declarations } 17 | public 18 | { Public declarations } 19 | end; 20 | 21 | var 22 | Form3: TForm3; 23 | 24 | implementation 25 | 26 | {$R *.dfm} 27 | 28 | uses 29 | DSHttpLayer, DbxCompressionFilter; 30 | 31 | 32 | procedure TForm3.Button1Click(Sender: TObject); 33 | begin 34 | SQLConnection1.Connected := True; 35 | SqlServerMethod1.Params[0].AsString := 'This is my name'; 36 | SqlServerMethod1.ExecuteMethod; 37 | ShowMessage (SqlServerMethod1.Params[1].AsString); 38 | end; 39 | 40 | end. 41 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapServerMethods.pas: -------------------------------------------------------------------------------- 1 | unit DSnapServerMethods; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer, Provider, DB, DBClient, WideStrings, DBXFirebird, 7 | FMTBcd, SqlExpr; 8 | 9 | type 10 | TServerMethods1 = class(TDSServerModule) 11 | DataSetProvider1: TDataSetProvider; 12 | FBCONNECTION: TSQLConnection; 13 | CUSTOMER: TSQLDataSet; 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | function EchoString(Value: string): string; 19 | function GetDataSet: TDataset; 20 | end; 21 | 22 | var 23 | ServerMethods1: TServerMethods1; 24 | 25 | implementation 26 | 27 | {$R *.dfm} 28 | 29 | function TServerMethods1.EchoString(Value: string): string; 30 | begin 31 | Result := Value + ' ' + Value; 32 | end; 33 | 34 | function TServerMethods1.GetDataSet: TDataset; 35 | begin 36 | // cannot convert to JSON type 37 | CUSTOMER.Open; 38 | Result := CUSTOMER; 39 | end; 40 | 41 | end. 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /03/RttiIntro/RttiIntro_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormRttiIntro: TFormRttiIntro 2 | Left = 0 3 | Top = 0 4 | Caption = 'RttiIntro' 5 | ClientHeight = 290 6 | ClientWidth = 554 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 btnInfo: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 75 20 | Height = 25 21 | Caption = 'btnInfo' 22 | TabOrder = 0 23 | OnClick = btnInfoClick 24 | end 25 | object Memo1: TMemo 26 | Left = 89 27 | Top = 8 28 | Width = 448 29 | Height = 274 30 | Lines.Strings = ( 31 | 'Memo1') 32 | TabOrder = 1 33 | end 34 | object btnChange: TButton 35 | Left = 8 36 | Top = 39 37 | Width = 75 38 | Height = 25 39 | Caption = 'btnChange' 40 | TabOrder = 2 41 | OnClick = btnChangeClick 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /05/D2DIntro/D2DIntro_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object D2DForm: TD2DForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'D2DIntro' 5 | ClientHeight = 513 6 | ClientWidth = 554 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 | PopupMenu = PopupMenu1 15 | OnCreate = FormCreate 16 | OnPaint = FormPaint 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object PopupMenu1: TPopupMenu 20 | Left = 24 21 | Top = 16 22 | object FromCanvas1: TMenuItem 23 | AutoCheck = True 24 | Caption = 'Form Canvas' 25 | Checked = True 26 | GroupIndex = 1 27 | RadioItem = True 28 | OnClick = FromCanvas1Click 29 | end 30 | object FormHandle1: TMenuItem 31 | AutoCheck = True 32 | Caption = 'Form Handle' 33 | GroupIndex = 1 34 | RadioItem = True 35 | OnClick = FormHandle1Click 36 | end 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /07/DSnapHttpConsole/ServerContainerUnit1.dfm: -------------------------------------------------------------------------------- 1 | object ServerContainer1: TServerContainer1 2 | OldCreateOrder = False 3 | Height = 271 4 | Width = 415 5 | object DSServer1: TDSServer 6 | AutoStart = True 7 | HideDSAdmin = False 8 | Left = 96 9 | Top = 11 10 | end 11 | object DSHTTPService1: TDSHTTPService 12 | RESTContext = 'rest' 13 | Server = DSServer1 14 | DSHostname = 'localhost' 15 | DSPort = 211 16 | Filters = <> 17 | AuthenticationManager = DSHTTPServiceAuthenticationManager1 18 | HttpPort = 8090 19 | Active = False 20 | Left = 96 21 | Top = 135 22 | end 23 | object DSHTTPServiceAuthenticationManager1: TDSHTTPServiceAuthenticationManager 24 | HTTPAuthenticate = DSHTTPServiceAuthenticationManager1HTTPAuthenticate 25 | Left = 96 26 | Top = 197 27 | end 28 | object DSServerClass1: TDSServerClass 29 | OnGetClass = DSServerClass1GetClass 30 | Server = DSServer1 31 | LifeCycle = 'Session' 32 | Left = 200 33 | Top = 11 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /02/DebugVisual/DebugVisualMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'DebugVisual' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 Button1: TButton 17 | Left = 64 18 | Top = 48 19 | Width = 137 20 | Height = 25 21 | Caption = 'btnDateTime' 22 | TabOrder = 0 23 | OnClick = Button1Click 24 | end 25 | object Button2: TButton 26 | Left = 64 27 | Top = 88 28 | Width = 137 29 | Height = 25 30 | Caption = 'btnStringList' 31 | TabOrder = 1 32 | OnClick = Button2Click 33 | end 34 | object btnUcs4Char: TButton 35 | Left = 64 36 | Top = 128 37 | Width = 137 38 | Height = 25 39 | Caption = 'btnUcs4Char' 40 | TabOrder = 2 41 | OnClick = btnUcs4CharClick 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /05/Win7Taskbar/TaskbarSupportUnit.pas: -------------------------------------------------------------------------------- 1 | unit TaskbarSupportUnit; 2 | 3 | interface 4 | 5 | uses 6 | Classes, SysUtils, ComObj, ShlObj, ObjectArray; 7 | 8 | type 9 | TTaskBarSupport = class 10 | public 11 | TaskbarList: ITaskbarList; 12 | TaskbarList2: ITaskbarList2; 13 | TaskbarList3: ITaskbarList3; 14 | public 15 | constructor Create; 16 | procedure InitTaskbarSupport; 17 | end; 18 | 19 | var 20 | TaskbarSupport: TTaskBarSupport; 21 | 22 | implementation 23 | 24 | { TTaskBarSupport } 25 | 26 | constructor TTaskBarSupport.Create; 27 | begin 28 | InitTaskbarSupport; 29 | end; 30 | 31 | procedure TTaskBarSupport.InitTaskbarSupport; 32 | begin 33 | TaskbarList := CreateComObject(CLSID_TaskbarList) as ITaskbarList; 34 | TaskbarList.HrInit; 35 | Supports(TaskbarList, IID_ITaskbarList2, TaskbarList2); 36 | Supports(TaskbarList, IID_ITaskbarList3, TaskbarList3); 37 | end; 38 | 39 | initialization 40 | TaskbarSupport := TTaskBarSupport.Create; 41 | 42 | finalization 43 | TaskbarSupport.Free; 44 | 45 | end. 46 | -------------------------------------------------------------------------------- /04/StopWatchTest/StopWatchTestMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'StopWatchTest' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object Memo1: TMemo 18 | Left = 176 19 | Top = 24 20 | Width = 337 21 | Height = 249 22 | Lines.Strings = ( 23 | 'Memo1') 24 | TabOrder = 0 25 | end 26 | object btnTest: TButton 27 | Left = 32 28 | Top = 24 29 | Width = 97 30 | Height = 25 31 | Caption = 'btnTest' 32 | TabOrder = 1 33 | OnClick = btnTestClick 34 | end 35 | object btnCondensed: TButton 36 | Left = 32 37 | Top = 72 38 | Width = 97 39 | Height = 25 40 | Caption = 'btnCondensed' 41 | TabOrder = 2 42 | OnClick = btnCondensedClick 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /05/D2DLinesSpeed/D2DLinesSpeed_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'D2DLinesSpeed' 5 | ClientHeight = 127 6 | ClientWidth = 395 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 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object Button1: TButton 18 | Left = 144 19 | Top = 8 20 | Width = 75 21 | Height = 25 22 | Caption = 'Button1' 23 | TabOrder = 0 24 | OnClick = Button1Click 25 | end 26 | object Button2: TButton 27 | Left = 144 28 | Top = 64 29 | Width = 75 30 | Height = 25 31 | Caption = 'Button2' 32 | TabOrder = 1 33 | OnClick = Button2Click 34 | end 35 | object Button3: TButton 36 | Left = 280 37 | Top = 48 38 | Width = 75 39 | Height = 25 40 | Caption = 'Button3' 41 | TabOrder = 2 42 | OnClick = Button3Click 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_WebModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule3: TWebModule3 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule3DefaultHandlerAction 9 | end> 10 | Height = 230 11 | Width = 415 12 | object DSServer1: TDSServer 13 | AutoStart = True 14 | HideDSAdmin = False 15 | Left = 96 16 | Top = 11 17 | end 18 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 19 | RESTContext = 'rest' 20 | Server = DSServer1 21 | DSHostname = 'localhost' 22 | DSPort = 211 23 | Filters = < 24 | item 25 | FilterId = 'Cantools.MimeFilter' 26 | end> 27 | WebDispatch.MethodType = mtAny 28 | WebDispatch.PathInfo = 'datasnap*' 29 | Left = 96 30 | Top = 75 31 | end 32 | object DSServerClass1: TDSServerClass 33 | OnGetClass = DSServerClass1GetClass 34 | Server = DSServer1 35 | LifeCycle = 'Session' 36 | Left = 200 37 | Top = 11 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /07/DSnapGateway/DSnapGateway_WebModule.pas: -------------------------------------------------------------------------------- 1 | unit DSnapGateway_WebModule; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, HTTPApp, DSHTTP, DSHTTPCommon, DSHTTPWebBroker, DSServer, 7 | DSCommonServer; 8 | 9 | type 10 | TWebModule3 = class(TWebModule) 11 | DSHTTPWebDispatcher1: TDSHTTPWebDispatcher; 12 | procedure WebModule3DefaultHandlerAction(Sender: TObject; 13 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | end; 19 | 20 | var 21 | WebModule3: TWebModule3; 22 | 23 | implementation 24 | 25 | uses WebReq; 26 | 27 | {$R *.dfm} 28 | 29 | procedure TWebModule3.WebModule3DefaultHandlerAction(Sender: TObject; 30 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 31 | begin 32 | Response.Content := 'DataSnap Server'; 33 | end; 34 | 35 | initialization 36 | WebRequestHandler.WebModuleClass := TWebModule3; 37 | 38 | end. 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /03/TValueTest/TValueTestMainForm.pas: -------------------------------------------------------------------------------- 1 | unit TValueTestMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | btnNoConvert: TButton; 12 | Memo1: TMemo; 13 | procedure btnNoConvertClick(Sender: TObject); 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | procedure Log (const strMsg: string); 19 | end; 20 | 21 | var 22 | Form39: TForm39; 23 | 24 | implementation 25 | 26 | {$R *.dfm} 27 | 28 | uses 29 | Rtti; 30 | 31 | procedure TForm39.btnNoConvertClick(Sender: TObject); 32 | var 33 | v1: TValue; 34 | begin 35 | // v1 := 100; 36 | v1 := TValue.From(100); 37 | if v1.IsOrdinal then 38 | Log (IntToStr (v1.AsInteger)); 39 | if v1.IsType then 40 | Log (v1.AsString); 41 | Log (v1.ToString); 42 | end; 43 | 44 | procedure TForm39.Log(const strMsg: string); 45 | begin 46 | Memo1.Lines.Add (strMsg); 47 | end; 48 | 49 | end. 50 | -------------------------------------------------------------------------------- /05/FileAccess/FileAccessCopy.dpr: -------------------------------------------------------------------------------- 1 | program FileAccessCopy; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | uses 6 | SysUtils, Classes; 7 | 8 | var 9 | strIn, strOut: TFileStream; 10 | 11 | begin 12 | try 13 | if ParamCount <> 2 then 14 | begin 15 | writeln ('Two parameters required'); 16 | Exit; 17 | end; 18 | 19 | writeln ('reading... ' + ParamStr (1)); 20 | strIn := TFileStream.Create (ParamStr (1), fmOpenRead); 21 | try 22 | writeln ('writing... ' + ParamStr (2)); 23 | if FileExists (ParamStr (2)) then 24 | strOut := TFileStream.Create (ParamStr (2), fmOpenWrite) 25 | else 26 | strOut := TFileStream.Create (ParamStr (2), fmCreate); 27 | try 28 | strOut.CopyFrom(strIn, strIn.Size); 29 | finally 30 | strOut.Free; 31 | end; 32 | finally 33 | strIn.Free; 34 | end; 35 | writeln ('Operation completed. Press Enter to close.'); 36 | except 37 | on E:Exception do 38 | Writeln(E.Classname, ': ', E.Message); 39 | end; 40 | readln; 41 | end. 42 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/Unit2.pas: -------------------------------------------------------------------------------- 1 | unit Unit2; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, WideStrings, DbxDatasnap, FMTBcd, DBClient, DSConnect, DB, SqlExpr, 8 | Grids, DBGrids, StdCtrls, 9 | 10 | // AND THIS IS VERY IMPORTANT! 11 | DSHTTPLayer; 12 | 13 | type 14 | TForm2 = class(TForm) 15 | ClientDataSet1: TClientDataSet; 16 | SQLConnection1: TSQLConnection; 17 | SqlServerMethod1: TSqlServerMethod; 18 | DSProviderConnection1: TDSProviderConnection; 19 | DataSource1: TDataSource; 20 | DBGrid1: TDBGrid; 21 | Button1: TButton; 22 | procedure Button1Click(Sender: TObject); 23 | private 24 | { Private declarations } 25 | public 26 | { Public declarations } 27 | end; 28 | 29 | var 30 | Form2: TForm2; 31 | 32 | implementation 33 | 34 | {$R *.dfm} 35 | 36 | procedure TForm2.Button1Click(Sender: TObject); 37 | begin 38 | SqlServerMethod1.ExecuteMethod; 39 | ShowMessage (SqlServerMethod1.Params[1].AsString); 40 | end; 41 | 42 | end. 43 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/Fsrs_DataModule.dfm: -------------------------------------------------------------------------------- 1 | object WebModule2: TWebModule2 2 | OldCreateOrder = False 3 | Actions = < 4 | item 5 | Default = True 6 | Name = 'DefaultHandler' 7 | PathInfo = '/' 8 | OnAction = WebModule2DefaultHandlerAction 9 | end 10 | item 11 | Name = 'WebActionItem1' 12 | PathInfo = '/file' 13 | OnAction = WebModule2WebActionItem1Action 14 | end> 15 | Height = 230 16 | Width = 415 17 | object DSServer1: TDSServer 18 | AutoStart = True 19 | HideDSAdmin = False 20 | Left = 96 21 | Top = 11 22 | end 23 | object DSHTTPWebDispatcher1: TDSHTTPWebDispatcher 24 | RESTContext = 'rest' 25 | Server = DSServer1 26 | DSHostname = 'localhost' 27 | DSPort = 211 28 | Filters = <> 29 | WebDispatch.MethodType = mtAny 30 | WebDispatch.PathInfo = 'datasnap*' 31 | Left = 96 32 | Top = 75 33 | end 34 | object DSServerClass1: TDSServerClass 35 | OnGetClass = DSServerClass1GetClass 36 | Server = DSServer1 37 | LifeCycle = 'Session' 38 | Left = 200 39 | Top = 11 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /03/ExeSizeTest/Utf8Text.txt: -------------------------------------------------------------------------------- 1 | Ç'është Unicode? 2 | ዩኒኮድ ምንድን ነው? 3 | ما هي الشفرة الموحدة "يونِكود" ؟ 4 | ইউনিকোড কী? 5 | ዩኒኮድ ውረኒ ግን? 6 | Какво е Unicode ? 7 | 什麽是Unicode(統一碼/標準萬國碼)? 8 | 什么是Unicode(统一码)? 9 | Što je Unicode? 10 | Co je Unicode? 11 | Hvad er Unicode? 12 | Wat is Unicode? 13 | Kio estas Unikodo? 14 | Mikä on Unicode? 15 | Qu'est ce qu'Unicode? 16 | რა არის უნიკოდი? 17 | Was ist Unicode? 18 | Τι είναι το Unicode; 19 | Τί εἶναι τὸ Unicode; 20 | מה זה יוניקוד (Unicode)? 21 | यूनिकोड क्या है? 22 | Hvað er Unicode? 23 | Que es Unicode? 24 | Cos'è Unicode? 25 | ユニコードとは何か? 26 | 유니코드에 대해? 27 | Kas tai yra Unikodas? 28 | Што е Unicode? 29 | X'inhu l-Unicode? 30 | يونی‌کُد چيست؟ 31 | Czym jest Unikod? 32 | O que é Unicode? 33 | Ce este Unicode? 34 | Что такое Unicode? 35 | ዩኒኮድ ምቃሩ? 36 | Šta je Unicode? 37 | Шта je Unicode? 38 | Kaj je Unicode? 39 | ¿Qué es Unicode? 40 | Vad är Unicode? 41 | யூனிக்கோடு என்றால் என்ன? 42 | యూనీకోడ్ అంే ఏమిటి?< 43 | Unicode คืออะไร? 44 | ዩኒኮድ እንታይ ኢዩ? 45 | Što je Unicode? 46 | Evrensel Kod Nedir? 47 | ﻳﯘﻧﯩﻜﻮﺩ ﺩﯨﮕﻪﻥ ﻧﯩﻤﻪ؟ 48 | Unicode dégen néme? 49 | Unicode là gì? 50 | Beth yw Unicode? 51 | ዩኒኮድ ወረጘ የጝ? 52 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter64.pas: -------------------------------------------------------------------------------- 1 | unit DSnapFilter64; 2 | 3 | interface 4 | 5 | uses 6 | DBXTransport, SysUtils, IdCoderMIME; 7 | 8 | type 9 | TMimeFilter = class (TTransportFilter) 10 | public 11 | function ProcessInput(const Data: TBytes): TBytes; override; 12 | function ProcessOutput(const Data: TBytes): TBytes; override; 13 | function Id: string; override; 14 | end; 15 | 16 | implementation 17 | 18 | { TMimeFilter } 19 | 20 | function TMimeFilter.Id: string; 21 | begin 22 | Result := 'Cantools.MimeFilter'; 23 | end; 24 | 25 | function TMimeFilter.ProcessInput(const Data: TBytes): TBytes; 26 | var 27 | strEncoded: string; 28 | begin 29 | strEncoded := TIdEncoderMIME.EncodeBytes(Data); 30 | Result := BytesOf(strEncoded); 31 | end; 32 | 33 | function TMimeFilter.ProcessOutput(const Data: TBytes): TBytes; 34 | var 35 | strEncoded: string; 36 | begin 37 | strEncoded := StringOf (Data); 38 | Result := TIdDecoderMIME.DecodeBytes(strEncoded); 39 | end; 40 | 41 | initialization 42 | TTransportFilterFactory.RegisterFilter(TMimeFilter); 43 | 44 | finalization 45 | TTransportFilterFactory.UnregisterFilter(TMimeFilter); 46 | 47 | 48 | end. 49 | -------------------------------------------------------------------------------- /04/RtlLists/RtlListsMainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormRtlLists: TFormRtlLists 2 | Left = 0 3 | Top = 0 4 | Caption = 'RtlLists' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 btnSortListAnon: TButton 17 | Left = 32 18 | Top = 14 19 | Width = 105 20 | Height = 25 21 | Caption = 'btnSortListAnon' 22 | TabOrder = 0 23 | OnClick = btnSortListAnonClick 24 | end 25 | object Memo1: TMemo 26 | Left = 160 27 | Top = 16 28 | Width = 377 29 | Height = 257 30 | TabOrder = 1 31 | end 32 | object btnIndexOfItem: TButton 33 | Left = 32 34 | Top = 48 35 | Width = 105 36 | Height = 25 37 | Caption = 'btnIndexOfItem' 38 | TabOrder = 2 39 | OnClick = btnIndexOfItemClick 40 | end 41 | object Button1: TButton 42 | Left = 32 43 | Top = 104 44 | Width = 105 45 | Height = 25 46 | Caption = 'Button1' 47 | TabOrder = 3 48 | OnClick = Button1Click 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /03/RttiAttrib/RttiAttribMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'RttiAttrib' 5 | ClientHeight = 292 6 | ClientWidth = 554 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 btnMethods: TButton 17 | Left = 26 18 | Top = 76 19 | Width = 105 20 | Height = 25 21 | Caption = 'btnMethods' 22 | TabOrder = 0 23 | OnClick = btnMethodsClick 24 | end 25 | object Memo1: TMemo 26 | Left = 152 27 | Top = 26 28 | Width = 385 29 | Height = 239 30 | TabOrder = 1 31 | end 32 | object btnClassAttribs: TButton 33 | Left = 26 34 | Top = 24 35 | Width = 105 36 | Height = 25 37 | Caption = 'btnClassAttribs' 38 | TabOrder = 2 39 | OnClick = btnClassAttribsClick 40 | end 41 | object btnInvokeIfZero: TButton 42 | Left = 26 43 | Top = 128 44 | Width = 105 45 | Height = 25 46 | Caption = 'btnInvokeIfZero' 47 | TabOrder = 3 48 | OnClick = btnInvokeIfZeroClick 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /04/GenericClassCtor/GenericClassCtor_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormGenericClassCtor: TFormGenericClassCtor 2 | Left = 0 3 | Top = 0 4 | Caption = 'GenericClassCtor' 5 | ClientHeight = 290 6 | ClientWidth = 554 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 btnInt: TButton 17 | Left = 24 18 | Top = 16 19 | Width = 75 20 | Height = 25 21 | Caption = 'btnInt' 22 | TabOrder = 0 23 | OnClick = btnIntClick 24 | end 25 | object Memo1: TMemo 26 | Left = 120 27 | Top = 18 28 | Width = 417 29 | Height = 247 30 | TabOrder = 1 31 | end 32 | object btnString: TButton 33 | Left = 24 34 | Top = 48 35 | Width = 75 36 | Height = 25 37 | Caption = 'btnString' 38 | TabOrder = 2 39 | OnClick = btnStringClick 40 | end 41 | object btnSequence: TButton 42 | Left = 24 43 | Top = 232 44 | Width = 75 45 | Height = 25 46 | Caption = 'btnSequence' 47 | TabOrder = 3 48 | OnClick = btnSequenceClick 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /03/XmlPersist/XmlPersist_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormXmlPersist: TFormXmlPersist 2 | Left = 0 3 | Top = 0 4 | Caption = 'XmlPersist' 5 | ClientHeight = 290 6 | ClientWidth = 554 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 btnPublished: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 129 20 | Height = 25 21 | Caption = 'btnPublished' 22 | TabOrder = 0 23 | OnClick = btnPublishedClick 24 | end 25 | object Memo1: TMemo 26 | Left = 168 27 | Top = 8 28 | Width = 378 29 | Height = 274 30 | Lines.Strings = ( 31 | 'Memo1') 32 | TabOrder = 1 33 | end 34 | object btnRtti: TButton 35 | Left = 8 36 | Top = 48 37 | Width = 129 38 | Height = 25 39 | Caption = 'btnRtti' 40 | TabOrder = 2 41 | OnClick = btnRttiClick 42 | end 43 | object btnAttributes: TButton 44 | Left = 8 45 | Top = 88 46 | Width = 129 47 | Height = 25 48 | Caption = 'btnAttributes' 49 | TabOrder = 3 50 | OnClick = btnAttributesClick 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWadClient_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit DSnapWadClient_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, WideStrings, DbxDatasnap, FMTBcd, DBClient, DSConnect, DB, SqlExpr, 8 | Grids, DBGrids, StdCtrls, 9 | 10 | // AND THIS IS VERY IMPORTANT! 11 | DSHTTPLayer; 12 | 13 | type 14 | TForm2 = class(TForm) 15 | ClientDataSet1: TClientDataSet; 16 | SQLConnection1: TSQLConnection; 17 | SqlServerMethod1: TSqlServerMethod; 18 | DSProviderConnection1: TDSProviderConnection; 19 | DataSource1: TDataSource; 20 | DBGrid1: TDBGrid; 21 | Button1: TButton; 22 | procedure Button1Click(Sender: TObject); 23 | procedure FormCreate(Sender: TObject); 24 | private 25 | { Private declarations } 26 | public 27 | { Public declarations } 28 | end; 29 | 30 | var 31 | Form2: TForm2; 32 | 33 | implementation 34 | 35 | {$R *.dfm} 36 | 37 | procedure TForm2.Button1Click(Sender: TObject); 38 | begin 39 | SqlServerMethod1.ExecuteMethod; 40 | ShowMessage (SqlServerMethod1.Params[1].AsString); 41 | end; 42 | 43 | procedure TForm2.FormCreate(Sender: TObject); 44 | begin 45 | ClientDataSet1.Open; 46 | end; 47 | 48 | end. 49 | -------------------------------------------------------------------------------- /08/Rest1/TrivialXmlWriter.pas: -------------------------------------------------------------------------------- 1 | unit TrivialXmlWriter; 2 | 3 | interface 4 | 5 | uses 6 | Generics.Collections, Classes; 7 | 8 | type 9 | TTrivialXmlWriter = class 10 | private 11 | fWriter: TTextWriter; 12 | fNodes: TStack; 13 | public 14 | constructor Create (aWriter: TTextWriter); 15 | destructor Destroy; override; 16 | procedure WriteStartElement (const sName: string); 17 | procedure WriteEndElement; 18 | procedure WriteString (const sValue: string); 19 | end; 20 | 21 | implementation 22 | 23 | { TTrivialXmlWriter } 24 | 25 | constructor TTrivialXmlWriter.Create(aWriter: TTextWriter); 26 | begin 27 | fWriter := aWriter; 28 | fNodes := TStack.Create; 29 | end; 30 | 31 | destructor TTrivialXmlWriter.Destroy; 32 | begin 33 | while fNodes.Count > 0 do 34 | WriteEndElement; 35 | fNodes.Free; 36 | inherited; 37 | end; 38 | 39 | procedure TTrivialXmlWriter.WriteEndElement; 40 | begin 41 | fWriter.Write(''); 42 | end; 43 | 44 | procedure TTrivialXmlWriter.WriteStartElement(const sName: string); 45 | begin 46 | fWriter.Write('<' + sName + '>'); 47 | fNodes.Push (sname); 48 | end; 49 | 50 | procedure TTrivialXmlWriter.WriteString(const sValue: string); 51 | begin 52 | fWriter.Write(sValue); 53 | end; 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /03/RttiIntro/RttiIntro_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit RttiIntro_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TFormRttiIntro = class(TForm) 11 | btnInfo: TButton; 12 | Memo1: TMemo; 13 | btnChange: TButton; 14 | procedure btnInfoClick(Sender: TObject); 15 | procedure btnChangeClick(Sender: TObject); 16 | private 17 | { Private declarations } 18 | public 19 | procedure Log (const strMsg: string); 20 | end; 21 | 22 | var 23 | FormRttiIntro: TFormRttiIntro; 24 | 25 | implementation 26 | 27 | {$R *.dfm} 28 | 29 | uses 30 | Rtti; 31 | 32 | 33 | procedure TFormRttiIntro.btnChangeClick(Sender: TObject); 34 | var 35 | context: TRttiContext; 36 | aProp: TRttiProperty; 37 | begin 38 | aProp := context.GetType(TButton).GetProperty('Caption'); 39 | aProp.SetValue(btnChange, StringOfChar ('*', random (10) + 1)); 40 | end; 41 | 42 | procedure TFormRttiIntro.btnInfoClick(Sender: TObject); 43 | var 44 | context: TRttiContext; 45 | begin 46 | Log (context. 47 | GetType(TButton). 48 | GetProperty('Caption'). 49 | GetValue(Sender).ToString); 50 | end; 51 | 52 | procedure TFormRttiIntro.Log(const strMsg: string); 53 | begin 54 | Memo1.Lines.Add (strMsg); 55 | end; 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /05/GetOSVersion/GetOSVersionForm.pas: -------------------------------------------------------------------------------- 1 | unit GetOSVersionForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm8 = class(TForm) 11 | btnGetVersion: TButton; 12 | Memo1: TMemo; 13 | procedure btnGetVersionClick(Sender: TObject); 14 | private 15 | { Private declarations } 16 | public 17 | procedure Log (const strMsg: string); 18 | end; 19 | 20 | var 21 | Form8: TForm8; 22 | 23 | implementation 24 | 25 | {$R *.dfm} 26 | 27 | function IsVista: Boolean; 28 | begin 29 | Result := lobyte(loword (GetVersion)) = 6; 30 | end; 31 | 32 | procedure TForm8.btnGetVersionClick(Sender: TObject); 33 | begin 34 | Log ('IsVista: ' + BoolToStr (IsVista, True)); 35 | Log ('Win32MajorVersion: ' + IntToStr(Win32MajorVersion)); 36 | Log ('Win32MinorVersion: ' + IntToStr(Win32MinorVersion)); 37 | Log ('Win32BuildNumber: ' + IntToStr(Win32BuildNumber)); 38 | // any use? 39 | // Memo1.Lines.Add ('Win32CSDVersion: ' + Win32CSDVersion); 40 | if CheckWin32Version(6) then 41 | Log ('Running at least on Vista'); 42 | if CheckWin32Version(6, 1) then 43 | Log ('Running on 7'); 44 | end; 45 | 46 | procedure TForm8.Log(const strMsg: string); 47 | begin 48 | Memo1.Lines.Add (strMsg); 49 | end; 50 | 51 | end. 52 | -------------------------------------------------------------------------------- /08/DataRestServer/jRestClientSimple.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery and Delphi 2010 REST 5 | 6 | 7 | 33 | 34 | 35 | 36 |

jQuery and Delphi 2010 REST

37 | 38 |

This is your data 39 |
40 |

Result goes here:
41 | 42 | 43 | -------------------------------------------------------------------------------- /07/First3TierHttp/First3TierHttp_ServerMainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormFirst3Tier2009Server: TFormFirst3Tier2009Server 2 | Left = 0 3 | Top = 0 4 | Caption = 'First3TierHttp Server' 5 | ClientHeight = 227 6 | ClientWidth = 438 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 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object Memo1: TMemo 18 | Left = 0 19 | Top = 0 20 | Width = 438 21 | Height = 227 22 | Align = alClient 23 | TabOrder = 0 24 | end 25 | object DSServer1: TDSServer 26 | OnConnect = DSServer1Connect 27 | OnDisconnect = DSServer1Disconnect 28 | AutoStart = True 29 | HideDSAdmin = False 30 | Left = 120 31 | Top = 176 32 | end 33 | object DSServerClass1: TDSServerClass 34 | OnGetClass = DSServerClass1GetClass 35 | Server = DSServer1 36 | LifeCycle = 'Session' 37 | Left = 336 38 | Top = 176 39 | end 40 | object DSHTTPService1: TDSHTTPService 41 | RESTContext = 'rest' 42 | Server = DSServer1 43 | DSHostname = 'localhost' 44 | DSPort = 0 45 | Filters = <> 46 | HttpPort = 8090 47 | Active = False 48 | Left = 216 49 | Top = 176 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /07/First3TierHttp/First3TierHttp_ServerModule.pas: -------------------------------------------------------------------------------- 1 | unit First3TierHttp_ServerModule; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer, WideStrings, DBXInterbase, FMTBcd, Provider, DB, 7 | SqlExpr, DSCommonServer, DSTCPServerTransport, DBXFirebird; 8 | 9 | type 10 | TDSFirst3TierServerModule = class(TDSServerModule) 11 | EMPLOYEE: TSQLDataSet; 12 | DataSetProviderEmployee: TDataSetProvider; 13 | EMPLOYEEEMP_NO: TSmallintField; 14 | EMPLOYEEFIRST_NAME: TStringField; 15 | EMPLOYEELAST_NAME: TStringField; 16 | EMPLOYEEPHONE_EXT: TStringField; 17 | EMPLOYEEHIRE_DATE: TSQLTimeStampField; 18 | EMPLOYEEDEPT_NO: TStringField; 19 | EMPLOYEEJOB_CODE: TStringField; 20 | EMPLOYEEJOB_GRADE: TSmallintField; 21 | EMPLOYEEJOB_COUNTRY: TStringField; 22 | EMPLOYEESALARY: TFMTBCDField; 23 | EMPLOYEEFULL_NAME: TStringField; 24 | FBCONNECTION: TSQLConnection; 25 | private 26 | { Private declarations } 27 | public 28 | function GetHello: string; 29 | end; 30 | 31 | var 32 | DSFirst3TierServerModule: TDSFirst3TierServerModule; 33 | 34 | implementation 35 | 36 | {$R *.dfm} 37 | 38 | { TDSFirst3TierServerModule } 39 | 40 | function TDSFirst3TierServerModule.GetHello: string; 41 | begin 42 | Result := 'Hello from TDSFirst3TierServerModule at ' + TimeToStr (Now); 43 | end; 44 | 45 | end. -------------------------------------------------------------------------------- /02/NamedThreads/NamedThreadsMainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormNamedThreads: TFormNamedThreads 2 | Left = 0 3 | Top = 0 4 | Caption = 'NamedThreads' 5 | ClientHeight = 327 6 | ClientWidth = 554 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 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object btnCreate: TButton 18 | Left = 24 19 | Top = 30 20 | Width = 99 21 | Height = 25 22 | Caption = 'btnCreate' 23 | TabOrder = 0 24 | OnClick = btnCreateClick 25 | end 26 | object btnTerminate: TButton 27 | Left = 24 28 | Top = 80 29 | Width = 99 30 | Height = 25 31 | Caption = 'btnTerminate' 32 | TabOrder = 1 33 | OnClick = btnTerminateClick 34 | end 35 | object StatusBar1: TStatusBar 36 | Left = 0 37 | Top = 308 38 | Width = 554 39 | Height = 19 40 | Panels = <> 41 | ExplicitLeft = 120 42 | ExplicitTop = 264 43 | ExplicitWidth = 0 44 | end 45 | object Memo1: TMemo 46 | Left = 144 47 | Top = 32 48 | Width = 393 49 | Height = 257 50 | TabOrder = 3 51 | end 52 | object Timer1: TTimer 53 | OnTimer = Timer1Timer 54 | Left = 64 55 | Top = 160 56 | end 57 | end 58 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/jRestClient.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery and Delphi 2010 REST 5 | 6 | 7 | 22 | 23 | 24 | 25 |

jQuery and Delphi 2010 REST

26 | 27 |

This example demonstrates basic use of jQuery calling a barebones Delphi 2010 REST server.

28 | 29 |

Insert the text to "Echo": 30 |
31 | 32 |
33 | 34 | 35 |

Result goes here:
36 | 37 | 38 | -------------------------------------------------------------------------------- /06/KeyboardTest/KeyboardTest_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object KeyboardForm: TKeyboardForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'KeyboardTest' 5 | ClientHeight = 340 6 | ClientWidth = 674 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -15 11 | Font.Name = 'Segoe UI' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | Scaled = False 15 | PixelsPerInch = 96 16 | TextHeight = 20 17 | object TouchKeyboard1: TTouchKeyboard 18 | Left = 32 19 | Top = 88 20 | Width = 623 21 | Height = 233 22 | GradientEnd = clSilver 23 | GradientStart = clGray 24 | Layout = 'Standard' 25 | end 26 | object LabeledEdit1: TLabeledEdit 27 | Left = 32 28 | Top = 40 29 | Width = 265 30 | Height = 28 31 | EditLabel.Width = 87 32 | EditLabel.Height = 20 33 | EditLabel.Caption = 'LabeledEdit1' 34 | TabOrder = 1 35 | end 36 | object LabeledEdit2: TLabeledEdit 37 | Left = 303 38 | Top = 40 39 | Width = 273 40 | Height = 28 41 | EditLabel.Width = 87 42 | EditLabel.Height = 20 43 | EditLabel.Caption = 'LabeledEdit2' 44 | TabOrder = 2 45 | end 46 | object btnTest: TButton 47 | Left = 582 48 | Top = 39 49 | Width = 73 50 | Height = 31 51 | Caption = 'Test' 52 | TabOrder = 3 53 | OnClick = btnTestClick 54 | end 55 | end 56 | -------------------------------------------------------------------------------- /03/RttiAccess/RttiAccessMainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form39: TForm39 2 | Left = 0 3 | Top = 0 4 | Caption = 'RttiAcccess' 5 | ClientHeight = 292 6 | ClientWidth = 560 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 btnReadValues: TButton 17 | Left = 32 18 | Top = 24 19 | Width = 121 20 | Height = 25 21 | Caption = 'btnReadValues' 22 | TabOrder = 0 23 | OnClick = btnReadValuesClick 24 | end 25 | object btnInvoke: TButton 26 | Left = 32 27 | Top = 80 28 | Width = 121 29 | Height = 25 30 | Caption = 'btnInvoke' 31 | TabOrder = 1 32 | OnClick = btnInvokeClick 33 | end 34 | object btnSet: TButton 35 | Left = 32 36 | Top = 176 37 | Width = 121 38 | Height = 25 39 | Caption = 'btnSet' 40 | TabOrder = 2 41 | OnClick = btnSetClick 42 | end 43 | object Memo1: TMemo 44 | Left = 176 45 | Top = 24 46 | Width = 361 47 | Height = 241 48 | TabOrder = 3 49 | end 50 | object btnLowLevel: TButton 51 | Left = 32 52 | Top = 129 53 | Width = 121 54 | Height = 25 55 | Caption = 'btnLowLevel' 56 | TabOrder = 4 57 | OnClick = btnLowLevelClick 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /04/ClassCtor/ClassCtorMainForm.pas: -------------------------------------------------------------------------------- 1 | unit ClassCtorMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | Button1: TButton; 12 | procedure Button1Click(Sender: TObject); 13 | private 14 | { Private declarations } 15 | public 16 | { Public declarations } 17 | end; 18 | 19 | var 20 | Form39: TForm39; 21 | 22 | implementation 23 | 24 | {$R *.dfm} 25 | 26 | type 27 | TTestClass = class 28 | public 29 | class var 30 | StartTime: TDateTime; 31 | EndTime: TDateTime; 32 | public 33 | class constructor Create; 34 | // class constructor Foo; 35 | class destructor Destroyer; 36 | end; 37 | 38 | 39 | 40 | procedure TForm39.Button1Click(Sender: TObject); 41 | begin 42 | ShowMessage (TimeToStr (TTestClass.StartTime)); 43 | end; 44 | 45 | { TTestClass } 46 | 47 | class constructor TTestClass.Create; 48 | begin 49 | StartTime := Now; 50 | end; 51 | 52 | class destructor TTestClass.Destroyer; 53 | begin 54 | EndTime := Now; 55 | end; 56 | 57 | //class constructor TTestClass.Foo; 58 | //begin 59 | // ShowMessage ('Foo'); 60 | //end; 61 | 62 | initialization 63 | ShowMessage (TimeToStr (TTestClass.StartTime)); 64 | 65 | finalization 66 | ShowMessage (TimeToStr (TTestClass.EndTime)); 67 | 68 | end. 69 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapServerMethods.dfm: -------------------------------------------------------------------------------- 1 | object ServerMethods1: TServerMethods1 2 | OldCreateOrder = False 3 | Height = 306 4 | Width = 312 5 | object DataSetProvider1: TDataSetProvider 6 | DataSet = CUSTOMER 7 | Left = 144 8 | Top = 136 9 | end 10 | object FBCONNECTION: TSQLConnection 11 | ConnectionName = 'FBCONNECTION' 12 | DriverName = 'Firebird' 13 | GetDriverFunc = 'getSQLDriverINTERBASE' 14 | LibraryName = 'dbxfb.dll' 15 | LoginPrompt = False 16 | Params.Strings = ( 17 | ';DelegateConnection=DBXTraceConnection' 18 | 'drivername=Firebird' 19 | 20 | 'Database=localhost:C:/Program Files/Firebird/Firebird2.1/example' + 21 | 's/empbuild/employee.fdb' 22 | 'rolename=RoleName' 23 | 'user_name=sysdba' 24 | 'password=masterkey' 25 | 'sqldialect=3' 26 | 'localecode=0000' 27 | 'blobsize=-1' 28 | 'commitretain=False' 29 | 'waitonlocks=True' 30 | 'isolationlevel=ReadCommitted' 31 | 'trim char=False') 32 | VendorLib = 'fbclient.DLL' 33 | Left = 32 34 | Top = 32 35 | end 36 | object CUSTOMER: TSQLDataSet 37 | CommandText = 'CUSTOMER' 38 | CommandType = ctTable 39 | DbxCommandType = 'Dbx.Table' 40 | MaxBlobSize = -1 41 | Params = <> 42 | SQLConnection = FBCONNECTION 43 | Left = 43 44 | Top = 99 45 | end 46 | end 47 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonClient_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormJsonClient: TFormJsonClient 2 | Left = 0 3 | Top = 0 4 | Caption = 'DsnapJsonClient' 5 | ClientHeight = 325 6 | ClientWidth = 598 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 | OnCreate = FormCreate 15 | OnDestroy = FormDestroy 16 | PixelsPerInch = 96 17 | TextHeight = 13 18 | object btnValue: TButton 19 | Left = 24 20 | Top = 22 21 | Width = 113 22 | Height = 25 23 | Caption = 'btnValue' 24 | TabOrder = 0 25 | OnClick = btnValueClick 26 | end 27 | object btnArray: TButton 28 | Left = 24 29 | Top = 64 30 | Width = 113 31 | Height = 25 32 | Caption = 'btnArray' 33 | TabOrder = 1 34 | OnClick = btnArrayClick 35 | end 36 | object btnMarshal: TButton 37 | Left = 24 38 | Top = 112 39 | Width = 113 40 | Height = 25 41 | Caption = 'btnMarshal' 42 | TabOrder = 2 43 | OnClick = btnMarshalClick 44 | end 45 | object Memo1: TMemo 46 | Left = 160 47 | Top = 24 48 | Width = 417 49 | Height = 281 50 | TabOrder = 3 51 | end 52 | object SQLConnection1: TSQLConnection 53 | DriverName = 'Datasnap' 54 | LoginPrompt = False 55 | Left = 32 56 | Top = 192 57 | end 58 | end 59 | -------------------------------------------------------------------------------- /04/GenericClassCtor/GenericClassCtor_Classes.pas: -------------------------------------------------------------------------------- 1 | unit GenericClassCtor_Classes; 2 | 3 | interface 4 | 5 | uses 6 | Classes; 7 | 8 | type 9 | TGenericWithClassCtor = class 10 | private 11 | FData: T; 12 | procedure SetData(const Value: T); 13 | public 14 | class constructor Create; 15 | property Data: T read FData write SetData; 16 | class var 17 | DataSize: Integer; 18 | end; 19 | 20 | function ListSequence: TStringList; 21 | 22 | // procedure Useless; // not really needed 23 | 24 | implementation 25 | 26 | var // one for the unit (shared by all geenrics) 27 | sListSequence: TStringList; 28 | 29 | function ListSequence: TStringList; 30 | begin 31 | if not Assigned (sListSequence) then 32 | sListSequence := TStringList.Create; 33 | Result := sListSequence; 34 | end; 35 | 36 | // uncomment to show a double initialization 37 | //procedure Useless; 38 | //var 39 | // genStr: TGenericWithClassCtor ; 40 | //begin 41 | // genStr := TGenericWithClassCtor .Create; 42 | // genStr.Data := '100'; 43 | // genStr.Free; 44 | //end; 45 | 46 | { TGenericWithClassCtor } 47 | 48 | class constructor TGenericWithClassCtor.Create; 49 | begin 50 | DataSize := SizeOf (T); 51 | ListSequence.Add(ClassName); 52 | end; 53 | 54 | procedure TGenericWithClassCtor.SetData(const Value: T); 55 | begin 56 | FData := Value; 57 | end; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /07/DsnapMethodsCallback/DsnapMethodsServer_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormDsnapMethodsServer: TFormDsnapMethodsServer 2 | Left = 0 3 | Top = 0 4 | Caption = 'DsnapMethodsServer' 5 | ClientHeight = 283 6 | ClientWidth = 434 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 Memo1: TMemo 17 | Left = 8 18 | Top = 26 19 | Width = 401 20 | Height = 249 21 | TabOrder = 0 22 | end 23 | object DSServer1: TDSServer 24 | OnConnect = DSServer1Connect 25 | OnDisconnect = DSServer1Disconnect 26 | AutoStart = True 27 | HideDSAdmin = False 28 | Left = 48 29 | Top = 96 30 | end 31 | object DSServerClass1: TDSServerClass 32 | OnGetClass = DSServerClass1GetClass 33 | Server = DSServer1 34 | LifeCycle = 'Session' 35 | Left = 128 36 | Top = 128 37 | end 38 | object DSTCPServerTransport1: TDSTCPServerTransport 39 | PoolSize = 20 40 | Server = DSServer1 41 | BufferKBSize = 32 42 | Filters = <> 43 | Left = 88 44 | Top = 176 45 | end 46 | object DSServerClass2: TDSServerClass 47 | OnGetClass = DSServerClass2GetClass 48 | OnDestroyInstance = DSSC2DestroyInstance 49 | Server = DSServer1 50 | LifeCycle = 'Invocation' 51 | Left = 192 52 | Top = 200 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer_ServerClass.pas: -------------------------------------------------------------------------------- 1 | unit DataRestServer_ServerClass; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer, DB, DBClient, dbxJson; 7 | 8 | type 9 | {$METHODINFO ON} 10 | TServerData = class(TDataModule) 11 | ClientDataSet1: TClientDataSet; 12 | private 13 | { Private declarations } 14 | public 15 | function Data: TJSONArray; 16 | function Meta: TJSONArray; 17 | end; 18 | {$METHODINFO OFF} 19 | 20 | var 21 | ServerData: TServerData; 22 | 23 | implementation 24 | 25 | {$R *.dfm} 26 | 27 | { TServerData } 28 | 29 | function TServerData.Data: TJSONArray; 30 | var 31 | jRecord: TJSONObject; 32 | I: Integer; 33 | begin 34 | ClientDataSet1.Open; 35 | Result := TJSonArray.Create; 36 | 37 | while not ClientDataSet1.EOF do 38 | begin 39 | jRecord := TJSONObject.Create; 40 | for I := 0 to ClientDataSet1.FieldCount - 1 do 41 | jRecord.AddPair( 42 | ClientDataSet1.Fields[I].FieldName, 43 | TJSONString.Create (ClientDataSet1.Fields[I].AsString)); 44 | Result.AddElement(jRecord); 45 | ClientDataSet1.Next; 46 | end; 47 | end; 48 | 49 | function TServerData.Meta: TJSONArray; 50 | var 51 | jRecord: TJSONObject; 52 | I: Integer; 53 | begin 54 | ClientDataSet1.Open; 55 | Result := TJSonArray.Create; 56 | 57 | for I := 0 to ClientDataSet1.FieldDefs.Count - 1 do 58 | Result.Add(ClientDataSet1.FieldDefs[I].Name); 59 | end; 60 | 61 | end. 62 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /05/D2DCanvasMix/D2DCanvasMix_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit D2DCanvasMix_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs; 8 | 9 | type 10 | TFormMix = class(TForm) 11 | procedure FormPaint(Sender: TObject); 12 | procedure FormResize(Sender: TObject); 13 | private 14 | { Private declarations } 15 | public 16 | { Public declarations } 17 | end; 18 | 19 | var 20 | FormMix: TFormMix; 21 | 22 | implementation 23 | 24 | {$R *.dfm} 25 | 26 | uses 27 | Direct2D, D2D1; 28 | 29 | procedure TFormMix.FormPaint(Sender: TObject); 30 | var 31 | d2dCanvas: TDirect2DCanvas; 32 | begin 33 | d2dCanvas := TDirect2DCanvas.Create(Canvas, 34 | Rect (0, 0, Width, Height)); 35 | // limited surface 36 | // Rect (0, 0, Width div 2, Height)); 37 | 38 | d2dCanvas.BeginDraw; 39 | try 40 | d2dCanvas.Brush.Color := clWhite; 41 | d2dCanvas.Pen.Color := clBlack; 42 | d2dCanvas.Ellipse(100, 100, Width div 2, Height - 100); 43 | d2dCanvas.DrawLine( 44 | D2D1PointF(100, 100), 45 | D2D1PointF(Width - 100, Height - 100)); 46 | finally 47 | d2dCanvas.EndDraw; 48 | d2dCanvas.Free; 49 | end; 50 | 51 | Canvas.Ellipse(Width div 2, 100, Width - 100, Height - 100); 52 | Canvas.MoveTo (110, 110); 53 | Canvas.LineTo (Width - 90, Height - 90); 54 | end; 55 | 56 | procedure TFormMix.FormResize(Sender: TObject); 57 | begin 58 | Invalidate; 59 | end; 60 | 61 | end. 62 | -------------------------------------------------------------------------------- /08/FirstSimpleRestServer/FirstRestClient_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormFirstRestClient: TFormFirstRestClient 2 | Left = 0 3 | Top = 0 4 | Caption = 'FirstRestClient' 5 | ClientHeight = 168 6 | ClientWidth = 352 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 btnPlainCall: TButton 17 | Left = 32 18 | Top = 73 19 | Width = 129 20 | Height = 25 21 | Caption = 'btnPlainCall' 22 | TabOrder = 0 23 | OnClick = btnPlainCallClick 24 | end 25 | object btnToJSON: TButton 26 | Left = 176 27 | Top = 73 28 | Width = 137 29 | Height = 25 30 | Caption = 'btnToJSON' 31 | TabOrder = 1 32 | OnClick = btnToJSONClick 33 | end 34 | object edInput: TEdit 35 | Left = 32 36 | Top = 30 37 | Width = 281 38 | Height = 21 39 | TabOrder = 2 40 | Text = 'Hello from a Delphi Client Application' 41 | end 42 | object IdHTTP1: TIdHTTP 43 | AllowCookies = True 44 | ProxyParams.BasicAuthentication = False 45 | ProxyParams.ProxyPort = 0 46 | Request.ContentLength = -1 47 | Request.Accept = 'text/html, */*' 48 | Request.BasicAuthentication = False 49 | Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)' 50 | HTTPOptions = [hoForceEncodeParams] 51 | Left = 240 52 | Top = 120 53 | end 54 | end 55 | -------------------------------------------------------------------------------- /07/JsonMarshal/JsonMarshal_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormJson: TFormJson 2 | Left = 0 3 | Top = 0 4 | Caption = 'JsonMarshal' 5 | ClientHeight = 331 6 | ClientWidth = 600 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 btnMarshal: TButton 17 | Left = 24 18 | Top = 16 19 | Width = 122 20 | Height = 25 21 | Caption = 'btnMarshal' 22 | TabOrder = 0 23 | OnClick = btnMarshalClick 24 | end 25 | object Memo1: TMemo 26 | Left = 168 27 | Top = 18 28 | Width = 401 29 | Height = 287 30 | Lines.Strings = ( 31 | 'Memo1') 32 | TabOrder = 1 33 | end 34 | object btnUnmarshal: TButton 35 | Left = 24 36 | Top = 64 37 | Width = 122 38 | Height = 25 39 | Caption = 'btnUnmarshal' 40 | TabOrder = 2 41 | OnClick = btnUnmarshalClick 42 | end 43 | object btnMarshalConverter: TButton 44 | Left = 24 45 | Top = 152 46 | Width = 122 47 | Height = 25 48 | Caption = 'btnMarshalConverter' 49 | TabOrder = 3 50 | OnClick = btnMarshalConverterClick 51 | end 52 | object btnUnmarshalReverter: TButton 53 | Left = 24 54 | Top = 192 55 | Width = 122 56 | Height = 25 57 | Caption = 'btnUnmarshalReverter' 58 | TabOrder = 4 59 | OnClick = btnUnmarshalReverterClick 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_WebModule.pas: -------------------------------------------------------------------------------- 1 | unit DSnapFilter_WebModule; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, HTTPApp, DSHTTP, DSHTTPCommon, DSHTTPWebBroker, DSServer, 7 | DSCommonServer, DbxCompressionFilter; 8 | 9 | type 10 | TWebModule3 = class(TWebModule) 11 | DSServer1: TDSServer; 12 | DSHTTPWebDispatcher1: TDSHTTPWebDispatcher; 13 | DSServerClass1: TDSServerClass; 14 | procedure DSServerClass1GetClass(DSServerClass: TDSServerClass; 15 | var PersistentClass: TPersistentClass); 16 | procedure WebModule3DefaultHandlerAction(Sender: TObject; 17 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | WebModule3: TWebModule3; 26 | 27 | implementation 28 | 29 | uses WebReq, DSnapFilter_ServerMethods; 30 | 31 | {$R *.dfm} 32 | 33 | procedure TWebModule3.WebModule3DefaultHandlerAction(Sender: TObject; 34 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 35 | begin 36 | Response.Content := 'DataSnap Server'; 37 | end; 38 | 39 | procedure TWebModule3.DSServerClass1GetClass( 40 | DSServerClass: TDSServerClass; var PersistentClass: TPersistentClass); 41 | begin 42 | PersistentClass := DSnapFilter_ServerMethods.TServerMethods2; 43 | end; 44 | 45 | initialization 46 | WebRequestHandler.WebModuleClass := TWebModule3; 47 | 48 | end. 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /07/DSnapFilterDemo/DSnapFilter_ClientForm.dfm: -------------------------------------------------------------------------------- 1 | object Form3: TForm3 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form3' 5 | ClientHeight = 275 6 | ClientWidth = 473 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 Button1: TButton 17 | Left = 168 18 | Top = 80 19 | Width = 75 20 | Height = 25 21 | Caption = 'Button1' 22 | TabOrder = 0 23 | OnClick = Button1Click 24 | end 25 | object SQLConnection1: TSQLConnection 26 | DriverName = 'Datasnap' 27 | LoginPrompt = False 28 | Params.Strings = ( 29 | 'URLPath=http://localhost:8081/DSnapFilter_Server.filterserver' 30 | 'CommunicationProtocol=http' 31 | 'Port=8081') 32 | Left = 48 33 | Top = 32 34 | end 35 | object SqlServerMethod1: TSqlServerMethod 36 | GetMetadata = False 37 | Params = < 38 | item 39 | DataType = ftWideString 40 | Precision = 2000 41 | Name = 'Value' 42 | ParamType = ptInput 43 | end 44 | item 45 | DataType = ftWideString 46 | Precision = 2000 47 | Name = 'ReturnParameter' 48 | ParamType = ptResult 49 | Size = 2000 50 | end> 51 | SQLConnection = SQLConnection1 52 | ServerMethodName = 'TServerMethods2.EchoString' 53 | Left = 48 54 | Top = 96 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /08/RssClient/RssClientForm.dfm: -------------------------------------------------------------------------------- 1 | object RssForm: TRssForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'RssClient' 5 | ClientHeight = 332 6 | ClientWidth = 511 7 | Color = clBtnFace 8 | Font.Charset = DEFAULT_CHARSET 9 | Font.Color = clWindowText 10 | Font.Height = -16 11 | Font.Name = 'Tahoma' 12 | Font.Style = [] 13 | OldCreateOrder = False 14 | PixelsPerInch = 96 15 | TextHeight = 19 16 | object ListBox1: TListBox 17 | Left = 0 18 | Top = 41 19 | Width = 511 20 | Height = 291 21 | Align = alClient 22 | ItemHeight = 19 23 | TabOrder = 0 24 | end 25 | object Panel1: TPanel 26 | Left = 0 27 | Top = 0 28 | Width = 511 29 | Height = 41 30 | Align = alTop 31 | TabOrder = 1 32 | object btnUpdate: TButton 33 | Left = 16 34 | Top = 8 35 | Width = 75 36 | Height = 25 37 | Caption = 'Update' 38 | TabOrder = 0 39 | OnClick = btnUpdateClick 40 | end 41 | end 42 | object XMLDocument1: TXMLDocument 43 | Left = 40 44 | Top = 72 45 | DOMVendorDesc = 'MSXML' 46 | end 47 | object IdHTTP1: TIdHTTP 48 | AllowCookies = True 49 | ProxyParams.BasicAuthentication = False 50 | ProxyParams.ProxyPort = 0 51 | Request.ContentLength = -1 52 | Request.Accept = 'text/html, */*' 53 | Request.BasicAuthentication = False 54 | Request.UserAgent = 'Mozilla/3.0 (compatible; Indy Library)' 55 | HTTPOptions = [hoForceEncodeParams] 56 | Left = 40 57 | Top = 136 58 | end 59 | end 60 | -------------------------------------------------------------------------------- /07/DsnapMethodsCallback/DsnapMethodsClient_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormDsmcMain: TFormDsmcMain 2 | Left = 0 3 | Top = 0 4 | Caption = 'DsnapMethodsClient Main' 5 | ClientHeight = 292 6 | ClientWidth = 599 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 btnNewForm: TButton 17 | Left = 16 18 | Top = 8 19 | Width = 91 20 | Height = 25 21 | Caption = 'btnNewForm' 22 | TabOrder = 0 23 | OnClick = btnNewFormClick 24 | end 25 | object btnUpdateStatus: TButton 26 | Left = 120 27 | Top = 8 28 | Width = 97 29 | Height = 25 30 | Caption = 'btnUpdateStatus' 31 | TabOrder = 1 32 | OnClick = btnUpdateStatusClick 33 | end 34 | object Memo1: TMemo 35 | Left = 16 36 | Top = 40 37 | Width = 417 38 | Height = 241 39 | TabOrder = 2 40 | end 41 | object rgLifeCycle: TRadioGroup 42 | Left = 447 43 | Top = 40 44 | Width = 138 45 | Height = 113 46 | Caption = 'rgLifeCycle' 47 | ItemIndex = 0 48 | Items.Strings = ( 49 | 'Session' 50 | 'Invocation' 51 | 'Server') 52 | TabOrder = 3 53 | end 54 | object btnStartServer: TButton 55 | Left = 448 56 | Top = 8 57 | Width = 97 58 | Height = 25 59 | Caption = 'btnStartServer' 60 | TabOrder = 4 61 | OnClick = btnStartServerClick 62 | end 63 | end 64 | -------------------------------------------------------------------------------- /07/DSnapHttpConsole/ConsoleClient_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit ConsoleClient_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, WideStrings, DbxDatasnap, DB, SqlExpr, FMTBcd, StdCtrls; 8 | 9 | type 10 | TConsoleClientForm = class(TForm) 11 | FIRST: TSQLConnection; 12 | TServerMethods1_EchoString: TSQLDataSet; 13 | btnCallEcho: TButton; 14 | btnProxy: TButton; 15 | procedure FormCreate(Sender: TObject); 16 | procedure btnCallEchoClick(Sender: TObject); 17 | procedure btnProxyClick(Sender: TObject); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | ConsoleClientForm: TConsoleClientForm; 26 | 27 | implementation 28 | 29 | {$R *.dfm} 30 | 31 | uses 32 | DSHTTPLayer, ClientProxy; 33 | 34 | procedure TConsoleClientForm.btnCallEchoClick(Sender: TObject); 35 | begin 36 | TServerMethods1_EchoString. 37 | ParamByName('Value').AsString := 'Hello ' + TimeToStr (Now); 38 | TServerMethods1_EchoString.ExecSQL; 39 | ShowMessage (TServerMethods1_EchoString. 40 | ParamByName('ReturnParameter').AsString); 41 | end; 42 | 43 | procedure TConsoleClientForm.btnProxyClick(Sender: TObject); 44 | begin 45 | with TServerMethods1Client.Create(FIRST.DBXConnection) do 46 | try 47 | ShowMessage (EchoString('Hello ' + TimeToStr (Now))) 48 | finally 49 | Free; 50 | end; 51 | end; 52 | 53 | procedure TConsoleClientForm.FormCreate(Sender: TObject); 54 | begin 55 | FIRST.Open; 56 | end; 57 | 58 | end. 59 | -------------------------------------------------------------------------------- /06/DataGestures/DataGestures_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit DataGestures_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdActns, DBActns, ActnList, ComCtrls, GestureMgr, ToolWin, ImgList, 8 | Grids, DBGrids, DB, DBClient; 9 | 10 | type 11 | TDBGrid = class (DBGrids.TDBGrid) 12 | public 13 | function Focused: Boolean; override; 14 | end; 15 | 16 | TDataGesturesForm = class(TForm) 17 | ClientDataSet1: TClientDataSet; 18 | DataSource1: TDataSource; 19 | DBGrid1: TDBGrid; 20 | ActionList1: TActionList; 21 | ImageList1: TImageList; 22 | ToolBar1: TToolBar; 23 | GestureManager1: TGestureManager; 24 | ToolButton1: TToolButton; 25 | ToolButton2: TToolButton; 26 | ToolButton3: TToolButton; 27 | ToolButton4: TToolButton; 28 | ToolButton5: TToolButton; 29 | ToolButton6: TToolButton; 30 | DataSetPrior1: TDataSetPrior; 31 | DataSetNext1: TDataSetNext; 32 | DataSetFirst1: TDataSetFirst; 33 | DataSetLast1: TDataSetLast; 34 | FileExit1: TFileExit; 35 | procedure FormCreate(Sender: TObject); 36 | private 37 | { Private declarations } 38 | public 39 | { Public declarations } 40 | end; 41 | 42 | var 43 | DataGesturesForm: TDataGesturesForm; 44 | 45 | implementation 46 | 47 | {$R *.dfm} 48 | 49 | { TDBGrid } 50 | 51 | function TDBGrid.Focused: Boolean; 52 | begin 53 | Result := False; 54 | end; 55 | 56 | procedure TDataGesturesForm.FormCreate(Sender: TObject); 57 | begin 58 | ClientDataSet1.Open; 59 | end; 60 | 61 | end. 62 | -------------------------------------------------------------------------------- /04/ReadOnlyRecord/ReadOnlyRecordMainForm.pas: -------------------------------------------------------------------------------- 1 | unit ReadOnlyRecordMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | Button1: TButton; 12 | procedure Button1Click(Sender: TObject); 13 | private 14 | { Private declarations } 15 | public 16 | { Public declarations } 17 | end; 18 | 19 | var 20 | Form39: TForm39; 21 | 22 | implementation 23 | 24 | {$R *.dfm} 25 | 26 | type 27 | TMyPoint = record 28 | X: Integer; 29 | Y: Integer; 30 | end; 31 | 32 | TMyFixedRect = class 33 | private 34 | fBottomRight: TMyPoint; 35 | fTopLeft: TMyPoint; 36 | public 37 | constructor Create (a, b, c, d: Integer); 38 | property TopLeft: TMyPoint read fTopLeft; 39 | property BottomRight: TMyPoint read fBottomRight; 40 | end; 41 | 42 | procedure TForm39.Button1Click(Sender: TObject); 43 | var 44 | aRect: TMyFixedRect; 45 | aPoint: TMyPoint; 46 | begin 47 | aRect := TMyFixedRect.Create(10, 10, 100, 100); 48 | ShowMessage (IntToStr (aRect.TopLeft.X)); 49 | // aRect.TopLeft.X := 20; 50 | with aRect.TopLeft do 51 | X := 20; // this fails to compile in Delphi 2010! 52 | aPoint := aRect.TopLeft; 53 | aPoint.X := 20; 54 | ShowMessage (IntToStr (aRect.TopLeft.X)); 55 | end; 56 | 57 | { TMyFixedRect } 58 | 59 | constructor TMyFixedRect.Create(a, b, c, d: Integer); 60 | begin 61 | fTopLeft.X := a; 62 | fTopLeft.Y := b; 63 | fBottomRight.X := c; 64 | fBottomRight.Y := d; 65 | end; 66 | 67 | end. 68 | -------------------------------------------------------------------------------- /08/DataRestServer/DataRestServer_WebModule.pas: -------------------------------------------------------------------------------- 1 | unit DataRestServer_WebModule; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, HTTPApp, DSHTTP, DSHTTPCommon, DSHTTPWebBroker, DSServer, 7 | DSCommonServer; 8 | 9 | type 10 | TWebModule2 = class(TWebModule) 11 | DSServer1: TDSServer; 12 | DSHTTPWebDispatcher1: TDSHTTPWebDispatcher; 13 | DSServerClass1: TDSServerClass; 14 | procedure DSServerClass1GetClass(DSServerClass: TDSServerClass; 15 | var PersistentClass: TPersistentClass); 16 | procedure WebModule2DefaultHandlerAction(Sender: TObject; 17 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | WebModule2: TWebModule2; 26 | 27 | implementation 28 | 29 | uses WebReq, DataRestServer_ServerClass; 30 | 31 | {$R *.dfm} 32 | 33 | procedure TWebModule2.WebModule2DefaultHandlerAction(Sender: TObject; 34 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 35 | var 36 | strRead: TStreamReader; 37 | begin 38 | strRead := TStreamReader.Create('jRestClient.html'); 39 | try 40 | Response.Content := strRead.ReadToEnd; 41 | finally 42 | strRead.Free; 43 | end; 44 | end; 45 | 46 | procedure TWebModule2.DSServerClass1GetClass( 47 | DSServerClass: TDSServerClass; var PersistentClass: TPersistentClass); 48 | begin 49 | PersistentClass := DataRestServer_ServerClass.TServerData; 50 | end; 51 | 52 | initialization 53 | WebRequestHandler.WebModuleClass := TWebModule2; 54 | 55 | end. 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /06/Gestures01/GesturesMainForm.pas: -------------------------------------------------------------------------------- 1 | unit GesturesMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, GestureMgr, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TForm1 = class(TForm) 11 | GestureManager1: TGestureManager; 12 | Memo1: TMemo; 13 | Panel1: TPanel; 14 | procedure FormGesture(Sender: TObject; const EventInfo: TGestureEventInfo; 15 | var Handled: Boolean); 16 | procedure Panel1Gesture(Sender: TObject; const EventInfo: TGestureEventInfo; 17 | var Handled: Boolean); 18 | private 19 | { Private declarations } 20 | public 21 | procedure Log (const strMsg: string); 22 | end; 23 | 24 | var 25 | Form1: TForm1; 26 | 27 | implementation 28 | 29 | {$R *.dfm} 30 | 31 | 32 | 33 | procedure TForm1.FormGesture(Sender: TObject; 34 | const EventInfo: TGestureEventInfo; var Handled: Boolean); 35 | var 36 | nGesture: Integer; 37 | gestureItem: TCustomGestureCollectionItem; 38 | begin 39 | nGesture := EventInfo.GestureID; 40 | gestureItem := GestureManager1.FindGesture(self, nGesture); 41 | if Assigned (gestureItem) then 42 | Log (Format ('Gesture: %s [%d]', [gestureItem.Name, nGesture])) 43 | else 44 | Log (Format ('Unrecognized gesture [%d]', [nGesture])); 45 | Handled := True; 46 | end; 47 | 48 | procedure TForm1.Log(const strMsg: string); 49 | begin 50 | Memo1.Lines.Add (strMsg); 51 | end; 52 | 53 | procedure TForm1.Panel1Gesture(Sender: TObject; 54 | const EventInfo: TGestureEventInfo; var Handled: Boolean); 55 | begin 56 | Log ('Panel Gesture'); 57 | end; 58 | 59 | end. 60 | -------------------------------------------------------------------------------- /08/ObjectsRestServer/ObjectsRestServer_WebModule.pas: -------------------------------------------------------------------------------- 1 | unit ObjectsRestServer_WebModule; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, HTTPApp, DSHTTP, DSHTTPCommon, DSHTTPWebBroker, DSServer, 7 | DSCommonServer; 8 | 9 | type 10 | TWebModule2 = class(TWebModule) 11 | DSServer1: TDSServer; 12 | DSHTTPWebDispatcher1: TDSHTTPWebDispatcher; 13 | DSServerClass1: TDSServerClass; 14 | procedure DSServerClass1GetClass(DSServerClass: TDSServerClass; 15 | var PersistentClass: TPersistentClass); 16 | procedure WebModule2DefaultHandlerAction(Sender: TObject; 17 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | WebModule2: TWebModule2; 26 | 27 | implementation 28 | 29 | uses WebReq, ObjectsRestServer_Classes; 30 | 31 | {$R *.dfm} 32 | 33 | procedure TWebModule2.WebModule2DefaultHandlerAction(Sender: TObject; 34 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 35 | var 36 | strRead: TStreamReader; 37 | begin 38 | strRead := TStreamReader.Create('jRestClient.html'); 39 | try 40 | Response.Content := strRead.ReadToEnd; 41 | finally 42 | strRead.Free; 43 | end; 44 | end; 45 | 46 | procedure TWebModule2.DSServerClass1GetClass( 47 | DSServerClass: TDSServerClass; var PersistentClass: TPersistentClass); 48 | begin 49 | PersistentClass := ObjectsRestServer_Classes.TObjectsRest; 50 | end; 51 | 52 | initialization 53 | WebRequestHandler.WebModuleClass := TWebModule2; 54 | 55 | end. 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /08/TranslateJson/TranslateMainForm.pas: -------------------------------------------------------------------------------- 1 | unit TranslateMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TTranslateForm = class(TForm) 11 | edSourceText: TEdit; 12 | German: TButton; 13 | Memo1: TMemo; 14 | Italian: TButton; 15 | bntPick: TButton; 16 | ListBox1: TListBox; 17 | procedure GermanClick(Sender: TObject); 18 | procedure ItalianClick(Sender: TObject); 19 | procedure bntPickClick(Sender: TObject); 20 | private 21 | { Private declarations } 22 | public 23 | { Public declarations } 24 | end; 25 | 26 | var 27 | TranslateForm: TTranslateForm; 28 | 29 | implementation 30 | 31 | uses 32 | BabelGoogle; 33 | 34 | {$R *.dfm} 35 | 36 | procedure TTranslateForm.bntPickClick(Sender: TObject); 37 | var 38 | strLang: string; 39 | begin 40 | if ListBox1.ItemIndex > -1 then 41 | begin 42 | strLang := ListBox1.Items.Names [ListBox1.ItemIndex]; 43 | Memo1.Lines.Add (TBabelGoogleRest. 44 | Translate(edSourceText.Text, 'en', strLang)); 45 | end 46 | else 47 | ShowMessage ('Select a language'); 48 | end; 49 | 50 | procedure TTranslateForm.GermanClick(Sender: TObject); 51 | begin 52 | Memo1.Lines.Add (TBabelGoogleRest. 53 | Translate(edSourceText.Text, 'en', 'de')); 54 | end; 55 | 56 | procedure TTranslateForm.ItalianClick(Sender: TObject); 57 | begin 58 | Memo1.Lines.Add (TBabelGoogleRest. 59 | Translate(edSourceText.Text, 'en', 'it')); 60 | end; 61 | 62 | initialization 63 | ReportMemoryLeaksOnShutdown := True; 64 | 65 | end. 66 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonServer_Methods.pas: -------------------------------------------------------------------------------- 1 | unit DSnapJsonServer_Methods; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, DSServer, DBXJSON; 7 | 8 | type 9 | {$METHODINFO ON} 10 | TDSnapJsonMethods = class(TPersistent) 11 | private 12 | { Private declarations } 13 | public 14 | function SimpleValue: TJSONValue; 15 | function GetList (nElem: Integer): TJSONArray; 16 | function GetData (const strName: string): TJSONValue; 17 | end; 18 | {$METHODINFO OFF} 19 | 20 | implementation 21 | 22 | uses 23 | DsnapJson_MyData, DBXJSONReflect; 24 | 25 | { TDSnapJsonMethods } 26 | 27 | function TDSnapJsonMethods.GetData(const strName: string): TJSONValue; 28 | var 29 | myData: TMyData; 30 | jMarshal: TJSONMarshal; 31 | begin 32 | myData := TMyData.Create(strName); 33 | try 34 | jMarshal := TJSONMarshal.Create(TJSONConverter.Create); 35 | try 36 | Result := jMarshal.Marshal(myData); 37 | finally 38 | jMarshal.Free; 39 | end; 40 | finally 41 | myData.Free; 42 | end; 43 | end; 44 | 45 | function TDSnapJsonMethods.GetList(nElem: Integer): TJSONArray; 46 | var 47 | I: Integer; 48 | begin 49 | Result := TJSONArray.Create; 50 | for I := 1 to nElem do 51 | Result.Add('Item ' + IntTOStr (I)); 52 | end; 53 | 54 | function TDSnapJsonMethods.SimpleValue: TJSONValue; 55 | begin 56 | Result := TJSONObject.Create ( 57 | TJSONPair.Create ('name', 'Marco')); 58 | (Result as TJSONObject).AddPair( 59 | TJSONPair.Create ('email', 'marco@marcocantu.com')); 60 | end; 61 | 62 | initialization 63 | ReportMemoryLeaksOnShutdown := True; 64 | 65 | end. 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /07/JsonTests/JsonTests_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormJson: TFormJson 2 | Left = 0 3 | Top = 0 4 | Caption = 'JsonTests' 5 | ClientHeight = 345 6 | ClientWidth = 693 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 btnParseObj: TButton 17 | Left = 8 18 | Top = 135 19 | Width = 113 20 | Height = 25 21 | Caption = 'btnParseObj' 22 | TabOrder = 0 23 | OnClick = btnParseObjClick 24 | end 25 | object btnParseRESTResult: TButton 26 | Left = 8 27 | Top = 174 28 | Width = 113 29 | Height = 25 30 | Caption = 'btnParseRESTResult' 31 | TabOrder = 1 32 | OnClick = btnParseRESTResultClick 33 | end 34 | object Memo1: TMemo 35 | Left = 144 36 | Top = 8 37 | Width = 541 38 | Height = 329 39 | TabOrder = 2 40 | end 41 | object btnValues: TButton 42 | Left = 8 43 | Top = 8 44 | Width = 113 45 | Height = 25 46 | Caption = 'btnValues' 47 | TabOrder = 3 48 | OnClick = btnValuesClick 49 | end 50 | object btnSimpleArray: TButton 51 | Left = 8 52 | Top = 40 53 | Width = 113 54 | Height = 25 55 | Caption = 'btnSimpleArray' 56 | TabOrder = 4 57 | OnClick = btnSimpleArrayClick 58 | end 59 | object btnSimpleObject: TButton 60 | Left = 8 61 | Top = 71 62 | Width = 113 63 | Height = 25 64 | Caption = 'btnSimpleObject' 65 | TabOrder = 5 66 | OnClick = btnSimpleObjectClick 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppModule.pas: -------------------------------------------------------------------------------- 1 | unit DSnapWebAppModule; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, HTTPApp, DSHTTP, DSHTTPCommon, DSHTTPWebBroker, DSServer, 7 | DSCommonServer; 8 | 9 | type 10 | TWebModule2 = class(TWebModule) 11 | DSServer1: TDSServer; 12 | DSHTTPWebDispatcher1: TDSHTTPWebDispatcher; 13 | DSServerClass1: TDSServerClass; 14 | procedure DSServerClass1GetClass(DSServerClass: TDSServerClass; 15 | var PersistentClass: TPersistentClass); 16 | procedure WebModule2DefaultHandlerAction(Sender: TObject; 17 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 18 | private 19 | { Private declarations } 20 | public 21 | { Public declarations } 22 | end; 23 | 24 | var 25 | WebModule2: TWebModule2; 26 | 27 | implementation 28 | 29 | uses WebReq, DSnapServerMethods; 30 | 31 | {$R *.dfm} 32 | 33 | procedure TWebModule2.WebModule2DefaultHandlerAction(Sender: TObject; 34 | Request: TWebRequest; Response: TWebResponse; var Handled: Boolean); 35 | var 36 | strRead: TStreamReader; 37 | begin 38 | // Wizard generated code: 39 | // Response.Content := 'DataSnap Server'; 40 | strRead := TStreamReader.Create('main.html'); 41 | Response.Content := strRead.ReadToEnd; 42 | strRead.Free; 43 | end; 44 | 45 | procedure TWebModule2.DSServerClass1GetClass( 46 | DSServerClass: TDSServerClass; var PersistentClass: TPersistentClass); 47 | begin 48 | PersistentClass := DSnapServerMethods.TServerMethods1; 49 | end; 50 | 51 | initialization 52 | WebRequestHandler.WebModuleClass := TWebModule2; 53 | 54 | end. 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery and Delphi REST 5 | 6 | 7 | 8 | 33 | 34 | 35 | 36 |

jQuery Getting Started Example - rate me

37 | 38 |

This example demonstrate basic use of AJAX. Click one of the links below to rate. The 39 | number of rating and the average rating will be returned from the serverside script and displayed.

40 | 41 |
Container
42 | 43 |
result
44 | 45 | 46 | -------------------------------------------------------------------------------- /04/StopWatchTest/StopWatchTestMainForm.pas: -------------------------------------------------------------------------------- 1 | unit StopWatchTestMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, IniFiles, Registry, StdCtrls; 8 | 9 | type 10 | TForm39 = class(TForm) 11 | Memo1: TMemo; 12 | btnTest: TButton; 13 | btnCondensed: TButton; 14 | procedure btnTestClick(Sender: TObject); 15 | procedure FormCreate(Sender: TObject); 16 | procedure btnCondensedClick(Sender: TObject); 17 | private 18 | { Private declarations } 19 | public 20 | procedure Log (const strMsg: string); 21 | end; 22 | 23 | var 24 | Form39: TForm39; 25 | 26 | implementation 27 | 28 | {$R *.dfm} 29 | 30 | uses 31 | Diagnostics; 32 | 33 | procedure TForm39.btnCondensedClick(Sender: TObject); 34 | var 35 | sw: TStopWatch; 36 | I: Integer; 37 | begin 38 | sw := TStopwatch.StartNew; 39 | for I := 0 to 999 do 40 | Caption := TimeToStr (Now); 41 | Log ('msec: ' + IntToStr (sw.ElapsedMilliseconds)); 42 | Log ('ticks: ' + IntToStr (sw.ElapsedTicks)); 43 | end; 44 | 45 | procedure TForm39.btnTestClick(Sender: TObject); 46 | var 47 | sw: TStopWatch; 48 | I: Integer; 49 | begin 50 | sw := TStopwatch.Create; 51 | sw.Start; 52 | for I := 0 to 999 do 53 | Caption := TimeToStr (Now); 54 | sw.Stop; 55 | Log ('msec: ' + IntToStr (sw.ElapsedMilliseconds)); 56 | Log ('ticks: ' + IntToStr (sw.ElapsedTicks)); 57 | end; 58 | 59 | procedure TForm39.FormCreate(Sender: TObject); 60 | begin 61 | TStopwatch.IsHighResolution := True; 62 | end; 63 | 64 | procedure TForm39.Log(const strMsg: string); 65 | begin 66 | Memo1.Lines.Add (strMsg); 67 | end; 68 | 69 | end. 70 | -------------------------------------------------------------------------------- /05/TiffViewer/TiffViewer_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'TiffViewer' 5 | ClientHeight = 310 6 | ClientWidth = 708 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 | DesignSize = ( 15 | 708 16 | 310) 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object Image1: TImage 20 | Left = 8 21 | Top = 8 22 | Width = 511 23 | Height = 294 24 | Anchors = [akLeft, akTop, akRight, akBottom] 25 | ExplicitWidth = 489 26 | ExplicitHeight = 274 27 | end 28 | object Button1: TButton 29 | Left = 625 30 | Top = 8 31 | Width = 75 32 | Height = 25 33 | Anchors = [akTop, akRight] 34 | Caption = 'btnOpen' 35 | TabOrder = 0 36 | OnClick = Button1Click 37 | ExplicitLeft = 503 38 | end 39 | object Button2: TButton 40 | Left = 625 41 | Top = 39 42 | Width = 75 43 | Height = 25 44 | Anchors = [akTop, akRight] 45 | Caption = 'btnRotate' 46 | TabOrder = 1 47 | OnClick = Button2Click 48 | ExplicitLeft = 503 49 | end 50 | object Memo1: TMemo 51 | Left = 536 52 | Top = 70 53 | Width = 163 54 | Height = 232 55 | Anchors = [akTop, akRight, akBottom] 56 | TabOrder = 2 57 | ExplicitLeft = 552 58 | ExplicitHeight = 226 59 | end 60 | object OpenDialog1: TOpenDialog 61 | Filter = 62 | 'TIFF file (*.tif, *.tiff)|*.tif*|JPEG file (*.jpg)|*.jpg|Any Fil' + 63 | 'e (*.*)|*.*' 64 | FilterIndex = 0 65 | Left = 536 66 | Top = 88 67 | end 68 | end 69 | -------------------------------------------------------------------------------- /03/XmlPersistPublish/XmlPersistPublish_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit XmlPersistPublish_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, xmldom, XMLIntf, msxmldom, XMLDoc; 8 | 9 | type 10 | TForm1 = class(TForm) 11 | Button1: TButton; 12 | Memo1: TMemo; 13 | procedure Button1Click(Sender: TObject); 14 | private 15 | { Private declarations } 16 | public 17 | { Public declarations } 18 | end; 19 | 20 | var 21 | Form1: TForm1; 22 | 23 | implementation 24 | 25 | {$R *.dfm} 26 | 27 | uses 28 | TrivialXmlWriter, XmlPersistPublish_Classes; 29 | 30 | procedure TForm1.Button1Click(Sender: TObject); 31 | var 32 | aPerson: TPerson; 33 | aCompany: TCompany; 34 | ss: TStringStream; 35 | xmlWri: TTrivialXmlWriter; 36 | begin 37 | // create a person 38 | aPerson := TPerson.Create; 39 | aPerson.Name := 'Willy'; 40 | aPerson.Country := 'Desert'; 41 | 42 | // create a company and add person to it 43 | aCompany := TCompany.Create; 44 | aCompany.Name := 'ACME Inc.'; 45 | aCompany.ID := IntToStr (GetTickCount); 46 | aCompany.Country := 'Worldwide'; 47 | aCompany.Person := aPerson; 48 | 49 | // stream the company (and person) 50 | ss := TStringStream.Create; 51 | try 52 | xmlWri := TTrivialXmlWriter.Create (ss); 53 | try 54 | xmlWri.WriteStartElement('company'); 55 | xmlWri.WriteObjectPublished(aCompany); 56 | xmlWri.WriteEndElement; 57 | finally 58 | xmlWri.Free; 59 | end; 60 | // reset and laod stream 61 | ss.Position := 0; 62 | Memo1.Lines.LoadFromStream (ss); 63 | finally 64 | ss.Free; 65 | end; 66 | end; 67 | 68 | end. 69 | -------------------------------------------------------------------------------- /08/Rest1/Rest1Group.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {2A5F13F4-5ED1-4B3A-9325-3355597418B6} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /04/GenericClassCtor/GenericClassCtor_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit GenericClassCtor_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TFormGenericClassCtor = class(TForm) 11 | btnInt: TButton; 12 | Memo1: TMemo; 13 | btnString: TButton; 14 | btnSequence: TButton; 15 | procedure btnIntClick(Sender: TObject); 16 | procedure btnSequenceClick(Sender: TObject); 17 | procedure btnStringClick(Sender: TObject); 18 | private 19 | { Private declarations } 20 | public 21 | procedure Log (const strMsg: string); 22 | end; 23 | 24 | var 25 | FormGenericClassCtor: TFormGenericClassCtor; 26 | 27 | implementation 28 | 29 | {$R *.dfm} 30 | 31 | uses GenericClassCtor_Classes; 32 | 33 | type 34 | TGenDouble = TGenericWithClassCtor ; 35 | 36 | procedure TFormGenericClassCtor.btnIntClick(Sender: TObject); 37 | var 38 | genInt: TGenericWithClassCtor ; 39 | begin 40 | genInt := TGenericWithClassCtor .Create; 41 | genInt.Data := 100; 42 | Log ('Size: ' + IntToStr (genInt.DataSize)); 43 | genInt.Free; 44 | end; 45 | 46 | procedure TFormGenericClassCtor.btnSequenceClick(Sender: TObject); 47 | begin 48 | Log (Trim(ListSequence.Text)); 49 | end; 50 | 51 | procedure TFormGenericClassCtor.btnStringClick(Sender: TObject); 52 | var 53 | genStr: TGenericWithClassCtor ; 54 | begin 55 | genStr := TGenericWithClassCtor .Create; 56 | genStr.Data := '100'; 57 | Log ('Size: ' + IntToStr (genStr.DataSize)); 58 | genStr.Free; 59 | end; 60 | 61 | procedure TFormGenericClassCtor.Log(const strMsg: string); 62 | begin 63 | Memo1.Lines.Add(strMsg) 64 | end; 65 | 66 | end. 67 | -------------------------------------------------------------------------------- /08/DataRestServer/jRestClient.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | jQuery and Delphi 2010 REST 5 | 6 | 7 | 46 | 47 | 48 | 49 |

jQuery and Delphi 2010 REST

50 | 51 |

This is your data 52 |
53 |

Result goes here:
54 | 55 | 56 | -------------------------------------------------------------------------------- /08/LargeXml/saxphilo.pas: -------------------------------------------------------------------------------- 1 | unit saxphilo; 2 | 3 | interface 4 | 5 | uses 6 | AdomCore_4_3, classes, strutils; 7 | 8 | type 9 | TDataSaxHandler = class (TXmlStandardHandler) 10 | protected 11 | stack: TStringList; 12 | strCurrent: string; 13 | public 14 | constructor Create(aowner: TComponent); override; 15 | procedure ProcessSignal(const Signal: TXmlSignal); override; 16 | destructor Destroy; override; 17 | end; 18 | 19 | implementation 20 | 21 | uses 22 | LargeXmlForm, saxform; 23 | 24 | { TDataSaxHandler } 25 | 26 | constructor TDataSaxHandler.Create(aowner: TComponent); 27 | begin 28 | inherited; 29 | stack := tstringlist.create; 30 | end; 31 | 32 | destructor TDataSaxHandler.Destroy; 33 | begin 34 | stack.Free; 35 | inherited; 36 | end; 37 | 38 | procedure TDataSaxHandler.ProcessSignal(const Signal: TXmlSignal); 39 | var 40 | tagname: string; 41 | begin 42 | if Signal is TXmlStartElementSignal then 43 | begin 44 | stack.Add (TXmlStartElementSignal(Signal).TagName); 45 | if TXmlStartElementSignal(Signal).TagName = 'employeeData' then 46 | Form1.clientdataset2.Insert; 47 | strCurrent := ''; 48 | end 49 | else if Signal is TXmlEndElementSignal then 50 | begin 51 | if TXmlEndElementSignal(Signal).TagName = 'employeeData' then 52 | Form1.clientdataset2.Post; 53 | if stack.Count > 2 then 54 | begin 55 | Form1.ClientDataSet2.Edit; 56 | Form1.ClientDataSet2.FieldByName ( 57 | TXmlEndElementSignal(Signal).TagName).AsString := strCurrent; 58 | end; 59 | stack.Delete (stack.Count - 1); 60 | end 61 | else if Signal is TXmlPCDATASignal then 62 | begin 63 | strCurrent := strCurrent + RemoveWhites( 64 | TXmlPCDATASignal(Signal).Data); 65 | end; 66 | end; 67 | 68 | end. 69 | -------------------------------------------------------------------------------- /03/TypesList/TypesListMainForm.dfm: -------------------------------------------------------------------------------- 1 | object FormTypesList: TFormTypesList 2 | Left = 0 3 | Top = 0 4 | Caption = 'TypesList' 5 | ClientHeight = 546 6 | ClientWidth = 561 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 btnTypesList: TButton 17 | Left = 8 18 | Top = 8 19 | Width = 75 20 | Height = 25 21 | Caption = 'btnTypesList' 22 | TabOrder = 0 23 | OnClick = btnTypesListClick 24 | end 25 | object ListBox1: TListBox 26 | Left = 96 27 | Top = 8 28 | Width = 441 29 | Height = 193 30 | ItemHeight = 13 31 | TabOrder = 1 32 | end 33 | object TreeView1: TTreeView 34 | Left = 96 35 | Top = 216 36 | Width = 441 37 | Height = 297 38 | Indent = 19 39 | TabOrder = 2 40 | OnDblClick = TreeView1DblClick 41 | end 42 | object btnHierarchy: TButton 43 | Left = 8 44 | Top = 216 45 | Width = 75 46 | Height = 25 47 | Caption = 'btnHierarchy' 48 | TabOrder = 3 49 | OnClick = btnHierarchyClick 50 | end 51 | object btnPackages: TButton 52 | Left = 8 53 | Top = 48 54 | Width = 75 55 | Height = 25 56 | Caption = 'btnPackages' 57 | TabOrder = 4 58 | OnClick = btnPackagesClick 59 | end 60 | object Button1: TButton 61 | Left = 8 62 | Top = 96 63 | Width = 75 64 | Height = 25 65 | Caption = 'btnMemory' 66 | TabOrder = 5 67 | OnClick = Button1Click 68 | end 69 | object StatusBar1: TStatusBar 70 | Left = 0 71 | Top = 527 72 | Width = 561 73 | Height = 19 74 | Panels = <> 75 | SimplePanel = True 76 | end 77 | end 78 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/ProjectGroup1.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {DBE05C0C-F2FA-47F9-AD96-CE6DE752D2FB} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /03/TypesList/TypeInfoForm.dfm: -------------------------------------------------------------------------------- 1 | object FormTypeInfo: TFormTypeInfo 2 | Left = 0 3 | Top = 0 4 | Caption = 'FormTypeInfo' 5 | ClientHeight = 308 6 | ClientWidth = 600 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 HeaderControl1: THeaderControl 17 | Left = 0 18 | Top = 0 19 | Width = 600 20 | Height = 17 21 | Sections = < 22 | item 23 | ImageIndex = -1 24 | MinWidth = 100 25 | Text = 'Properties' 26 | Width = 200 27 | end 28 | item 29 | ImageIndex = -1 30 | MinWidth = 200 31 | Text = 'Methods' 32 | Width = 200 33 | end 34 | item 35 | ImageIndex = -1 36 | MinWidth = 100 37 | Text = 'Fields' 38 | Width = 200 39 | end> 40 | OnSectionResize = HeaderControl1SectionResize 41 | ExplicitLeft = 232 42 | ExplicitTop = 40 43 | ExplicitWidth = 0 44 | end 45 | object ListProperties: TListBox 46 | Left = 0 47 | Top = 17 48 | Width = 200 49 | Height = 291 50 | Align = alLeft 51 | ItemHeight = 13 52 | TabOrder = 1 53 | end 54 | object ListMethods: TListBox 55 | Left = 200 56 | Top = 17 57 | Width = 200 58 | Height = 291 59 | Align = alLeft 60 | ItemHeight = 13 61 | TabOrder = 2 62 | end 63 | object ListFields: TListBox 64 | Left = 400 65 | Top = 17 66 | Width = 200 67 | Height = 291 68 | Align = alClient 69 | ItemHeight = 13 70 | TabOrder = 3 71 | ExplicitLeft = 472 72 | ExplicitTop = 88 73 | ExplicitWidth = 121 74 | ExplicitHeight = 97 75 | end 76 | end 77 | -------------------------------------------------------------------------------- /06/FirstTouch/FirstTouch_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit FirstTouch_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls; 8 | 9 | type 10 | TForm1 = class(TForm) 11 | Memo1: TMemo; 12 | protected 13 | procedure CreateWnd; override; 14 | procedure DestroyWnd; override; 15 | { Private declarations } 16 | public 17 | procedure WMTouch(var Message: TMessage); message WM_TOUCH; 18 | end; 19 | 20 | var 21 | Form1: TForm1; 22 | 23 | implementation 24 | 25 | {$R *.dfm} 26 | 27 | { TForm1 } 28 | 29 | procedure TForm1.CreateWnd; 30 | begin 31 | inherited; 32 | RegisterTouchWindow(Handle, 0); 33 | end; 34 | 35 | procedure TForm1.DestroyWnd; 36 | begin 37 | inherited; 38 | UnregisterTouchWindow(Handle); 39 | end; 40 | 41 | procedure TForm1.WMTouch(var Message: TMessage); 42 | 43 | function TouchPointToPoint(const TouchPoint: TTouchInput): TPoint; 44 | begin 45 | Result := Point(TouchPoint.X div 100, TouchPoint.Y div 100); 46 | PhysicalToLogicalPoint(Handle, Result); 47 | end; 48 | 49 | var 50 | TouchInputs: array of TTouchInput; 51 | TouchInput: TTouchInput; 52 | Handled: Boolean; 53 | Point: TPoint; 54 | 55 | begin 56 | Memo1.Clear; 57 | Handled := False; 58 | SetLength(TouchInputs, Message.WParam); 59 | GetTouchInputInfo(Message.LParam, Message.WParam, @TouchInputs[0], 60 | SizeOf(TTouchInput)); 61 | try 62 | for TouchInput in TouchInputs do 63 | begin 64 | Point := TouchPointToPoint(TouchInput); 65 | Memo1.Lines.Add(Format ('%d:%d', [Point.X, Point.Y])); 66 | end; 67 | 68 | Handled := True; 69 | finally 70 | if Handled then 71 | CloseTouchInputHandle(Message.LParam) 72 | else 73 | inherited; 74 | end; 75 | end; 76 | 77 | end. 78 | -------------------------------------------------------------------------------- /06/EditGestures/EditGestures_MainForm.pas: -------------------------------------------------------------------------------- 1 | unit EditGestures_MainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdActns, ActnList, GestureMgr, StdCtrls, ExtCtrls; 8 | 9 | type 10 | TFormEditGest = class(TForm) 11 | lbEditFirstName: TLabeledEdit; 12 | lbEditLastName: TLabeledEdit; 13 | lblEditCity: TLabeledEdit; 14 | GestureManager1: TGestureManager; 15 | ActionList1: TActionList; 16 | EditCut1: TEditCut; 17 | EditCopy1: TEditCopy; 18 | EditPaste1: TEditPaste; 19 | EditSelectAll1: TEditSelectAll; 20 | EditUndo1: TEditUndo; 21 | EditDelete1: TEditDelete; 22 | EditClear1: TAction; 23 | Memo1: TMemo; 24 | procedure EditClear1Execute(Sender: TObject); 25 | procedure FormGesture(Sender: TObject; const EventInfo: TGestureEventInfo; 26 | var Handled: Boolean); 27 | procedure ActionList1Execute(Action: TBasicAction; var Handled: Boolean); 28 | private 29 | { Private declarations } 30 | public 31 | procedure Log (const strMsg: string); 32 | end; 33 | 34 | var 35 | FormEditGest: TFormEditGest; 36 | 37 | implementation 38 | 39 | {$R *.dfm} 40 | 41 | procedure TFormEditGest.ActionList1Execute(Action: TBasicAction; 42 | var Handled: Boolean); 43 | begin 44 | Log ('Action: ' + Action.Name); 45 | end; 46 | 47 | procedure TFormEditGest.EditClear1Execute(Sender: TObject); 48 | begin 49 | if (ActiveControl is TCustomEdit) then 50 | TCustomEdit(ActiveControl).Clear; 51 | end; 52 | 53 | procedure TFormEditGest.FormGesture(Sender: TObject; 54 | const EventInfo: TGestureEventInfo; var Handled: Boolean); 55 | begin 56 | Log ('Gesture performed'); 57 | end; 58 | 59 | procedure TFormEditGest.Log(const strMsg: string); 60 | begin 61 | Memo1.Lines.Add (strMsg); 62 | end; 63 | 64 | end. 65 | -------------------------------------------------------------------------------- /07/DSnapGateway/ServerContainerUnit1.pas: -------------------------------------------------------------------------------- 1 | unit ServerContainerUnit1; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, Classes, 7 | DSTCPServerTransport, 8 | DSServer, DSCommonServer; 9 | 10 | type 11 | TServerContainer1 = class(TDataModule) 12 | DSServer1: TDSServer; 13 | DSTCPServerTransport1: TDSTCPServerTransport; 14 | DSServerClass1: TDSServerClass; 15 | procedure DSServerClass1GetClass(DSServerClass: TDSServerClass; 16 | var PersistentClass: TPersistentClass); 17 | private 18 | { Private declarations } 19 | public 20 | end; 21 | 22 | procedure RunDSServer; 23 | 24 | implementation 25 | 26 | uses Windows, ServerMethodsUnit2; 27 | 28 | {$R *.dfm} 29 | 30 | procedure TServerContainer1.DSServerClass1GetClass( 31 | DSServerClass: TDSServerClass; var PersistentClass: TPersistentClass); 32 | begin 33 | PersistentClass := ServerMethodsUnit2.TServerMethods2; 34 | end; 35 | 36 | procedure RunDSServer; 37 | var 38 | LModule: TServerContainer1; 39 | LInputRecord: TInputRecord; 40 | LEvent: DWord; 41 | LHandle: THandle; 42 | begin 43 | Writeln(Format('Starting %s', [TServerContainer1.ClassName])); 44 | LModule := TServerContainer1.Create(nil); 45 | try 46 | LModule.DSServer1.Start; 47 | try 48 | Writeln('Press ESC to stop the server'); 49 | LHandle := GetStdHandle(STD_INPUT_HANDLE); 50 | while True do 51 | begin 52 | Win32Check(ReadConsoleInput(LHandle, LInputRecord, 1, LEvent)); 53 | if (LInputRecord.EventType = KEY_EVENT) and 54 | LInputRecord.Event.KeyEvent.bKeyDown and 55 | (LInputRecord.Event.KeyEvent.wVirtualKeyCode = VK_ESCAPE) then 56 | break; 57 | end; 58 | finally 59 | LModule.DSServer1.Stop; 60 | end; 61 | finally 62 | LModule.Free; 63 | end; 64 | end; 65 | 66 | end. 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /07/DSnapJson/DSnapJsonGroup.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {17BA8DE0-190D-4AF5-8AFA-1F4791287D8F} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /07/DSnapHttpConsole/DSnapHttpConsoleGroup.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {2D171D59-3BBC-43E0-BFDF-3BAA0CD56750} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /05/Win7Libraries/Win7Libraries_MainForm.dfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Win7Libraries' 5 | ClientHeight = 315 6 | ClientWidth = 657 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 | DesignSize = ( 15 | 657 16 | 315) 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object btnOpenClassic: TButton 20 | Left = 24 21 | Top = 24 22 | Width = 145 23 | Height = 25 24 | Caption = 'btnOpenClassic' 25 | TabOrder = 0 26 | OnClick = btnOpenClassicClick 27 | end 28 | object btnOpenNew: TButton 29 | Left = 24 30 | Top = 56 31 | Width = 145 32 | Height = 25 33 | Caption = 'btnOpenNew' 34 | TabOrder = 1 35 | OnClick = btnOpenNewClick 36 | end 37 | object btnLibraries: TButton 38 | Left = 24 39 | Top = 120 40 | Width = 145 41 | Height = 25 42 | Caption = 'btnLibraries' 43 | TabOrder = 2 44 | OnClick = btnLibrariesClick 45 | end 46 | object Memo1: TMemo 47 | Left = 192 48 | Top = 24 49 | Width = 448 50 | Height = 266 51 | Anchors = [akLeft, akTop, akRight, akBottom] 52 | Lines.Strings = ( 53 | 'Memo1') 54 | TabOrder = 3 55 | ExplicitWidth = 345 56 | ExplicitHeight = 241 57 | end 58 | object btnLibraryXml: TButton 59 | Left = 24 60 | Top = 160 61 | Width = 145 62 | Height = 25 63 | Caption = 'btnLibraryXml' 64 | TabOrder = 4 65 | OnClick = btnLibraryXmlClick 66 | end 67 | object OpenDialog1: TOpenDialog 68 | Left = 232 69 | Top = 16 70 | end 71 | object FileOpenDialog1: TFileOpenDialog 72 | FavoriteLinks = <> 73 | FileTypes = <> 74 | Options = [] 75 | Left = 320 76 | Top = 48 77 | end 78 | end 79 | -------------------------------------------------------------------------------- /02/NamedThreads/NamedThreadsMainForm.pas: -------------------------------------------------------------------------------- 1 | unit NamedThreadsMainForm; 2 | 3 | interface 4 | 5 | uses 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, 7 | Dialogs, StdCtrls, ComCtrls, ExtCtrls; 8 | 9 | type 10 | TFormNamedThreads = class(TForm) 11 | btnCreate: TButton; 12 | btnTerminate: TButton; 13 | StatusBar1: TStatusBar; 14 | Memo1: TMemo; 15 | Timer1: TTimer; 16 | procedure btnCreateClick(Sender: TObject); 17 | procedure btnTerminateClick(Sender: TObject); 18 | procedure Timer1Timer(Sender: TObject); 19 | procedure FormCreate(Sender: TObject); 20 | private 21 | procedure MyThreadTerminated(Sender: TObject); 22 | public 23 | procedure Log (const strMsg: string); 24 | end; 25 | 26 | var 27 | FormNamedThreads: TFormNamedThreads; 28 | 29 | implementation 30 | 31 | uses MyThreadClass; 32 | 33 | {$R *.dfm} 34 | 35 | var 36 | aGlobalThread: TMyThread; 37 | 38 | procedure TFormNamedThreads.btnCreateClick(Sender: TObject); 39 | begin 40 | if not Assigned (aGlobalThread) then 41 | begin 42 | aGlobalThread := TMyThread.Create (False); 43 | aGlobalThread.OnTerminate := MyThreadTerminated; 44 | end; 45 | end; 46 | 47 | procedure TFormNamedThreads.btnTerminateClick(Sender: TObject); 48 | begin 49 | if Assigned (aGlobalThread) then 50 | aGlobalThread.Terminate; 51 | end; 52 | 53 | procedure TFormNamedThreads.FormCreate(Sender: TObject); 54 | begin 55 | TThread.NameThreadForDebugging('Main'); 56 | end; 57 | 58 | procedure TFormNamedThreads.Log(const strMsg: string); 59 | begin 60 | Memo1.Lines.Add (strMsg); 61 | end; 62 | 63 | procedure TFormNamedThreads.MyThreadTerminated(Sender: TObject); 64 | begin 65 | aGlobalThread := nil; 66 | end; 67 | 68 | procedure TFormNamedThreads.Timer1Timer(Sender: TObject); 69 | begin 70 | Log ('Main: ' + CurrentTimeAsStr); 71 | end; 72 | 73 | end. 74 | -------------------------------------------------------------------------------- /07/DSnapWebAppDebug/DSnapWebAppDebugGroup.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {DBE05C0C-F2FA-47F9-AD96-CE6DE752D2FB} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Default.Personality.12 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /05/FileAccess/FileAccessForm.dfm: -------------------------------------------------------------------------------- 1 | object FormFile: TFormFile 2 | Left = 0 3 | Top = 0 4 | Caption = 'FileAccess' 5 | ClientHeight = 303 6 | ClientWidth = 567 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 | OnCreate = FormCreate 15 | PixelsPerInch = 96 16 | TextHeight = 13 17 | object Memo1: TMemo 18 | Left = 24 19 | Top = 16 20 | Width = 425 21 | Height = 265 22 | Lines.Strings = ( 23 | 'Some text here.') 24 | TabOrder = 0 25 | end 26 | object btnSaveRoot: TButton 27 | Left = 456 28 | Top = 16 29 | Width = 100 30 | Height = 25 31 | Caption = 'Save Root' 32 | TabOrder = 1 33 | OnClick = btnSaveRootClick 34 | end 35 | object btnSaveLocal: TButton 36 | Left = 456 37 | Top = 56 38 | Width = 100 39 | Height = 25 40 | Caption = 'Save Local' 41 | TabOrder = 2 42 | OnClick = btnSaveLocalClick 43 | end 44 | object btnLoadLocal: TButton 45 | Left = 456 46 | Top = 96 47 | Width = 100 48 | Height = 25 49 | Caption = 'Load Local' 50 | TabOrder = 3 51 | OnClick = btnLoadLocalClick 52 | end 53 | object btnSaveDocs: TButton 54 | Left = 455 55 | Top = 136 56 | Width = 101 57 | Height = 25 58 | Caption = 'Save Docs' 59 | TabOrder = 4 60 | OnClick = btnSaveDocsClick 61 | end 62 | object btnLoadDocs: TButton 63 | Left = 455 64 | Top = 176 65 | Width = 101 66 | Height = 25 67 | Caption = 'Load Docs' 68 | TabOrder = 5 69 | OnClick = btnLoadDocsClick 70 | end 71 | object btnUAC: TButton 72 | Left = 456 73 | Top = 256 74 | Width = 100 75 | Height = 25 76 | Caption = 'Copy (UAC)' 77 | TabOrder = 6 78 | OnClick = btnUACClick 79 | end 80 | end 81 | --------------------------------------------------------------------------------