├── .gitignore ├── Delphinus.Info.json ├── Delphinus.Install.json ├── LICENSE.txt ├── Quick.Amazon.pas ├── Quick.AppService.pas ├── Quick.Arrays.Helper.pas ├── Quick.Arrays.pas ├── Quick.AutoMapper.pas ├── Quick.Azure.pas ├── Quick.Base64.pas ├── Quick.Cache.Intf.pas ├── Quick.Chrono.pas ├── Quick.CloudStorage.Provider.Amazon.pas ├── Quick.CloudStorage.Provider.Azure.pas ├── Quick.CloudStorage.pas ├── Quick.Collections.pas ├── Quick.Commons.pas ├── Quick.Compression.LZO.pas ├── Quick.Compression.pas ├── Quick.Conditions.pas ├── Quick.Config.Base.pas ├── Quick.Config.Json.pas ├── Quick.Config.Registry.pas ├── Quick.Config.YAML.pas ├── Quick.Console.pas ├── Quick.Crypto.pas ├── Quick.Data.Custom.pas ├── Quick.Data.InfluxDB.pas ├── Quick.Data.Redis.pas ├── Quick.Debug.Utils.pas ├── Quick.Expression.pas ├── Quick.FaultControl.pas ├── Quick.FileMonitor.pas ├── Quick.Files.pas ├── Quick.Format.pas ├── Quick.HttpClient.pas ├── Quick.HttpServer.Request.pas ├── Quick.HttpServer.Response.pas ├── Quick.HttpServer.Types.pas ├── Quick.HttpServer.pas ├── Quick.IOC.pas ├── Quick.JSON.Helper.pas ├── Quick.JSON.Utils.pas ├── Quick.JSONRecord.pas ├── Quick.Json.Serializer.pas ├── Quick.Json.fpc.Compatibility.pas ├── Quick.Linq.pas ├── Quick.Lists.pas ├── Quick.Log.pas ├── Quick.Logger.Intf.pas ├── Quick.Mapper.Intf.pas ├── Quick.MemoryCache.Compressor.GZip.pas ├── Quick.MemoryCache.Compressor.LZO.pas ├── Quick.MemoryCache.Serializer.Json.pas ├── Quick.MemoryCache.Types.pas ├── Quick.MemoryCache.pas ├── Quick.Network.pas ├── Quick.OAuth.Utils.pas ├── Quick.OAuth.pas ├── Quick.Options.Serializer.Json.pas ├── Quick.Options.Serializer.Yaml.pas ├── Quick.Options.pas ├── Quick.Parameters.pas ├── Quick.Pooling.pas ├── Quick.Process.pas ├── Quick.RTTI.Utils.pas ├── Quick.RegEx.Utils.pas ├── Quick.Registry.pas ├── Quick.Rtti.fpc.Compatibility.pas ├── Quick.SMTP.pas ├── Quick.Serializer.Intf.pas ├── Quick.Service.pas ├── Quick.SyncObjs.Linux.Compatibility.pas ├── Quick.SysInfo.pas ├── Quick.Template.pas ├── Quick.Threads.pas ├── Quick.Url.Utils.pas ├── Quick.Value.RTTI.pas ├── Quick.Value.pas ├── Quick.WMI.pas ├── Quick.WebBrowser.pas ├── Quick.YAML.Serializer.pas ├── Quick.YAML.pas ├── QuickLib.inc ├── QuickLib.png ├── README.md ├── WbemScripting_TLB.pas ├── docs ├── QuickLib.png ├── QuickLib_logo.png └── githubstartme.jpg ├── quicklib.lpk ├── quicklib.pas └── samples ├── delphi ├── QuickAppService │ └── ConsoleAndService │ │ ├── MyServiceConsole.dpr │ │ ├── MyServiceConsole.dproj │ │ └── MyServiceConsole.res ├── QuickArrayHelper │ ├── ArrayHelpers.dpr │ ├── ArrayHelpers.dproj │ └── ArrayHelpers.res ├── QuickArrays │ ├── FlexArrays │ │ ├── ManageFlexArray.dpr │ │ ├── ManageFlexArray.dproj │ │ └── ManageFlexArray.res │ ├── FlexPairArrays │ │ ├── ManageFlexPairArray.dpr │ │ ├── ManageFlexPairArray.dproj │ │ └── ManageFlexPairArray.res │ └── ManageArrays │ │ ├── ManageArrays.deployproj │ │ ├── ManageArrays.dpr │ │ ├── ManageArrays.dproj │ │ └── ManageArrays.res ├── QuickAutoMapper │ ├── AutoMappingObjects.dpr │ ├── AutoMappingObjects.dproj │ └── AutoMappingObjects.res ├── QuickChrono │ ├── ChronoDemo.dpr │ ├── ChronoDemo.dproj │ ├── ChronoDemo.ico │ ├── ChronoDemo.res │ ├── Main.dfm │ └── Main.pas ├── QuickCollections │ ├── InterfacedLists.dpr │ └── InterfacedLists.dproj ├── QuickCommons │ └── Url │ │ ├── Url_Manipulation.dpr │ │ └── Url_Manipulation.dproj ├── QuickCompression │ ├── CompressionTest.dpr │ ├── CompressionTest.dproj │ └── CompressionTest.res ├── QuickConditions │ ├── ConditionChecks.deployproj │ ├── ConditionChecks.dpr │ └── ConditionChecks.dproj ├── QuickConfig │ ├── ConfigToJSON │ │ ├── ConfigToJSON.dpr │ │ ├── ConfigToJSON.dproj │ │ ├── ConfigToJSON.res │ │ ├── Main.dfm │ │ └── Main.pas │ ├── ConfigToRegistry │ │ ├── ConfigToRegistry.dpr │ │ ├── ConfigToRegistry.dproj │ │ ├── ConfigToRegistry.res │ │ ├── Main.dfm │ │ └── Main.pas │ └── ConfigToYAML │ │ ├── ConfigToYAML.dpr │ │ ├── ConfigToYAML.dproj │ │ ├── ConfigToYAML.res │ │ ├── Main.dfm │ │ └── Main.pas ├── QuickConsole │ ├── ConsoleMenu │ │ ├── QuickConsoleMenu.dpr │ │ ├── QuickConsoleMenu.dproj │ │ └── QuickConsoleMenu.res │ └── ConsoleOut │ │ ├── ConsoleOut.dpr │ │ ├── ConsoleOut.dproj │ │ └── ConsoleOut.res ├── QuickDebugUtils │ ├── DebugUtils.dpr │ └── DebugUtils.dproj ├── QuickExpressions │ ├── ExpressionsTest.dpr │ └── ExpressionsTest.dproj ├── QuickHttpServer │ └── HttpServer │ │ ├── HttpServerService.Logger.pas │ │ ├── HttpServerService.dpr │ │ ├── HttpServerService.dproj │ │ └── HttpServerService.res ├── QuickIOC │ ├── AndroidManifest.template.xml │ ├── IOCdemo.dpr │ ├── IOCdemo.dproj │ ├── IOCdemo.res │ └── TypedFactory │ │ ├── TypedFactory.dpr │ │ └── TypedFactory.dproj ├── QuickJsonSerializer │ ├── ComplexObjects │ │ ├── ComplexObjects.dpr │ │ └── ComplexObjects.dproj │ ├── JsonSerializerTest │ │ ├── Entitlement.TemplateOSX.xml │ │ ├── JsonSerializerTest.deployproj │ │ ├── JsonSerializerTest.dpr │ │ ├── JsonSerializerTest.dproj │ │ └── info.plist.TemplateOSX.xml │ └── ObjectToJsonStream │ │ ├── ObjectToJsonStream.dpr │ │ └── ObjectToJsonStream.dproj ├── QuickLinq │ └── LinqLists │ │ ├── AndroidManifest.template.xml │ │ ├── LinqList.dpr │ │ ├── LinqList.dproj │ │ └── LinqList.res ├── QuickLists │ ├── IndexedList.dproj │ ├── IndexedList.res │ └── IndexedLists │ │ ├── IndexedList.dpr │ │ ├── IndexedList.dproj │ │ └── IndexedList.res ├── QuickMemoryCache │ ├── MemoryCache │ │ ├── MemCacheTest.dpr │ │ ├── MemCacheTest.dproj │ │ ├── MemCacheTest.res │ │ ├── MemCacheTest2.dpr │ │ ├── MemCacheTest2.dproj │ │ └── MemCacheTest2.res │ └── MemoryCacheVariant │ │ ├── MemCacheVariantTest.dpr │ │ ├── MemCacheVariantTest.dproj │ │ └── MemCacheVariantTest.res ├── QuickNetwork │ └── GetIPRange │ │ ├── GetIPRanges.dpr │ │ ├── GetIPRanges.dproj │ │ └── GetIPRanges.res ├── QuickOptions │ ├── Optionsdemo.dpr │ ├── Optionsdemo.dproj │ └── Optionsdemo.res ├── QuickParameters │ ├── Parameters.dpr │ └── Parameters.dproj ├── QuickPooling │ ├── HttpPool.dpr │ └── HttpPool.dproj ├── QuickSMTP │ ├── SendEmail.dpr │ ├── SendEmail.dproj │ └── SendEmail.res ├── QuickService │ └── ServiceManagement │ │ ├── ServiceManagement.dpr │ │ ├── ServiceManagement.dproj │ │ └── ServiceManagement.res ├── QuickTemplate │ ├── Template1.dpr │ └── Template1.dproj ├── QuickThreads │ ├── AnonymousThread │ │ ├── AnonymousThread.dpr │ │ ├── AnonymousThread.dproj │ │ └── AnonymousThread.res │ ├── BackgroundTasks │ │ ├── RunBackgroundtask.dpr │ │ ├── RunBackgroundtask.dproj │ │ └── RunBackgroundtask.res │ ├── RunTask │ │ ├── RunTask.dpr │ │ ├── RunTask.dproj │ │ ├── RunTask.res │ │ ├── RunTask_Httpclient.dpr │ │ ├── RunTask_Httpclient.dproj │ │ └── RunTask_Httpclient.res │ └── ScheduledTasks │ │ ├── RunScheduledtask.dpr │ │ ├── RunScheduledtask.dproj │ │ └── RunScheduledtask.res └── QuickValue │ ├── QuickValue.dpr │ ├── QuickValue.dproj │ ├── QuickValue.res │ ├── RecordValues.dpr │ └── RecordValues.dproj ├── firemonkey ├── QuickAutoMapper │ ├── AndroidManifest.template.xml │ ├── AutoMapperObjects.deployproj │ ├── AutoMapperObjects.dpr │ ├── AutoMapperObjects.dproj │ ├── AutoMapperObjects.res │ ├── Entitlement.TemplateOSX.xml │ ├── Entitlement.TemplateOSX32.xml │ ├── Entitlement.TemplateiOS.xml │ ├── Main.fmx │ ├── Main.pas │ ├── info.plist.TemplateOSX.xml │ └── info.plist.TemplateiOS.xml ├── QuickChrono │ ├── AndroidManifest.template.xml │ ├── Chrono.fmx │ ├── Chrono.pas │ ├── ChronoCheck.deployproj │ ├── ChronoCheck.dpr │ ├── ChronoCheck.dproj │ ├── ChronoCheck.res │ ├── Entitlement.TemplateOSX32.xml │ ├── Entitlement.TemplateiOS.xml │ ├── info.plist.TemplateOSX.xml │ └── info.plist.TemplateiOS.xml ├── QuickConfig │ ├── ConfigToJSON │ │ ├── ConfigToJSON.dpr │ │ ├── ConfigToJSON.dproj │ │ ├── Main.fmx │ │ └── Main.pas │ └── ConfigToYAML │ │ ├── AndroidManifest.template.xml │ │ ├── ConfigToYAML.dpr │ │ ├── ConfigToYAML.dproj │ │ ├── ConfigToYAML.res │ │ ├── Main.fmx │ │ └── Main.pas ├── QuickHttpServer │ └── HttpServer │ │ ├── HttpServerService.Logger.pas │ │ ├── HttpServerService.dpr │ │ └── HttpServerService.dproj ├── QuickIOC │ └── IOCDemo │ │ ├── AndroidManifest.template.xml │ │ ├── Dependencies.pas │ │ ├── IOCDemo.deployproj │ │ ├── IOCDemo.dpr │ │ ├── IOCDemo.dproj │ │ ├── IOCDemo.res │ │ ├── Main.fmx │ │ └── Main.pas ├── QuickJsonSerializer │ └── JsonSerializerTest │ │ ├── Entitlement.TemplateOSX.xml │ │ ├── Entitlement.TemplateiOS.xml │ │ ├── JsonSerializer._@emb_.tmp │ │ ├── JsonSerializer.deployproj │ │ ├── JsonSerializer.dpr │ │ ├── JsonSerializer.dproj │ │ ├── frmMain.fmx │ │ ├── info.plist.TemplateOSX.xml │ │ ├── info.plist.TemplateiOS.xml │ │ ├── main.fmx │ │ └── main.pas ├── QuickOAuth │ ├── GMail.dpr │ ├── GMail.dproj │ ├── Main.fmx │ ├── Main.pas │ ├── OAuth.GMail.pas │ └── Readme.txt ├── QuickSysInfo │ ├── AndroidManifest.template.xml │ ├── Entitlement.TemplateOSX32.xml │ ├── Entitlement.TemplateiOS.xml │ ├── SystemInfo.deployproj │ ├── SystemInfo.dpr │ ├── SystemInfo.dproj │ ├── SystemInfo.res │ ├── frmMain.fmx │ ├── frmMain.pas │ ├── info.plist.TemplateOSX.xml │ └── info.plist.TemplateiOS.xml └── QuickThreads │ └── ScheduledTasks │ ├── AndroidManifest.template.xml │ ├── Entitlement.TemplateOSX32.xml │ ├── Entitlement.TemplateiOS.xml │ ├── RunScheduledTasks.deployproj │ ├── RunScheduledTasks.dpr │ ├── RunScheduledTasks.dproj │ ├── RunScheduledTasks.res │ ├── info.plist.TemplateOSX.xml │ ├── info.plist.TemplateiOS.xml │ ├── main.fmx │ └── main.pas └── fpc ├── QuickAppService └── ConsoleAndService │ ├── MyServiceConsole.lpi │ ├── MyServiceConsole.lpr │ ├── MyServiceConsole.res │ ├── backup │ ├── MyServiceConsole.lpi │ └── MyServiceConsole.pas │ └── lib │ └── i386-win32 │ ├── MyServiceConsole.res │ └── QuickAppServiceSample.res ├── QuickArrayHelper ├── ArrayHelpers.lpi └── ArrayHelpers.pas ├── QuickArrays ├── FlexArrays │ ├── ManageFlexArrays.lpi │ └── ManageFlexArrays.lpr ├── FlexPairArrays │ ├── ManageFlexPairArrays.lpi │ └── ManageFlexPairArrays.lpr └── ManageXArrays │ ├── ManageArrays.lpi │ ├── ManageArrays.pas │ ├── link.res │ └── ppas.bat ├── QuickAutoMapper ├── AutoMapperObjects.lpi └── AutoMapperObjects.lpr ├── QuickChrono ├── simplechrono.lpi └── simplechrono.lpr ├── QuickConfig ├── ConfigToJSON │ ├── QuickConfig.ico │ ├── QuickConfig.lpi │ ├── QuickConfig.lpr │ ├── QuickConfig.pas │ ├── QuickConfig.res │ ├── lib │ │ └── i386-win32 │ │ │ ├── QuickConfig.res │ │ │ └── umain.lfm │ ├── umain.lfm │ └── umain.pas ├── ConfigToRegistry │ ├── QuickConfig.ico │ ├── QuickConfig.lpi │ ├── QuickConfig.pas │ ├── QuickConfig.res │ ├── lib │ │ ├── i386-win32 │ │ │ ├── QuickConfig.res │ │ │ └── umain.lfm │ │ └── x86_64-win64 │ │ │ ├── QuickConfig.res │ │ │ └── umain.lfm │ ├── umain.lfm │ └── umain.pas └── ConfigToYAML │ ├── QuickConfig.lpi │ ├── QuickConfig.lpr │ ├── QuickConfig.pas │ ├── QuickConfig.res │ ├── lib │ ├── i386-win32 │ │ ├── QuickConfig.res │ │ └── umain.lfm │ └── x86_64-linux │ │ ├── QuickConfig.res │ │ └── umain.lfm │ ├── umain.lfm │ └── umain.pas ├── QuickConsole ├── ConsoleMenu │ ├── ConsoleMenu.lpi │ ├── ConsoleMenu.pas │ ├── ConsoleMenu.res │ ├── backup │ │ ├── ConsoleMenu.lpi │ │ └── ConsoleMenu.pas │ └── lib │ │ └── i386-win32 │ │ └── ConsoleMenu.res └── ConsoleOut │ ├── ConsoleOut.lpi │ ├── ConsoleOut.pas │ ├── ConsoleOut.res │ ├── backup │ └── ConsoleOut.pas │ ├── bin │ └── x86_64-linux │ │ └── ConsoleOut │ └── lib │ ├── i386-win32 │ └── ConsoleOut.res │ └── x86_64-linux │ └── ConsoleOut.res ├── QuickHttpServer ├── HttpServerService.Logger.pas ├── HttpServerService.lpi └── HttpServerService.pas ├── QuickJsonSerializer ├── JsonSerializerTest1 │ ├── JsonSerializerTest1.lpi │ └── JsonSerializerTest1.lpr └── JsonSerializerTest2 │ ├── JsonSerializer.ico │ ├── JsonSerializer.lpi │ ├── JsonSerializer.lpr │ ├── JsonSerializer.res │ ├── lib │ ├── i386-win32 │ │ ├── JsonSerializer.res │ │ └── main.lfm │ └── x86_64-linux │ │ ├── JsonSerializer.res │ │ └── main.lfm │ ├── main.lfm │ └── main.pas ├── QuickLinq ├── LinqQuerySample.lpi └── LinqQuerySample.lpr ├── QuickNetwork └── GetIPRanges │ ├── GetIPRanges.lpi │ ├── GetIPRanges.pas │ ├── GetIPRanges.res │ └── lib │ └── i386-win32 │ └── GetIPRanges.res ├── QuickService └── ServiceManagement │ ├── ServiceManagement.lpi │ ├── ServiceManagement.pas │ ├── ServiceManagement.res │ └── lib │ └── i386-win32 │ └── ServiceManagement.res └── QuickThreads ├── AnonymousThreads ├── AnonymousThreads.lpi └── AnonymousThreads.lpr ├── BackgroundTasks ├── RunBackgroundTasks.lpi └── RunBackgroundTasks.lpr └── ScheduledTasks ├── RunScheduledTasks.lpi └── RunScheduledTasks.lpr /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | #ignore thumbnails created by windows 3 | Thumbs.db 4 | *.bak 5 | *.cache 6 | # Delphi compiler-generated binaries (safe to delete) 7 | *.exe 8 | *.dll 9 | *.bpl 10 | *.bpi 11 | *.dcp 12 | *.so 13 | *.apk 14 | *.drc 15 | *.map 16 | *.dres 17 | *.rsm 18 | *.tds 19 | *.dcu 20 | *.lib 21 | *.a 22 | *.o 23 | *.ocx 24 | *.zip 25 | *.log 26 | 27 | # Delphi autogenerated files (duplicated info) 28 | *.cfg 29 | *.hpp 30 | *Resource.rc 31 | 32 | # Delphi local files (user-specific info) 33 | *.local 34 | *.identcache 35 | *.projdata 36 | *.tvsconfig 37 | *.dsk 38 | 39 | # Delphi history and backups 40 | __history/ 41 | __recovery/ 42 | *.~* 43 | 44 | # Castalia statistics file (since XE7 Castalia is distributed with Delphi) 45 | *.stat 46 | desktop.ini 47 | *.ppu 48 | 49 | *.compiled 50 | 51 | lib/i386-win32/ 52 | 53 | backup/ 54 | debug/ 55 | release/ 56 | 57 | *.rsj 58 | 59 | *.lps 60 | bin/ 61 | *.res 62 | *.tmp 63 | bin 64 | *.xml 65 | *.or 66 | *.or 67 | /Reports 68 | *.or 69 | *.delphilsp.json 70 | -------------------------------------------------------------------------------- /Delphinus.Info.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "{039708CE-1DC1-4FC5-A58E-A77B3177A9C8}", 3 | "name": "", 4 | "picture": "QuickLib.png", 5 | "license_type": "Apache-2.0", 6 | "license_file": "LICENSE.txt", 7 | "platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64", 8 | "package_compiler_min": 22, 9 | "package_compiler_max": 36, 10 | "compiler_min": 22, 11 | "compiler_max": 36, 12 | "first_version": "1.0", 13 | "report_url": "", 14 | "dependencies": 15 | [ 16 | ] 17 | } -------------------------------------------------------------------------------- /Delphinus.Install.json: -------------------------------------------------------------------------------- 1 | { 2 | "search_pathes": 3 | [ 4 | { 5 | "pathes": ".", 6 | "platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64" 7 | } 8 | ], 9 | "browsing_pathes": 10 | [ 11 | { 12 | "pathes": ".", 13 | "platforms": "Win32;Win64;OSX32;Android;IOSDevice32;IOSDevice64;Linux64" 14 | } 15 | ], 16 | 17 | "source_folders": 18 | [ 19 | { 20 | "folder": ".", 21 | "recursive": true, 22 | "filter": "*;*.*" 23 | } 24 | ] 25 | 26 | } -------------------------------------------------------------------------------- /Quick.Amazon.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Amazon.pas -------------------------------------------------------------------------------- /Quick.AppService.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.AppService.pas -------------------------------------------------------------------------------- /Quick.Arrays.Helper.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Arrays.Helper.pas -------------------------------------------------------------------------------- /Quick.Arrays.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Arrays.pas -------------------------------------------------------------------------------- /Quick.AutoMapper.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.AutoMapper.pas -------------------------------------------------------------------------------- /Quick.Azure.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Azure.pas -------------------------------------------------------------------------------- /Quick.Base64.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Base64.pas -------------------------------------------------------------------------------- /Quick.Cache.Intf.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Cache.Intf.pas -------------------------------------------------------------------------------- /Quick.CloudStorage.Provider.Amazon.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.CloudStorage.Provider.Amazon.pas -------------------------------------------------------------------------------- /Quick.CloudStorage.Provider.Azure.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.CloudStorage.Provider.Azure.pas -------------------------------------------------------------------------------- /Quick.CloudStorage.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.CloudStorage.pas -------------------------------------------------------------------------------- /Quick.Collections.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Collections.pas -------------------------------------------------------------------------------- /Quick.Compression.LZO.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Compression.LZO.pas -------------------------------------------------------------------------------- /Quick.Compression.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Compression.pas -------------------------------------------------------------------------------- /Quick.Conditions.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Conditions.pas -------------------------------------------------------------------------------- /Quick.Config.Base.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Config.Base.pas -------------------------------------------------------------------------------- /Quick.Config.Json.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Config.Json.pas -------------------------------------------------------------------------------- /Quick.Config.Registry.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Config.Registry.pas -------------------------------------------------------------------------------- /Quick.Config.YAML.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Config.YAML.pas -------------------------------------------------------------------------------- /Quick.Crypto.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Crypto.pas -------------------------------------------------------------------------------- /Quick.Data.Custom.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Data.Custom.pas -------------------------------------------------------------------------------- /Quick.Data.InfluxDB.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Data.InfluxDB.pas -------------------------------------------------------------------------------- /Quick.Data.Redis.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Data.Redis.pas -------------------------------------------------------------------------------- /Quick.Debug.Utils.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Debug.Utils.pas -------------------------------------------------------------------------------- /Quick.Expression.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Expression.pas -------------------------------------------------------------------------------- /Quick.FaultControl.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.FaultControl.pas -------------------------------------------------------------------------------- /Quick.FileMonitor.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.FileMonitor.pas -------------------------------------------------------------------------------- /Quick.Files.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Files.pas -------------------------------------------------------------------------------- /Quick.Format.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Format.pas -------------------------------------------------------------------------------- /Quick.HttpClient.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.HttpClient.pas -------------------------------------------------------------------------------- /Quick.HttpServer.Request.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.HttpServer.Request.pas -------------------------------------------------------------------------------- /Quick.HttpServer.Response.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.HttpServer.Response.pas -------------------------------------------------------------------------------- /Quick.HttpServer.Types.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.HttpServer.Types.pas -------------------------------------------------------------------------------- /Quick.HttpServer.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.HttpServer.pas -------------------------------------------------------------------------------- /Quick.IOC.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.IOC.pas -------------------------------------------------------------------------------- /Quick.JSON.Helper.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.JSON.Helper.pas -------------------------------------------------------------------------------- /Quick.JSON.Utils.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.JSON.Utils.pas -------------------------------------------------------------------------------- /Quick.JSONRecord.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.JSONRecord.pas -------------------------------------------------------------------------------- /Quick.Json.Serializer.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Json.Serializer.pas -------------------------------------------------------------------------------- /Quick.Json.fpc.Compatibility.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Json.fpc.Compatibility.pas -------------------------------------------------------------------------------- /Quick.Linq.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Linq.pas -------------------------------------------------------------------------------- /Quick.Lists.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Lists.pas -------------------------------------------------------------------------------- /Quick.Log.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Log.pas -------------------------------------------------------------------------------- /Quick.Logger.Intf.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Logger.Intf.pas -------------------------------------------------------------------------------- /Quick.Mapper.Intf.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Mapper.Intf.pas -------------------------------------------------------------------------------- /Quick.MemoryCache.Compressor.GZip.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.MemoryCache.Compressor.GZip.pas -------------------------------------------------------------------------------- /Quick.MemoryCache.Compressor.LZO.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.MemoryCache.Compressor.LZO.pas -------------------------------------------------------------------------------- /Quick.MemoryCache.Serializer.Json.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.MemoryCache.Serializer.Json.pas -------------------------------------------------------------------------------- /Quick.MemoryCache.Types.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.MemoryCache.Types.pas -------------------------------------------------------------------------------- /Quick.MemoryCache.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.MemoryCache.pas -------------------------------------------------------------------------------- /Quick.Network.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Network.pas -------------------------------------------------------------------------------- /Quick.Options.Serializer.Json.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Options.Serializer.Json.pas -------------------------------------------------------------------------------- /Quick.Options.Serializer.Yaml.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Options.Serializer.Yaml.pas -------------------------------------------------------------------------------- /Quick.Options.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Options.pas -------------------------------------------------------------------------------- /Quick.Parameters.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Parameters.pas -------------------------------------------------------------------------------- /Quick.Pooling.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Pooling.pas -------------------------------------------------------------------------------- /Quick.Process.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Process.pas -------------------------------------------------------------------------------- /Quick.RTTI.Utils.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.RTTI.Utils.pas -------------------------------------------------------------------------------- /Quick.RegEx.Utils.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.RegEx.Utils.pas -------------------------------------------------------------------------------- /Quick.Registry.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Registry.pas -------------------------------------------------------------------------------- /Quick.Rtti.fpc.Compatibility.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Rtti.fpc.Compatibility.pas -------------------------------------------------------------------------------- /Quick.Serializer.Intf.pas: -------------------------------------------------------------------------------- 1 | unit Quick.Serializer.Intf; 2 | 3 | interface 4 | 5 | uses 6 | SysUtils, 7 | {$IFNDEF FPC} 8 | rtti; 9 | {$ELSE} 10 | Rtti, 11 | rttiutils; 12 | {$ENDIF} 13 | 14 | type 15 | TSerializerOptions = class 16 | private 17 | fUseEnumNames : Boolean; 18 | fUseJsonCaseSense : Boolean; 19 | fUseBase64Stream : Boolean; 20 | fUseNullStringsAsEmpty : Boolean; 21 | fUseGUIDWithBrackets: Boolean; 22 | fUseGUIDLowercase: Boolean; 23 | public 24 | property UseEnumNames : Boolean read fUseEnumNames write fUseEnumNames; 25 | property UseJsonCaseSense : Boolean read fUseJsonCaseSense write fUseJsonCaseSense; 26 | property UseBase64Stream : Boolean read fUseBase64Stream write fUseBase64Stream; 27 | property UseNullStringsAsEmpty : Boolean read fUseNullStringsAsEmpty write fUseNullStringsAsEmpty; 28 | property UseGUIDWithBrackets : Boolean read fUseGUIDWithBrackets write fUseGUIDWithBrackets; 29 | property UseGUIDLowercase : Boolean read fUseGUIDLowercase write fUseGUIDLowercase; 30 | end; 31 | 32 | ISerializer = interface 33 | ['{CA26F7AE-F1FE-41BE-9C23-723A687F60D1}'] 34 | function JsonToObject(aType: TClass; const aJson: string): TObject; overload; 35 | function JsonToObject(aObject: TObject; const aJson: string): TObject; overload; 36 | function ObjectToJson(aObject : TObject; aIndent : Boolean = False): string; 37 | function ValueToJson(const aValue : TValue; aIndent : Boolean = False) : string; 38 | function Options : TSerializerOptions; 39 | end; 40 | 41 | implementation 42 | 43 | end. 44 | -------------------------------------------------------------------------------- /Quick.Service.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Service.pas -------------------------------------------------------------------------------- /Quick.SyncObjs.Linux.Compatibility.pas: -------------------------------------------------------------------------------- 1 | unit Quick.SyncObjs.Linux.Compatibility; 2 | 3 | {i$ QuickLib.inc} 4 | 5 | interface 6 | 7 | uses 8 | SyncObjs; 9 | 10 | type 11 | 12 | TRTLCriticalSection = TCriticalSection; 13 | 14 | procedure EnterCriticalSection(CS : TCriticalSection); 15 | procedure LeaveCriticalSection(CS : TCriticalSection); 16 | procedure InitializeCriticalSection(var CS : TCriticalSection); 17 | procedure DeleteCriticalSection(CS : TCriticalSection); 18 | 19 | implementation 20 | 21 | procedure EnterCriticalSection(CS : TCriticalSection); 22 | begin 23 | CS.Enter; 24 | end; 25 | 26 | procedure LeaveCriticalSection(CS : TCriticalSection); 27 | begin 28 | CS.Leave; 29 | end; 30 | 31 | procedure InitializeCriticalSection(var CS : TCriticalSection); 32 | begin 33 | CS := TCriticalSection.Create; 34 | end; 35 | 36 | procedure DeleteCriticalSection(CS : TCriticalSection); 37 | begin 38 | CS.Free; 39 | end; 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /Quick.SysInfo.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.SysInfo.pas -------------------------------------------------------------------------------- /Quick.Template.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Template.pas -------------------------------------------------------------------------------- /Quick.Threads.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Threads.pas -------------------------------------------------------------------------------- /Quick.Url.Utils.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Url.Utils.pas -------------------------------------------------------------------------------- /Quick.Value.RTTI.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.Value.RTTI.pas -------------------------------------------------------------------------------- /Quick.WMI.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.WMI.pas -------------------------------------------------------------------------------- /Quick.WebBrowser.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/Quick.WebBrowser.pas -------------------------------------------------------------------------------- /QuickLib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/QuickLib.png -------------------------------------------------------------------------------- /docs/QuickLib.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/docs/QuickLib.png -------------------------------------------------------------------------------- /docs/QuickLib_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/docs/QuickLib_logo.png -------------------------------------------------------------------------------- /docs/githubstartme.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/docs/githubstartme.jpg -------------------------------------------------------------------------------- /quicklib.pas: -------------------------------------------------------------------------------- 1 | { This file was automatically created by Lazarus. Do not edit! 2 | This source is only used to compile and install the package. 3 | } 4 | 5 | unit QuickLib; 6 | 7 | {$warn 5023 off : no warning about unused units} 8 | interface 9 | 10 | uses 11 | Quick.Console, Quick.Base64, Quick.Commons, Quick.FileMonitor, Quick.Files, 12 | Quick.Format, Quick.Log, Quick.Network, Quick.Process, Quick.Service, 13 | Quick.SMTP, Quick.Threads, Quick.Config, Quick.Config.Provider.Json, 14 | Quick.Config.Provider.Registry, Quick.Json.fpc.Compatibility, 15 | Quick.JSONRecord; 16 | 17 | implementation 18 | 19 | end. 20 | -------------------------------------------------------------------------------- /samples/delphi/QuickAppService/ConsoleAndService/MyServiceConsole.dpr: -------------------------------------------------------------------------------- 1 | program MyServiceConsole; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$IFDEF FPC} 6 | {$MODE DELPHI} 7 | {$ENDIF} 8 | 9 | {$R *.res} 10 | 11 | uses 12 | SysUtils, 13 | Quick.Commons, 14 | Quick.Console, 15 | Quick.AppService; 16 | 17 | type 18 | 19 | {$IFDEF FPC} 20 | TSrvFactory = class 21 | class procedure CreateMyService; 22 | end; 23 | {$ENDIF} 24 | 25 | TMyService = class 26 | public 27 | procedure Execute; 28 | end; 29 | 30 | procedure TMyService.Execute; 31 | begin 32 | // your code 33 | end; 34 | 35 | var 36 | 37 | MyService : TMyService; 38 | 39 | {$IFDEF FPC} 40 | class procedure TSrvFactory.CreateMyService; 41 | begin 42 | MyService := TMyService.Create; 43 | end; 44 | {$ENDIF} 45 | 46 | begin 47 | 48 | try 49 | if not AppService.IsRunningAsService then 50 | begin 51 | cout('Running in console mode',etInfo); 52 | MyService := TMyService.Create; 53 | MyService.Execute; 54 | cout('Press [Enter] to exit',etInfo); 55 | ConsoleWaitForEnterKey; 56 | cout('Closing app...',etInfo); 57 | MyService.Free; 58 | end 59 | else 60 | begin 61 | AppService.ServiceName := 'MyService'; 62 | AppService.DisplayName := 'MyServicesvc'; 63 | AppService.DesktopInteraction := False; 64 | AppService.CanInstallWithOtherName := True; 65 | {$IFDEF FPC} 66 | AppService.OnStart := TSrvFactory.CreateMyService; 67 | {$ELSE} 68 | //you can pass an anonymous method to events 69 | AppService.OnStart := procedure 70 | begin 71 | MyService := TMyService.Create; 72 | end; 73 | {$ENDIF} 74 | AppService.OnExecute := MyService.Execute; 75 | AppService.OnStop := MyService.Free; 76 | AppService.CheckParams; 77 | end; 78 | except 79 | on E: Exception do 80 | Writeln(E.ClassName, ': ', E.Message); 81 | end; 82 | end. 83 | -------------------------------------------------------------------------------- /samples/delphi/QuickAppService/ConsoleAndService/MyServiceConsole.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickAppService/ConsoleAndService/MyServiceConsole.res -------------------------------------------------------------------------------- /samples/delphi/QuickArrayHelper/ArrayHelpers.dpr: -------------------------------------------------------------------------------- 1 | program ArrayHelpers; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Arrays.Helper; 12 | 13 | var 14 | 15 | myarray : TArray; 16 | 17 | begin 18 | try 19 | ReportMemoryLeaksOnShutdown := True; 20 | 21 | myarray.Add('one'); 22 | myarray.Add('two'); 23 | myarray.Add('three'); 24 | coutFmt('count: %d',[myarray.Count],etInfo); 25 | if myarray.Contains('two') then cout('found "two" in array',etInfo) 26 | else cout('not found',etInfo); 27 | 28 | coutFmt('"three" in position %d',[myarray.IndexOf('three')],etInfo); 29 | 30 | TArrayHelper.Add(myarray,'Four'); 31 | 32 | cout('Press to Exit',ccYellow); 33 | ConsoleWaitForEnterKey; 34 | except 35 | on E: Exception do 36 | Writeln(E.ClassName, ': ', E.Message); 37 | end; 38 | end. 39 | -------------------------------------------------------------------------------- /samples/delphi/QuickArrayHelper/ArrayHelpers.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickArrayHelper/ArrayHelpers.res -------------------------------------------------------------------------------- /samples/delphi/QuickArrays/FlexArrays/ManageFlexArray.dpr: -------------------------------------------------------------------------------- 1 | program ManageFlexArray; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Arrays; 12 | 13 | type 14 | TUser = class 15 | private 16 | fName : string; 17 | public 18 | property Name : string read fName write fName; 19 | end; 20 | 21 | var 22 | xarThings : TFlexArray; 23 | user : TUser; 24 | 25 | begin 26 | try 27 | xarThings.Add(10); 28 | xarThings.Add('Hello'); 29 | user := TUser.Create; 30 | try 31 | user.Name := 'Joe'; 32 | xarThings.Add(user); 33 | 34 | cout('Integer Item = %d',[xarThings[0].AsInteger],etInfo); 35 | cout('String Item = %s',[xarThings[1].AsString],etInfo); 36 | cout('Record Item = %s',[TUser(xarThings[2]).Name],etInfo); 37 | finally 38 | user.Free; 39 | end; 40 | cout('Press to Exit',ccYellow); 41 | ConsoleWaitForEnterKey; 42 | except 43 | on E: Exception do 44 | Writeln(E.ClassName, ': ', E.Message); 45 | end; 46 | end. 47 | -------------------------------------------------------------------------------- /samples/delphi/QuickArrays/FlexArrays/ManageFlexArray.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickArrays/FlexArrays/ManageFlexArray.res -------------------------------------------------------------------------------- /samples/delphi/QuickArrays/FlexPairArrays/ManageFlexPairArray.dpr: -------------------------------------------------------------------------------- 1 | program ManageFlexPairArray; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Arrays; 12 | 13 | type 14 | TUser = class 15 | private 16 | fName : string; 17 | public 18 | property Name : string read fName write fName; 19 | end; 20 | 21 | var 22 | flexarray : TFlexPairArray; 23 | user : TUser; 24 | 25 | begin 26 | try 27 | flexarray.Add('onenumber',10); 28 | flexarray.Add('other','Hello boy!'); 29 | user := TUser.Create; 30 | try 31 | user.Name := 'Joe'; 32 | flexarray.Add('myuser',user); 33 | 34 | cout('Integer Item = %d',[flexarray.GetValue('onenumber').AsInteger],etInfo); 35 | cout('String Item = %s',[flexarray.GetValue('other').AsString],etInfo); 36 | cout('Record Item = %s',[TUser(flexarray.GetValue('myuser')).Name],etInfo); 37 | finally 38 | user.Free; 39 | end; 40 | 41 | cout('Press to Exit',ccYellow); 42 | ConsoleWaitForEnterKey; 43 | except 44 | on E: Exception do 45 | Writeln(E.ClassName, ': ', E.Message); 46 | end; 47 | end. 48 | -------------------------------------------------------------------------------- /samples/delphi/QuickArrays/FlexPairArrays/ManageFlexPairArray.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickArrays/FlexPairArrays/ManageFlexPairArray.res -------------------------------------------------------------------------------- /samples/delphi/QuickArrays/ManageArrays/ManageArrays.dpr: -------------------------------------------------------------------------------- 1 | program ManageArrays; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Arrays; 12 | 13 | type 14 | 15 | TUser = record 16 | Name : string; 17 | Age : Integer; 18 | end; 19 | 20 | var 21 | userarray : TXArray; 22 | user : TUser; 23 | normalarray : TArray; 24 | 25 | begin 26 | try 27 | ReportMemoryLeaksOnShutdown := True; 28 | 29 | user.Name := 'Joe'; 30 | user.Age := 30; 31 | userarray.Add(user); 32 | user.Name := 'Peter'; 33 | user.Age := 32; 34 | userarray.Add(user); 35 | user.Name := 'James'; 36 | user.Age := 40; 37 | userarray.Add(user); 38 | 39 | if userarray.Contains(user) then cout('found user in array',etInfo); 40 | 41 | for user in userarray do 42 | begin 43 | coutFmt('User: %s',[user.Name],etInfo); 44 | end; 45 | 46 | normalarray := userarray; 47 | 48 | coutFmt('Copied array value 1: %s',[normalarray[1].Name],etInfo); 49 | 50 | cout('Press to Exit',ccYellow); 51 | ConsoleWaitForEnterKey; 52 | except 53 | on E: Exception do 54 | Writeln(E.ClassName, ': ', E.Message); 55 | end; 56 | end. 57 | -------------------------------------------------------------------------------- /samples/delphi/QuickArrays/ManageArrays/ManageArrays.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickArrays/ManageArrays/ManageArrays.res -------------------------------------------------------------------------------- /samples/delphi/QuickAutoMapper/AutoMappingObjects.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickAutoMapper/AutoMappingObjects.res -------------------------------------------------------------------------------- /samples/delphi/QuickChrono/ChronoDemo.dpr: -------------------------------------------------------------------------------- 1 | program ChronoDemo; 2 | 3 | uses 4 | Vcl.Forms, 5 | Main in 'Main.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Initialize; 11 | Application.MainFormOnTaskbar := True; 12 | Application.CreateForm(TMainForm, MainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/delphi/QuickChrono/ChronoDemo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickChrono/ChronoDemo.ico -------------------------------------------------------------------------------- /samples/delphi/QuickChrono/ChronoDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickChrono/ChronoDemo.res -------------------------------------------------------------------------------- /samples/delphi/QuickChrono/Main.pas: -------------------------------------------------------------------------------- 1 | unit Main; 2 | 3 | interface 4 | 5 | uses 6 | Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, 7 | Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls; 8 | 9 | type 10 | TMainForm = class(TForm) 11 | btnChrono: TButton; 12 | lblElapsedTime: TLabel; 13 | lblElapsedTimeLong: TLabel; 14 | tiChrono: TTimer; 15 | Label3: TLabel; 16 | lblTimer: TLabel; 17 | lblShortFormat: TLabel; 18 | lblLongFormat: TLabel; 19 | cbPrecissionFormat: TComboBox; 20 | Label1: TLabel; 21 | procedure btnChronoClick(Sender: TObject); 22 | procedure FormCreate(Sender: TObject); 23 | procedure tiChronoTimer(Sender: TObject); 24 | private 25 | { Private declarations } 26 | public 27 | { Public declarations } 28 | end; 29 | 30 | var 31 | MainForm: TMainForm; 32 | StartDate : TDateTime; 33 | 34 | implementation 35 | 36 | uses 37 | Quick.Chrono; 38 | 39 | var 40 | crono : TChronometer; 41 | hola : string; 42 | 43 | {$R *.dfm} 44 | 45 | procedure TMainForm.btnChronoClick(Sender: TObject); 46 | begin 47 | if btnChrono.Caption = 'Start' then 48 | begin 49 | crono.ReportFormatPrecission := TPrecissionFormat(cbPrecissionFormat.ItemIndex); 50 | StartDate := Now(); 51 | tiChrono.Enabled := True; 52 | crono.Start; 53 | btnChrono.Caption := 'Stop'; 54 | end 55 | else 56 | begin 57 | crono.Stop; 58 | tiChrono.Enabled := False; 59 | btnChrono.Caption := 'Start'; 60 | lblElapsedTime.Caption := crono.ElapsedTime; 61 | lblElapsedTimeLong.Caption := crono.ElapsedTime(True); 62 | end; 63 | end; 64 | 65 | procedure TMainForm.FormCreate(Sender: TObject); 66 | begin 67 | crono := TChronometer.Create(False); 68 | end; 69 | 70 | procedure TMainForm.tiChronoTimer(Sender: TObject); 71 | var 72 | newtime : string; 73 | begin 74 | tiChrono.Enabled := False; 75 | try 76 | newtime := FormatDateTime('hh:mm:ss',Now()-StartDate); 77 | if newtime <> lblTimer.Caption then lblTimer.Caption := newtime; 78 | finally 79 | tiChrono.Enabled := True; 80 | end; 81 | end; 82 | 83 | end. 84 | -------------------------------------------------------------------------------- /samples/delphi/QuickCommons/Url/Url_Manipulation.dpr: -------------------------------------------------------------------------------- 1 | program Url_Manipulation; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console; 11 | 12 | const 13 | aurls : array[0..4] of string = ('https://mydomain.com', 14 | 'http://www.google.com/Test/other', 15 | 'www.google.com/test/other?query=1&other=2', 16 | 'http://127.0.0.1:80/onemoretest/', 17 | 'www.google.com'); 18 | 19 | var 20 | i : Integer; 21 | host : string; 22 | path : string; 23 | query : string; 24 | woquery : string; 25 | begin 26 | try 27 | for i := Low(aurls) to High(aurls) do 28 | begin 29 | cout('URL="%s"',[aurls[i]],etWarning); 30 | host := UrlGetHost(aurls[i]); 31 | path := UrlGetPath(aurls[i]); 32 | query := UrlGetQuery(aurls[i]); 33 | woquery := UrlRemovequery(aurls[i]); 34 | cout('Host="%s"',[host],etInfo); 35 | cout('Path="%s"',[path],etInfo); 36 | cout('Query="%s"',[query],etInfo); 37 | cout('Without query="%s"',[woquery],etInfo); 38 | cout('------------',etWarning); 39 | end; 40 | ConsoleWaitForEnterKey; 41 | 42 | except 43 | on E: Exception do 44 | Writeln(E.ClassName, ': ', E.Message); 45 | end; 46 | end. 47 | -------------------------------------------------------------------------------- /samples/delphi/QuickCompression/CompressionTest.dpr: -------------------------------------------------------------------------------- 1 | program CompressionTest; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Compression.LZO; 12 | 13 | const 14 | str = 'This is a test compression with LZO algorithm. Repeated words are compressed' + 15 | 'Test: Compression, Compression, Compression, Compression, Compression'; 16 | var 17 | lzo : TLZOCompressor; 18 | compStr : string; 19 | decompStr : string; 20 | 21 | begin 22 | try 23 | ReportMemoryLeaksOnShutdown := True; 24 | lzo := TLZOCompressor.Create; 25 | coutFmt('Original: %s',[str],etInfo); 26 | coutFmt('Original size: %d',[str.Length],etInfo); 27 | compStr := lzo.Compress(str); 28 | coutFmt('Compressed: %s',[compStr],etInfo); 29 | coutFmt('Compressed size: %d',[compStr.Length],etInfo); 30 | decompStr := lzo.Decompress(compStr); 31 | coutFmt('Decompressed: %s',[decompStr],etSuccess); 32 | cout('Uncompressed size: %d',[decompStr.Length],etInfo); 33 | ConsoleWaitForEnterKey; 34 | lzo.Free; 35 | except 36 | on E: Exception do 37 | Writeln(E.ClassName, ': ', E.Message); 38 | end; 39 | end. 40 | -------------------------------------------------------------------------------- /samples/delphi/QuickCompression/CompressionTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickCompression/CompressionTest.res -------------------------------------------------------------------------------- /samples/delphi/QuickConditions/ConditionChecks.dpr: -------------------------------------------------------------------------------- 1 | program ConditionChecks; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | Classes, 9 | System.SysUtils, 10 | Quick.Console, 11 | Quick.Conditions; 12 | 13 | type 14 | EMyException = class(Exception); 15 | 16 | var 17 | result : string; 18 | num : Int64; 19 | fnum : Double; 20 | obj : TStream; 21 | 22 | begin 23 | try 24 | //text must start with h and end with o 25 | result := 'Hello'; 26 | Condition.Requires(result,'result') 27 | .IsNotEmpty 28 | .StartsWith('h',True) 29 | .EndsWith('o'); 30 | 31 | //text longer than 10 and contains check 32 | result := 'Text to check'; 33 | Condition.Requires(result,'result') 34 | .IsNotEmpty 35 | .IsLongerThan(10) 36 | .Contains('check',True); 37 | 38 | //text must be shorter than 10 39 | result := 'Text'; 40 | Condition.Requires(result,'result') 41 | .IsNotEmpty 42 | .IsShorterThan(10); 43 | 44 | //text must be not lowercase 45 | result := 'Text'; 46 | Condition.Requires(result,'result') 47 | .IsNotEmpty 48 | .IsNotLowerCase; 49 | 50 | //num min 1 and max 10 51 | num := 10; 52 | Condition.Requires(num,'num') 53 | .IsInRange(1,10,'value for num is out of range'); 54 | 55 | fnum := 7.3; 56 | Condition.Requires(fnum,'fnum') 57 | .IsGreaterThan(5) 58 | .IsLessOrEqual(8) 59 | .IsNotInRange(6,7); 60 | 61 | obj := TStringStream.Create; 62 | Condition.Requires(obj,'obj') 63 | .WithExceptionOnFailure(EMyException) 64 | .IsNotNull 65 | .IsOfType(TStream) 66 | .Evaluate(obj.Size = 0); 67 | obj.Free; 68 | 69 | Condition.Ensures(obj,'obj') 70 | .IsNotNull; 71 | 72 | 73 | cout('All conditions passed!',ccGreen); 74 | 75 | ConsoleWaitForEnterKey; 76 | except 77 | on E: Exception do 78 | Writeln(E.ClassName, ': ', E.Message); 79 | end; 80 | end. 81 | -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToJSON/ConfigToJSON.dpr: -------------------------------------------------------------------------------- 1 | program ConfigToJSON; 2 | 3 | uses 4 | Vcl.Forms, 5 | Main in 'Main.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | ReportMemoryLeaksOnShutdown := True; 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TMainForm, MainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToJSON/ConfigToJSON.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickConfig/ConfigToJSON/ConfigToJSON.res -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToJSON/Main.dfm: -------------------------------------------------------------------------------- 1 | object MainForm: TMainForm 2 | AlignWithMargins = True 3 | Left = 0 4 | Top = 0 5 | Caption = 'Quick Config Demo' 6 | ClientHeight = 493 7 | ClientWidth = 720 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 | OnClose = FormClose 16 | OnCreate = FormCreate 17 | DesignSize = ( 18 | 720 19 | 493) 20 | PixelsPerInch = 96 21 | TextHeight = 13 22 | object meInfo: TMemo 23 | Left = 8 24 | Top = 8 25 | Width = 704 26 | Height = 441 27 | Anchors = [akLeft, akTop, akRight, akBottom] 28 | ReadOnly = True 29 | ScrollBars = ssBoth 30 | TabOrder = 0 31 | end 32 | object btnLoadFile: TButton 33 | Left = 407 34 | Top = 464 35 | Width = 145 36 | Height = 25 37 | Anchors = [akRight, akBottom] 38 | Caption = 'Load From File' 39 | TabOrder = 1 40 | OnClick = btnLoadFileClick 41 | end 42 | object btnSaveFile: TButton 43 | Left = 558 44 | Top = 464 45 | Width = 154 46 | Height = 25 47 | Anchors = [akRight, akBottom] 48 | Caption = 'Save To File' 49 | TabOrder = 2 50 | OnClick = btnSaveFileClick 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToRegistry/ConfigToRegistry.dpr: -------------------------------------------------------------------------------- 1 | program ConfigToRegistry; 2 | 3 | uses 4 | Vcl.Forms, 5 | Main in 'Main.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | ReportMemoryLeaksOnShutdown := True; 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TMainForm, MainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToRegistry/ConfigToRegistry.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickConfig/ConfigToRegistry/ConfigToRegistry.res -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToRegistry/Main.dfm: -------------------------------------------------------------------------------- 1 | object MainForm: TMainForm 2 | AlignWithMargins = True 3 | Left = 0 4 | Top = 0 5 | Caption = 'Quick Config Demo' 6 | ClientHeight = 493 7 | ClientWidth = 720 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 | OnClose = FormClose 16 | OnCreate = FormCreate 17 | DesignSize = ( 18 | 720 19 | 493) 20 | PixelsPerInch = 96 21 | TextHeight = 13 22 | object meInfo: TMemo 23 | Left = 8 24 | Top = 8 25 | Width = 704 26 | Height = 441 27 | Anchors = [akLeft, akTop, akRight, akBottom] 28 | ReadOnly = True 29 | ScrollBars = ssBoth 30 | TabOrder = 0 31 | end 32 | object btnLoadRegistry: TButton 33 | Left = 407 34 | Top = 464 35 | Width = 145 36 | Height = 25 37 | Anchors = [akRight, akBottom] 38 | Caption = 'Load From Registry' 39 | TabOrder = 1 40 | OnClick = btnLoadRegistryClick 41 | end 42 | object SaveRegistry: TButton 43 | Left = 558 44 | Top = 464 45 | Width = 154 46 | Height = 25 47 | Anchors = [akRight, akBottom] 48 | Caption = 'Save To Registry' 49 | TabOrder = 2 50 | OnClick = SaveRegistryClick 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToYAML/ConfigToYAML.dpr: -------------------------------------------------------------------------------- 1 | program ConfigToYAML; 2 | 3 | uses 4 | Vcl.Forms, 5 | Main in 'Main.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | ReportMemoryLeaksOnShutdown := True; 11 | Application.Initialize; 12 | Application.MainFormOnTaskbar := True; 13 | Application.CreateForm(TMainForm, MainForm); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToYAML/ConfigToYAML.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickConfig/ConfigToYAML/ConfigToYAML.res -------------------------------------------------------------------------------- /samples/delphi/QuickConfig/ConfigToYAML/Main.dfm: -------------------------------------------------------------------------------- 1 | object MainForm: TMainForm 2 | AlignWithMargins = True 3 | Left = 0 4 | Top = 0 5 | Caption = 'Quick Config Demo' 6 | ClientHeight = 493 7 | ClientWidth = 720 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'Tahoma' 13 | Font.Style = [] 14 | OnClose = FormClose 15 | OnCreate = FormCreate 16 | PixelsPerInch = 96 17 | DesignSize = ( 18 | 720 19 | 493) 20 | TextHeight = 13 21 | object meInfo: TMemo 22 | Left = 8 23 | Top = 8 24 | Width = 704 25 | Height = 441 26 | Anchors = [akLeft, akTop, akRight, akBottom] 27 | ReadOnly = True 28 | ScrollBars = ssBoth 29 | TabOrder = 0 30 | end 31 | object btnLoadFile: TButton 32 | Left = 407 33 | Top = 464 34 | Width = 145 35 | Height = 25 36 | Anchors = [akRight, akBottom] 37 | Caption = 'Load From File' 38 | TabOrder = 1 39 | OnClick = btnLoadFileClick 40 | end 41 | object btnSaveFile: TButton 42 | Left = 558 43 | Top = 464 44 | Width = 154 45 | Height = 25 46 | Anchors = [akRight, akBottom] 47 | Caption = 'Save To File' 48 | TabOrder = 2 49 | OnClick = btnSaveFileClick 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /samples/delphi/QuickConsole/ConsoleMenu/QuickConsoleMenu.dpr: -------------------------------------------------------------------------------- 1 | program QuickConsoleMenu; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$IFDEF FPC} 6 | {$MODE DELPHI} 7 | {$ENDIF} 8 | 9 | {$R *.res} 10 | 11 | uses 12 | SysUtils, 13 | Windows, 14 | Quick.Commons, 15 | Quick.Console; 16 | 17 | type 18 | TTest = record 19 | procedure Option1; 20 | procedure Option2; 21 | procedure Option3; 22 | procedure Option4; 23 | procedure Option5; 24 | end; 25 | 26 | var 27 | conmenu : TConsoleMenu; 28 | Test : TTest; 29 | menuop : TConsoleMenuOption; 30 | i : Integer; 31 | 32 | { TTest } 33 | 34 | procedure TTest.Option1; 35 | begin 36 | coutXY(10,10,'Option 1 pressed',etInfo); 37 | end; 38 | 39 | procedure TTest.Option2; 40 | begin 41 | coutXY(10,10,'Option 2 pressed',etInfo); 42 | end; 43 | 44 | procedure TTest.Option3; 45 | begin 46 | coutXY(10,10,'Option 3 pressed',etInfo); 47 | end; 48 | 49 | procedure TTest.Option4; 50 | begin 51 | coutXY(10,10,'Option 4 pressed',etInfo); 52 | end; 53 | 54 | procedure TTest.Option5; 55 | begin 56 | coutXY(10,10,'Option 5 pressed',etInfo); 57 | end; 58 | 59 | begin 60 | try 61 | conmenu := TConsoleMenu.Create; 62 | menuop.Caption := 'Option 1'; 63 | menuop.Key := VK_F1; 64 | menuop.OnKeyPressed := Test.Option1; 65 | conmenu.AddMenu(menuop); 66 | conmenu.AddMenu('Option 2',VK_F2,Test.Option2); 67 | conmenu.AddMenu('Option 3',VK_F3,Test.Option3); 68 | 69 | conmenu.AddMenu('Option 4',VK_F4,Test.Option4); 70 | 71 | conmenu.AddMenu('Option 5',VK_F5,{$IFDEF FPC}Test.Option5);{$ELSE}procedure 72 | begin 73 | coutXY(10,10,'Option 5 pressed',etInfo); 74 | end); 75 | {$ENDIF} 76 | 77 | conmenu.WaitForKeys; 78 | conmenu.Free; 79 | except 80 | on E: Exception do 81 | Writeln(E.ClassName, ': ', E.Message); 82 | end; 83 | end. 84 | -------------------------------------------------------------------------------- /samples/delphi/QuickConsole/ConsoleMenu/QuickConsoleMenu.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickConsole/ConsoleMenu/QuickConsoleMenu.res -------------------------------------------------------------------------------- /samples/delphi/QuickConsole/ConsoleOut/ConsoleOut.dpr: -------------------------------------------------------------------------------- 1 | program ConsoleOut; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$IFDEF FPC} 6 | {$MODE DELPHI} 7 | {$ENDIF} 8 | 9 | {$R *.res} 10 | 11 | uses 12 | SysUtils, 13 | Quick.Commons, 14 | Quick.Console; 15 | 16 | begin 17 | try 18 | coutXY(20,10,'this line will be replaced by the next',etInfo); 19 | coutXY(20,10,'this line replaces previous',etSuccess); 20 | cout('Normal line 1',etInfo); 21 | coutBL('bottom line: 1',etInfo); 22 | cout('Normal line 2',etInfo); 23 | coutXY(10,5,'I''m here',etSuccess); 24 | coutBL('bottom line: 2',etInfo); 25 | cout('Normal line 3',etInfo); 26 | coutBL('bottomline: 3',etInfo); 27 | ConsoleWaitForEnterKey; 28 | except 29 | on E: Exception do 30 | Writeln(E.ClassName, ': ', E.Message); 31 | end; 32 | end. 33 | -------------------------------------------------------------------------------- /samples/delphi/QuickConsole/ConsoleOut/ConsoleOut.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickConsole/ConsoleOut/ConsoleOut.res -------------------------------------------------------------------------------- /samples/delphi/QuickExpressions/ExpressionsTest.dpr: -------------------------------------------------------------------------------- 1 | program ExpressionsTest; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Expression; 12 | 13 | var 14 | listexpressions : TArray; 15 | begin 16 | try 17 | //true expressions 18 | listexpressions.Add('1 = 1'); 19 | listexpressions.Add('1 < 2'); 20 | listexpressions.Add('2 > 1'); 21 | listexpressions.Add('(1 = 1) AND (2 = 2)'); 22 | listexpressions.Add('(1 = 1) OR (2 = 3)'); 23 | listexpressions.Add('(1 = 2) OR (2 = 2)'); 24 | listexpressions.Add('(0.3 < 8) or ((5 < 4) and (2 = 1))'); 25 | listexpressions.Add('(8 > 3) or ((5 > 4) and (2 = 1))'); 26 | 27 | cout('True expressions',ccWhite); 28 | for var expression in listexpressions do 29 | begin 30 | if TExpressionParser.Validate(expression) then cout(expression,ccGreen) else cout(expression,ccRed); 31 | end; 32 | 33 | listexpressions := []; 34 | 35 | //false expressions 36 | listexpressions.Add('1 = 2'); 37 | listexpressions.Add('2 < 1'); 38 | listexpressions.Add('1 > 2'); 39 | listexpressions.Add('(1 <> 1) AND (2 <> 2)'); 40 | listexpressions.Add('(1 <> 1) OR (2 = 3)'); 41 | listexpressions.Add('(1 = 2) OR (2 <> 2)'); 42 | listexpressions.Add('(0.3 > 8) or ((5 > 4) and (2 <> 2))'); 43 | listexpressions.Add('(8 < 3) or ((5 < 4) and (2 <> 1))'); 44 | 45 | cout('False expressions',ccWhite); 46 | for var expression in listexpressions do 47 | begin 48 | if not TExpressionParser.Validate(expression) then cout(expression,ccGreen) else cout(expression,ccRed); 49 | end; 50 | 51 | ConsoleWaitForEnterKey; 52 | except 53 | on E: Exception do 54 | Writeln(E.ClassName, ': ', E.Message); 55 | end; 56 | end. 57 | -------------------------------------------------------------------------------- /samples/delphi/QuickHttpServer/HttpServer/HttpServerService.dpr: -------------------------------------------------------------------------------- 1 | program HttpServerService; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Logger.Intf, 11 | Quick.Console, 12 | Quick.AppService, 13 | Quick.HttpServer, 14 | Quick.HttpServer.Request, 15 | Quick.HttpServer.Response, 16 | HttpServerService.Logger; 17 | 18 | type 19 | TMyHttpServer = class(THttpServer) 20 | public 21 | procedure ProcessRequest(aRequest: IHttpRequest; aResponse: IHttpResponse); override; 22 | end; 23 | 24 | procedure TMyHttpServer.ProcessRequest(aRequest: IHttpRequest; aResponse: IHttpResponse); 25 | begin 26 | aResponse.ContentText := 'Hello world!'; 27 | end; 28 | 29 | var 30 | HttpServer : TMyHttpServer; 31 | Port : Integer; 32 | Logger : TQuickLogger; 33 | 34 | begin 35 | try 36 | ReportMemoryLeaksOnShutdown := True; 37 | 38 | //run as console 39 | Logger := TQuickLogger.Create; 40 | Logger.Init; 41 | if not AppService.IsRunningAsService then 42 | begin 43 | //create server 44 | cout('Init server...',etInfo); 45 | if ParamCount > 0 then 46 | begin 47 | Integer.TryParse(ParamStr(1),Port) 48 | end; 49 | //start server 50 | if Port = 0 then Port := 8080; 51 | HttpServer := TMyHttpServer.Create('127.0.0.1',Port,False,Logger); 52 | try 53 | HttpServer.Start; 54 | //Wait for Exit 55 | cout(' ',ccWhite); 56 | cout('Press [Enter] to quit',ccYellow); 57 | ConsoleWaitForEnterKey; 58 | finally 59 | HttpServer.Free; 60 | end; 61 | end 62 | else //run as a service 63 | begin 64 | AppService.DisplayName := 'Remote Server'; 65 | AppService.ServiceName := 'RemoteServerSvc'; 66 | AppService.CanInstallWithOtherName := True; 67 | AppService.OnStart := procedure 68 | begin 69 | HttpServer := TMyHttpServer.Create('127.0.0.1',Port,False,nil); 70 | end; 71 | AppService.OnStop := HttpServer.Free; 72 | AppService.OnExecute := HttpServer.Start; 73 | AppService.CheckParams; 74 | end; 75 | except 76 | on E: Exception do 77 | Writeln(E.ClassName, ': ', E.Message); 78 | end; 79 | end. 80 | -------------------------------------------------------------------------------- /samples/delphi/QuickHttpServer/HttpServer/HttpServerService.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickHttpServer/HttpServer/HttpServerService.res -------------------------------------------------------------------------------- /samples/delphi/QuickIOC/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/delphi/QuickIOC/IOCdemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickIOC/IOCdemo.res -------------------------------------------------------------------------------- /samples/delphi/QuickIOC/TypedFactory/TypedFactory.dpr: -------------------------------------------------------------------------------- 1 | program TypedFactory; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.IOC; 12 | 13 | type 14 | TUser = class 15 | private 16 | fName : string; 17 | fAge : Integer; 18 | public 19 | property Name : string read fName write fName; 20 | property Age : Integer read fAge write fAge; 21 | end; 22 | 23 | IUserFactory = interface(IInvokable) 24 | ['{CCDC635D-483E-44A9-8F29-6A19CE1652F3}'] 25 | function New : TUser; 26 | end; 27 | 28 | var 29 | container : TIocContainer; 30 | user : TUser; 31 | factory : IUserFactory; 32 | begin 33 | try 34 | ReportMemoryLeaksOnShutdown := True; 35 | container := TIocContainer.Create; 36 | container.RegisterTypedFactory(); 37 | factory := container.Resolve; 38 | user := factory.New; 39 | user.Name := 'John'; 40 | user.Age := 30; 41 | coutFmt('User: %s / Age: %d',[user.Name, user.Age],etInfo); 42 | user.Free; 43 | ConsoleWaitForEnterKey; 44 | container.Free; 45 | except 46 | on E: Exception do 47 | Writeln(E.ClassName, ': ', E.Message); 48 | end; 49 | end. 50 | -------------------------------------------------------------------------------- /samples/delphi/QuickJsonSerializer/ComplexObjects/ComplexObjects.dpr: -------------------------------------------------------------------------------- 1 | program ComplexObjects; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | Classes, 9 | System.SysUtils, 10 | Quick.Console, 11 | Quick.Json.Serializer; 12 | 13 | type 14 | TUser = class 15 | private 16 | fName : string; 17 | fAge : Integer; 18 | fPhoto : TMemoryStream; 19 | public 20 | constructor Create; 21 | destructor Destroy; override; 22 | published 23 | property Name : string read fName write fName; 24 | property Age : Integer read fAge write fAge; 25 | property Photo : TMemoryStream read fPhoto write fPhoto; 26 | end; 27 | 28 | var 29 | json : string; 30 | user : TUser; 31 | photosize : Integer; 32 | serializer : TJsonSerializer; 33 | { TUser } 34 | 35 | constructor TUser.Create; 36 | begin 37 | fPhoto := TMemoryStream.Create; 38 | end; 39 | 40 | destructor TUser.Destroy; 41 | begin 42 | fPhoto.Free; 43 | inherited; 44 | end; 45 | 46 | begin 47 | try 48 | user := TUser.Create; 49 | user.Name := 'John'; 50 | user.Age := 30; 51 | user.Photo.LoadFromFile('.\photo.jpg'); 52 | photosize := user.Photo.Size; 53 | cout('Photo Size: ' + photosize.ToString,ccWhite); 54 | 55 | serializer := TJsonSerializer.Create(TSerializeLevel.slPublicProperty,True); 56 | try 57 | //serializer.UseBase64Stream := False; 58 | //serialize 59 | cout('Serialize User:',ccYellow); 60 | json := serializer.ObjectToJson(user); 61 | //cout(json,ccWhite); 62 | user.Free; 63 | //deserialize 64 | cout('Deserialize User:',ccYellow); 65 | user := TUser.Create; 66 | serializer.JsonToObject(user,json); 67 | //check if deseralization is correct 68 | Assert(user.Name = 'John','Name serialize error!'); 69 | Assert(user.Age = 30,'Age serialize error!'); 70 | Assert(user.Photo.Size = photosize,'Photo serialize error!'); 71 | user.Photo.SaveToFile('.\photo_new.jpg'); 72 | cout('Photo Size: ' + photosize.ToString,ccWhite); 73 | cout(user.Name,ccWhite); 74 | finally 75 | serializer.Free; 76 | end; 77 | user.Free; 78 | ConsoleWaitForEnterKey; 79 | except 80 | on E: Exception do 81 | Writeln(E.ClassName, ': ', E.Message); 82 | end; 83 | end. 84 | 85 | -------------------------------------------------------------------------------- /samples/delphi/QuickJsonSerializer/JsonSerializerTest/Entitlement.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/delphi/QuickJsonSerializer/JsonSerializerTest/JsonSerializerTest.dpr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickJsonSerializer/JsonSerializerTest/JsonSerializerTest.dpr -------------------------------------------------------------------------------- /samples/delphi/QuickJsonSerializer/JsonSerializerTest/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/delphi/QuickJsonSerializer/ObjectToJsonStream/ObjectToJsonStream.dpr: -------------------------------------------------------------------------------- 1 | program ObjectToJsonStream; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | Classes, 9 | System.SysUtils, 10 | Quick.Console, 11 | Quick.Json.Serializer; 12 | 13 | type 14 | TUser = class 15 | private 16 | fName : string; 17 | fAge : Integer; 18 | public 19 | property Name : string read fName write fName; 20 | property Age : Integer read fAge write fAge; 21 | end; 22 | 23 | var 24 | ss : TStringStream; 25 | user : TUser; 26 | serializer : TJsonSerializer; 27 | begin 28 | try 29 | user := TUser.Create; 30 | user.Name := 'John'; 31 | user.Age := 30; 32 | ss := TStringStream.Create; 33 | try 34 | serializer := TJsonSerializer.Create(TSerializeLevel.slPublicProperty,True); 35 | try 36 | serializer.ObjectToJsonStream(user,ss); 37 | cout(ss.DataString,ccWhite); 38 | 39 | user.Name := 'Peter'; 40 | serializer.JsonStreamToObject(user,ss); 41 | Assert(user.Name = 'John','Serializer not modified property!'); 42 | cout(user.Name,ccWhite); 43 | finally 44 | serializer.Free; 45 | end; 46 | finally 47 | ss.Free; 48 | end; 49 | user.Free; 50 | ConsoleWaitForEnterKey; 51 | except 52 | on E: Exception do 53 | Writeln(E.ClassName, ': ', E.Message); 54 | end; 55 | end. 56 | -------------------------------------------------------------------------------- /samples/delphi/QuickLinq/LinqLists/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/delphi/QuickLinq/LinqLists/LinqList.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickLinq/LinqLists/LinqList.res -------------------------------------------------------------------------------- /samples/delphi/QuickLists/IndexedList.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickLists/IndexedList.res -------------------------------------------------------------------------------- /samples/delphi/QuickLists/IndexedLists/IndexedList.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickLists/IndexedLists/IndexedList.res -------------------------------------------------------------------------------- /samples/delphi/QuickMemoryCache/MemoryCache/MemCacheTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickMemoryCache/MemoryCache/MemCacheTest.res -------------------------------------------------------------------------------- /samples/delphi/QuickMemoryCache/MemoryCache/MemCacheTest2.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickMemoryCache/MemoryCache/MemCacheTest2.res -------------------------------------------------------------------------------- /samples/delphi/QuickMemoryCache/MemoryCacheVariant/MemCacheVariantTest.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickMemoryCache/MemoryCacheVariant/MemCacheVariantTest.res -------------------------------------------------------------------------------- /samples/delphi/QuickNetwork/GetIPRange/GetIPRanges.dpr: -------------------------------------------------------------------------------- 1 | program GetIPRanges; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | SysUtils, 9 | Quick.Commons, 10 | Quick.Network, 11 | Quick.Console; 12 | 13 | var 14 | Ip, 15 | Mask : string; 16 | LowIP, 17 | HighIp : string; 18 | 19 | begin 20 | try 21 | Console.LogVerbose := LOG_DEBUG; 22 | ip := '192.168.1.15'; 23 | mask := '255.255.255.0'; 24 | GetIpRange(Ip,Mask,LowIP,HighIp); 25 | coutFmt('IP: %s Mask: %s / Range: %s to %s',[Ip,Mask,LowIP,HighIp],etInfo); 26 | ConsoleWaitForEnterKey; 27 | except 28 | on E: Exception do 29 | Writeln(E.ClassName, ': ', E.Message); 30 | end; 31 | end. 32 | -------------------------------------------------------------------------------- /samples/delphi/QuickNetwork/GetIPRange/GetIPRanges.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickNetwork/GetIPRange/GetIPRanges.res -------------------------------------------------------------------------------- /samples/delphi/QuickOptions/Optionsdemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickOptions/Optionsdemo.res -------------------------------------------------------------------------------- /samples/delphi/QuickPooling/HttpPool.dpr: -------------------------------------------------------------------------------- 1 | program HttpPool; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | Classes, 9 | System.SysUtils, 10 | System.Net.HttpClient, 11 | Quick.Commons, 12 | Quick.Console, 13 | Quick.Threads, 14 | Quick.Pooling; 15 | 16 | var 17 | pool : IObjectPool; 18 | tasks : TBackgroundTasks; 19 | i : Integer; 20 | 21 | begin 22 | try 23 | ReportMemoryLeaksOnShutdown := True; 24 | pool := TObjectPool.Create(5,5000,procedure(var aInstance : THTTPClient) 25 | begin 26 | aInstance := THTTPClient.Create; 27 | end); 28 | tasks := TBackgroundTasks.Create(20); 29 | for i := 0 to 100 do 30 | begin 31 | tasks.AddTask(procedure(task : ITask) 32 | var 33 | httpcli : THTTPClient; 34 | statuscode : Integer; 35 | poolitem : IPoolItem; 36 | begin 37 | poolitem := pool.Get; 38 | cout('Got connection pool: %d',[poolitem.ItemIndex],etInfo); 39 | httpcli := poolitem.Item; 40 | statuscode := httpcli.Get('http://www.google.com').StatusCode; 41 | if statuscode = 200 then cout('Download ok',etSuccess); 42 | //Sleep(Random(2000)); 43 | cout(statuscode.ToString,etInfo); 44 | end).Run; 45 | end; 46 | tasks.Start; 47 | ConsoleWaitForEnterKey; 48 | tasks.Free; 49 | except 50 | on E: Exception do 51 | Writeln(E.ClassName, ': ', E.Message); 52 | end; 53 | end. 54 | -------------------------------------------------------------------------------- /samples/delphi/QuickSMTP/SendEmail.dpr: -------------------------------------------------------------------------------- 1 | program SendEmail; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Console, 10 | Quick.SMTP; 11 | 12 | var 13 | smtp : TSMTP; 14 | begin 15 | try 16 | ReportMemoryLeaksOnShutdown := True; 17 | smtp := TSMTP.Create('mail.domain.com',25,False); 18 | try 19 | smtp.Username := 'test@domain.com'; 20 | smtp.Password := ''; 21 | smtp.Mail.AddAttachment('output2.png','d:\output.png'); 22 | //smtp.Mail.AddAttachment('dell.gif','d:\dell.gif'); 23 | //smtp.Mail.AddAttachment('config.json','d:\config.json'); 24 | //smtp.Mail.Attachments.Add('d:\output.png'); 25 | //smtp.Mail.Attachments.Add('d:\config.json'); 26 | smtp.Mail.SenderName := 'Attachment Test'; 27 | smtp.Mail.From := 'test@domain.com'; 28 | smtp.Mail.Recipient := 'other@domain.com'; 29 | smtp.Mail.Subject := 'test adjuntos'; 30 | smtp.Mail.Body := 'Ver adjuntos'; 31 | smtp.SendMail; 32 | finally 33 | smtp.Free; 34 | end; 35 | cout('Press to Exit',ccYellow); 36 | ConsoleWaitForEnterKey; 37 | except 38 | on E: Exception do 39 | Writeln(E.ClassName, ': ', E.Message); 40 | end; 41 | end. 42 | -------------------------------------------------------------------------------- /samples/delphi/QuickSMTP/SendEmail.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickSMTP/SendEmail.res -------------------------------------------------------------------------------- /samples/delphi/QuickService/ServiceManagement/ServiceManagement.dpr: -------------------------------------------------------------------------------- 1 | program ServiceManagement; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Service; 12 | 13 | var 14 | svcname : string; 15 | 16 | begin 17 | try 18 | svcname := 'aspnet_state'; 19 | cout('Need to run as admin',etWarning); 20 | if ServiceIsPresent('localhost',svcname) then cout('"%s" service is installed"',[svcname],etSuccess) 21 | else cout('"%s" service is not installed!"',[svcname],etWarning); 22 | if GetServiceState('localhost',svcname) = TServiceState.ssStopped then 23 | begin 24 | cout('"%s" service is stopped"',[svcname],etWarning); 25 | cout('Trying to start "%s" service..."',[svcname],etInfo); 26 | ServiceStart('localhost','aspnet_state'); 27 | Sleep(3000); 28 | if GetServiceState('localhost','aspnet_state') = TServiceState.ssRunning then cout('%s service is now started!',[svcname],etSuccess); 29 | end 30 | else 31 | begin 32 | cout('"%s" service is started"',[svcname],etSuccess); 33 | cout('Trying to stop "%s" service..."',[svcname],etInfo); 34 | ServiceStop('localhost','aspnet_state'); 35 | Sleep(3000); 36 | if GetServiceState('localhost','aspnet_state') = TServiceState.ssStopped then cout('%s service is now stopped!',[svcname],etWarning); 37 | end; 38 | cout('Press [ENTER] to exit',etInfo); 39 | ConsoleWaitForEnterKey; 40 | except 41 | on E: Exception do 42 | Writeln(E.ClassName, ': ', E.Message); 43 | end; 44 | end. 45 | -------------------------------------------------------------------------------- /samples/delphi/QuickService/ServiceManagement/ServiceManagement.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickService/ServiceManagement/ServiceManagement.res -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/AnonymousThread/AnonymousThread.dpr: -------------------------------------------------------------------------------- 1 | program AnonymousThread; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | Classes, 9 | Quick.Commons, 10 | Quick.Console, 11 | System.SysUtils, 12 | Quick.Threads; 13 | 14 | begin 15 | try 16 | ReportMemoryLeaksOnShutdown := True; 17 | 18 | TAnonymousThread.Execute( 19 | procedure 20 | var 21 | i : Integer; 22 | a : Integer; 23 | begin 24 | for i := 0 to 100 do cout('Working %d',[i],etTrace); 25 | a := i Div (Random(3)); 26 | cout('executed thread',etSuccess); 27 | end 28 | ).OnException( 29 | procedure(aException : Exception) 30 | begin 31 | cout('Exception %s',[aException.Message],etError); 32 | end 33 | ).OnTerminate( 34 | procedure 35 | begin 36 | cout('terminated thread',etSuccess); 37 | cout('PRESS TO EXIT',etInfo); 38 | end 39 | ).Start; 40 | 41 | ConsoleWaitForEnterKey; 42 | except 43 | on E: Exception do 44 | Writeln(E.ClassName, ': ', E.Message); 45 | end; 46 | end. 47 | -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/AnonymousThread/AnonymousThread.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickThreads/AnonymousThread/AnonymousThread.res -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/BackgroundTasks/RunBackgroundtask.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickThreads/BackgroundTasks/RunBackgroundtask.res -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/RunTask/RunTask.dpr: -------------------------------------------------------------------------------- 1 | program RunTask; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | Classes, 9 | Quick.Commons, 10 | Quick.Console, 11 | System.SysUtils, 12 | Quick.Threads; 13 | 14 | var 15 | currentdownload : Integer; 16 | 17 | begin 18 | try 19 | ReportMemoryLeaksOnShutdown := True; 20 | currentdownload := 0; 21 | TRunTask.Execute([currentdownload],False, 22 | procedure(task : ITask) 23 | var 24 | i : Integer; 25 | a : Integer; 26 | begin 27 | //simulate a download task with random fail 28 | task.Result := 500; 29 | for i := 0 to 10 do 30 | begin 31 | task['currentdownload'] := i*10; 32 | //task.Param[0] := i*10; 33 | cout('Downloading %d%%...',[i*10],etTrace); 34 | Sleep(100); 35 | a := i Div (Random(5)); 36 | end; 37 | task['statuscode'] := 200; 38 | task.Result := 200; 39 | cout('executed thread',etSuccess); 40 | end) 41 | .SetParameter('statuscode',0,False) 42 | //.RetryForever 43 | .WaitAndRetry(5,250,2) 44 | //.WaitAndRetry([250,2000,10000]) 45 | .OnRetry( 46 | procedure(task : ITask; aException : Exception; var vStopRetries : Boolean) 47 | begin 48 | coutFmt('Failed at %d%%. Retrying downloading (Status code: %d [%s])...',[task['currentdownload'].AsInteger,task.Result.AsInteger,aException.Message],etWarning); 49 | end) 50 | .OnException( 51 | procedure(task : ITask; aException : Exception) 52 | begin 53 | cout('Exception downloading %d%% : %s',[task['currentdownload'].AsInteger,aException.Message],etError); 54 | end) 55 | .OnTerminated( 56 | procedure(task : ITask) 57 | begin 58 | if task.Done then cout('Task finished ok',etSuccess) 59 | else coutFmt('Task failed after %d retries',[task.NumRetries],etError); 60 | cout('PRESS TO EXIT',etInfo); 61 | end) 62 | .Run; 63 | 64 | ConsoleWaitForEnterKey; 65 | except 66 | on E: Exception do 67 | Writeln(E.ClassName, ': ', E.Message); 68 | end; 69 | end. 70 | -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/RunTask/RunTask.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickThreads/RunTask/RunTask.res -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/RunTask/RunTask_Httpclient.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickThreads/RunTask/RunTask_Httpclient.res -------------------------------------------------------------------------------- /samples/delphi/QuickThreads/ScheduledTasks/RunScheduledtask.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickThreads/ScheduledTasks/RunScheduledtask.res -------------------------------------------------------------------------------- /samples/delphi/QuickValue/QuickValue.dpr: -------------------------------------------------------------------------------- 1 | program QuickValue; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | RTTI, 10 | Variants, 11 | System.TypInfo, 12 | Quick.Json.Serializer, 13 | Quick.Commons, 14 | Quick.Console, 15 | Quick.Value, 16 | Quick.Value.RTTI; 17 | 18 | type 19 | TDynArrayOfVariant = array of TVarRecord; 20 | 21 | TMyArray = TArray; 22 | 23 | PMyArray = ^TMyArray; 24 | 25 | TMyObject = class 26 | private 27 | fName : string; 28 | fAge : Integer; 29 | public 30 | property Name : string read fName write fName; 31 | property Age : Integer read fAge write fAge; 32 | end; 33 | 34 | var 35 | flexvalue : TFlexValue; 36 | arr : TArray; 37 | value : TValue; 38 | 39 | function Test2(aValue : Pointer) : string; 40 | var 41 | arr : TMyArray; 42 | parr : Pointer; 43 | begin 44 | //if VarIsArray(aValue) then 45 | begin 46 | //parr := VarArrayLock(aValue); 47 | //SetLength(arr,VarArrayHighBound(aValue,1) + 1); 48 | parr := aValue; 49 | SetLength(arr,2); 50 | arr := PMyArray(@parr)^; 51 | var a := arr[0]; 52 | var b := TMyObject(a).Name; 53 | end; 54 | end; 55 | 56 | var 57 | obj : TMyObject; 58 | arr2 : TArray; 59 | vari : Variant; 60 | 61 | begin 62 | try 63 | 64 | 65 | obj := TMyObject.Create; 66 | obj.Name := 'Joe'; 67 | obj.Age := 30; 68 | 69 | arr2 := [obj]; 70 | //vari := arr2; 71 | 72 | test2(arr2); 73 | 74 | arr := ['item1','item2','item3','item4']; 75 | flexvalue := arr; 76 | arr := TArray(flexvalue.AsPointer); 77 | coutFmt('arr[1]=%s',[arr[1]],etInfo); 78 | ConsoleWaitForEnterKey; 79 | except 80 | on E: Exception do 81 | Writeln(E.ClassName, ': ', E.Message); 82 | end; 83 | end. 84 | -------------------------------------------------------------------------------- /samples/delphi/QuickValue/QuickValue.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/delphi/QuickValue/QuickValue.res -------------------------------------------------------------------------------- /samples/delphi/QuickValue/RecordValues.dpr: -------------------------------------------------------------------------------- 1 | program RecordValues; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Value, 10 | Quick.Value.RTTI; 11 | 12 | type 13 | TMyRecord = record 14 | Name : string; 15 | Age : Integer; 16 | end; 17 | 18 | var 19 | rec : TMyRecord; 20 | rec2 : TMyRecord; 21 | fvalue : TFlexValue; 22 | 23 | begin 24 | try 25 | rec.Name := 'John'; 26 | rec.Age := 30; 27 | 28 | fvalue.FromRecord(rec); 29 | rec2 := fvalue.AsRecord; 30 | 31 | Writeln(rec2.Name + '=' + rec2.Age.ToString); 32 | Readln; 33 | except 34 | on E: Exception do 35 | Writeln(E.ClassName, ': ', E.Message); 36 | end; 37 | end. 38 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | <%uses-permission%> 12 | 13 | 21 | 22 | <%application-meta-data%> 23 | <%services%> 24 | 26 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | <%activity%> 39 | <%receivers%> 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/AutoMapperObjects.dpr: -------------------------------------------------------------------------------- 1 | program AutoMapperObjects; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Main in 'Main.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/AutoMapperObjects.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickAutoMapper/AutoMapperObjects.res -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/Entitlement.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/Main.fmx: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 480 6 | ClientWidth = 640 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | DesignerMasterStyle = 0 12 | object Memo1: TMemo 13 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 14 | DataDetectorTypes = [] 15 | ShowSizeGrip = True 16 | StyledSettings = [Family, Style, FontColor] 17 | TextSettings.Font.Size = 9.000000000000000000 18 | Align = Client 19 | Size.Width = 640.000000000000000000 20 | Size.Height = 480.000000000000000000 21 | Size.PlatformDefault = False 22 | TabOrder = 0 23 | Viewport.Width = 636.000000000000000000 24 | Viewport.Height = 476.000000000000000000 25 | end 26 | end 27 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickAutoMapper/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/Chrono.fmx: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 480 6 | ClientWidth = 458 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | DesignerMasterStyle = 0 12 | object Layout1: TLayout 13 | Align = MostTop 14 | Size.Width = 458.000000000000000000 15 | Size.Height = 50.000000000000000000 16 | Size.PlatformDefault = False 17 | TabOrder = 1 18 | object Label1: TLabel 19 | Align = Client 20 | Size.Width = 458.000000000000000000 21 | Size.Height = 50.000000000000000000 22 | Size.PlatformDefault = False 23 | TextSettings.HorzAlign = Center 24 | Text = '0' 25 | TabOrder = 0 26 | end 27 | end 28 | object Layout2: TLayout 29 | Align = MostBottom 30 | Position.Y = 430.000000000000000000 31 | Size.Width = 458.000000000000000000 32 | Size.Height = 50.000000000000000000 33 | Size.PlatformDefault = False 34 | TabOrder = 0 35 | object Button1: TButton 36 | Align = Center 37 | StyledSettings = [Family, FontColor] 38 | Size.Width = 127.000000000000000000 39 | Size.Height = 35.000000000000000000 40 | Size.PlatformDefault = False 41 | TabOrder = 0 42 | Text = 'Start' 43 | TextSettings.Font.Size = 18.000000000000000000 44 | TextSettings.Font.StyleExt = {00070000000000000004000000} 45 | OnClick = Button1Click 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/Chrono.pas: -------------------------------------------------------------------------------- 1 | unit Chrono; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 8 | Quick.Commons, 9 | Quick.Chrono, FMX.StdCtrls, FMX.Controls.Presentation, FMX.Layouts; 10 | 11 | type 12 | TForm1 = class(TForm) 13 | Layout1: TLayout; 14 | Layout2: TLayout; 15 | Label1: TLabel; 16 | Button1: TButton; 17 | procedure Button1Click(Sender: TObject); 18 | procedure FormCreate(Sender: TObject); 19 | private 20 | { Private declarations } 21 | public 22 | { Public declarations } 23 | end; 24 | 25 | var 26 | Form1: TForm1; 27 | crono : TChronometer; 28 | 29 | implementation 30 | 31 | {$R *.fmx} 32 | 33 | procedure TForm1.Button1Click(Sender: TObject); 34 | begin 35 | if Button1.Text = 'Start' then 36 | begin 37 | crono.Start; 38 | Button1.Text := 'Stop'; 39 | end 40 | else 41 | begin 42 | crono.Stop; 43 | Button1.Text := 'Start'; 44 | Label1.Text := crono.ElapsedTime(True); 45 | end; 46 | end; 47 | 48 | procedure TForm1.FormCreate(Sender: TObject); 49 | begin 50 | crono := TChronometer.Create(False); 51 | end; 52 | 53 | end. 54 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/ChronoCheck.dpr: -------------------------------------------------------------------------------- 1 | program ChronoCheck; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Chrono in 'Chrono.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/ChronoCheck.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickChrono/ChronoCheck.res -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickChrono/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickConfig/ConfigToJSON/ConfigToJSON.dpr: -------------------------------------------------------------------------------- 1 | program ConfigToJSON; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Main in 'Main.pas' {MainForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TMainForm, MainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickConfig/ConfigToJSON/Main.fmx: -------------------------------------------------------------------------------- 1 | object MainForm: TMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'MainForm' 5 | ClientHeight = 480 6 | ClientWidth = 366 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | DesignerMasterStyle = 0 12 | object meInfo: TMemo 13 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 14 | DataDetectorTypes = [] 15 | Align = Client 16 | Size.Width = 366.000000000000000000 17 | Size.Height = 408.000000000000000000 18 | Size.PlatformDefault = False 19 | TabOrder = 0 20 | Viewport.Width = 362.000000000000000000 21 | Viewport.Height = 404.000000000000000000 22 | end 23 | object Panel1: TPanel 24 | Align = MostBottom 25 | Position.Y = 408.000000000000000000 26 | Size.Width = 366.000000000000000000 27 | Size.Height = 72.000000000000000000 28 | Size.PlatformDefault = False 29 | TabOrder = 1 30 | object btnLoadJson: TSpeedButton 31 | Align = Left 32 | Size.Width = 137.000000000000000000 33 | Size.Height = 72.000000000000000000 34 | Size.PlatformDefault = False 35 | Text = 'Load from File' 36 | OnClick = btnLoadJsonClick 37 | end 38 | object btnSaveJson: TSpeedButton 39 | Align = Right 40 | Position.X = 184.000000000000000000 41 | Size.Width = 182.000000000000000000 42 | Size.Height = 72.000000000000000000 43 | Size.PlatformDefault = False 44 | Text = 'Save to File' 45 | OnClick = btnSaveJsonClick 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickConfig/ConfigToYAML/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickConfig/ConfigToYAML/ConfigToYAML.dpr: -------------------------------------------------------------------------------- 1 | program ConfigToYAML; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Main in 'Main.pas' {MainForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TMainForm, MainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickConfig/ConfigToYAML/ConfigToYAML.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickConfig/ConfigToYAML/ConfigToYAML.res -------------------------------------------------------------------------------- /samples/firemonkey/QuickConfig/ConfigToYAML/Main.fmx: -------------------------------------------------------------------------------- 1 | object MainForm: TMainForm 2 | Left = 0 3 | Top = 0 4 | Caption = 'MainForm' 5 | ClientHeight = 480 6 | ClientWidth = 366 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | DesignerMasterStyle = 0 12 | object meInfo: TMemo 13 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 14 | DataDetectorTypes = [] 15 | Align = Client 16 | Size.Width = 366.000000000000000000 17 | Size.Height = 408.000000000000000000 18 | Size.PlatformDefault = False 19 | TabOrder = 0 20 | Viewport.Width = 362.000000000000000000 21 | Viewport.Height = 404.000000000000000000 22 | end 23 | object Panel1: TPanel 24 | Align = MostBottom 25 | Position.Y = 408.000000000000000000 26 | Size.Width = 366.000000000000000000 27 | Size.Height = 72.000000000000000000 28 | Size.PlatformDefault = False 29 | TabOrder = 1 30 | object btnLoadYaml: TSpeedButton 31 | Align = Left 32 | Size.Width = 137.000000000000000000 33 | Size.Height = 72.000000000000000000 34 | Size.PlatformDefault = False 35 | Text = 'Load from File' 36 | OnClick = btnLoadYamlClick 37 | end 38 | object btnSaveYaml: TSpeedButton 39 | Align = Right 40 | Position.X = 184.000000000000000000 41 | Size.Width = 182.000000000000000000 42 | Size.Height = 72.000000000000000000 43 | Size.PlatformDefault = False 44 | Text = 'Save to File' 45 | OnClick = btnSaveYamlClick 46 | end 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickHttpServer/HttpServer/HttpServerService.dpr: -------------------------------------------------------------------------------- 1 | program HttpServerService; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | System.SysUtils, 9 | Quick.Commons, 10 | Quick.Logger.Intf, 11 | Quick.Console, 12 | Quick.AppService, 13 | Quick.HttpServer, 14 | Quick.HttpServer.Request, 15 | Quick.HttpServer.Response, 16 | HttpServerService.Logger; 17 | 18 | type 19 | TMyHttpServer = class(THttpServer) 20 | public 21 | procedure ProcessRequest(aRequest: IHttpRequest; aResponse: IHttpResponse); override; 22 | end; 23 | 24 | procedure TMyHttpServer.ProcessRequest(aRequest: IHttpRequest; aResponse: IHttpResponse); 25 | begin 26 | aResponse.ContentText := 'Hello world!'; 27 | end; 28 | 29 | var 30 | HttpServer : TMyHttpServer; 31 | Port : Integer; 32 | Logger : TQuickLogger; 33 | 34 | begin 35 | try 36 | ReportMemoryLeaksOnShutdown := True; 37 | 38 | //run as console 39 | Logger := TQuickLogger.Create; 40 | Logger.Init; 41 | if not AppService.IsRunningAsService then 42 | begin 43 | //create server 44 | cout('Init server...',etInfo); 45 | if ParamCount > 0 then 46 | begin 47 | Integer.TryParse(ParamStr(1),Port) 48 | end; 49 | //start server 50 | if Port = 0 then Port := 8080; 51 | HttpServer := TMyHttpServer.Create('127.0.0.1',Port,False,Logger); 52 | try 53 | HttpServer.Start; 54 | //Wait for Exit 55 | cout(' ',ccWhite); 56 | cout('Press [Enter] to quit',ccYellow); 57 | ConsoleWaitForEnterKey; 58 | finally 59 | HttpServer.Free; 60 | end; 61 | end 62 | else //run as a service 63 | begin 64 | AppService.DisplayName := 'Remote Server'; 65 | AppService.ServiceName := 'RemoteServerSvc'; 66 | AppService.CanInstallWithOtherName := True; 67 | AppService.OnStart := procedure 68 | begin 69 | HttpServer := TMyHttpServer.Create('127.0.0.1',Port,False,nil); 70 | end; 71 | AppService.OnStop := HttpServer.Free; 72 | AppService.OnExecute := HttpServer.Start; 73 | AppService.CheckParams; 74 | end; 75 | except 76 | on E: Exception do 77 | Writeln(E.ClassName, ': ', E.Message); 78 | end; 79 | end. 80 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickIOC/IOCDemo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickIOC/IOCDemo/IOCDemo.dpr: -------------------------------------------------------------------------------- 1 | program IOCDemo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Main in 'Main.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickIOC/IOCDemo/IOCDemo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickIOC/IOCDemo/IOCDemo.res -------------------------------------------------------------------------------- /samples/firemonkey/QuickIOC/IOCDemo/Main.fmx: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 480 6 | ClientWidth = 640 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | OnClose = FormClose 12 | DesignerMasterStyle = 0 13 | object meInfo: TMemo 14 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 15 | DataDetectorTypes = [] 16 | ReadOnly = True 17 | Align = Client 18 | Size.Width = 640.000000000000000000 19 | Size.Height = 432.000000000000000000 20 | Size.PlatformDefault = False 21 | TabOrder = 1 22 | Viewport.Width = 636.000000000000000000 23 | Viewport.Height = 428.000000000000000000 24 | end 25 | object Panel1: TPanel 26 | Align = MostBottom 27 | Position.Y = 432.000000000000000000 28 | Size.Width = 640.000000000000000000 29 | Size.Height = 48.000000000000000000 30 | Size.PlatformDefault = False 31 | TabOrder = 2 32 | object btnCheckIOC: TButton 33 | Align = Center 34 | Size.Width = 129.000000000000000000 35 | Size.Height = 39.000000000000000000 36 | Size.PlatformDefault = False 37 | TabOrder = 1 38 | Text = 'Check IOC' 39 | OnClick = btnCheckIOCClick 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/Entitlement.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/JsonSerializer._@emb_.tmp: -------------------------------------------------------------------------------- 1 | JsonSerializer.app\Contents\MacOS\libcgunwind.1.0.dylib 2 | JsonSerializer.app\Contents\Info.plist 3 | JsonSerializer.app\Contents\MacOS\libcgsqlite3.dylib 4 | JsonSerializer.app\Contents\MacOS\JsonSerializer 5 | JsonSerializer.app\Contents\Resources\JsonSerializer.icns 6 | JsonSerializer.app\..\JsonSerializer.entitlements 7 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/JsonSerializer.dpr: -------------------------------------------------------------------------------- 1 | program JsonSerializer; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | main in 'main.pas' {Form1}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | ReportMemoryLeaksOnShutdown := True; 12 | Application.Initialize; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/frmMain.fmx: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 552 6 | ClientWidth = 750 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | OnClose = FormClose 12 | DesignerMasterStyle = 0 13 | object Memo1: TMemo 14 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 15 | DataDetectorTypes = [] 16 | Anchors = [akLeft, akTop, akRight, akBottom] 17 | Position.X = 8.000000000000000000 18 | Position.Y = 8.000000000000000000 19 | Size.Width = 737.000000000000000000 20 | Size.Height = 497.000000000000000000 21 | Size.PlatformDefault = False 22 | TabOrder = 0 23 | Viewport.Width = 733.000000000000000000 24 | Viewport.Height = 493.000000000000000000 25 | end 26 | object btnToJson: TButton 27 | Anchors = [akLeft, akBottom] 28 | Position.X = 544.000000000000000000 29 | Position.Y = 520.000000000000000000 30 | TabOrder = 2 31 | Text = 'ToJson' 32 | OnClick = btnToJsonClick 33 | end 34 | object btnFromJson: TButton 35 | Anchors = [akLeft, akBottom] 36 | Enabled = False 37 | Position.X = 656.000000000000000000 38 | Position.Y = 520.000000000000000000 39 | TabOrder = 1 40 | Text = 'FromJson' 41 | OnClick = btnFromJsonClick 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/main.fmx: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 552 6 | ClientWidth = 1182 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnCreate = FormCreate 11 | OnClose = FormClose 12 | DesignerMasterStyle = 0 13 | object Memo1: TMemo 14 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 15 | DataDetectorTypes = [] 16 | Position.X = 8.000000000000000000 17 | Position.Y = 8.000000000000000000 18 | Size.Width = 1169.000000000000000000 19 | Size.Height = 497.000000000000000000 20 | Size.PlatformDefault = False 21 | TabOrder = 0 22 | Viewport.Width = 1165.000000000000000000 23 | Viewport.Height = 493.000000000000000000 24 | end 25 | object btnToJson: TButton 26 | Position.X = 544.000000000000000000 27 | Position.Y = 520.000000000000000000 28 | TabOrder = 2 29 | Text = 'ToJson' 30 | OnClick = btnToJsonClick 31 | end 32 | object btnFromJson: TButton 33 | Position.X = 656.000000000000000000 34 | Position.Y = 520.000000000000000000 35 | TabOrder = 1 36 | Text = 'FromJson' 37 | OnClick = btnFromJsonClick 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/main.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickJsonSerializer/JsonSerializerTest/main.pas -------------------------------------------------------------------------------- /samples/firemonkey/QuickOAuth/GMail.dpr: -------------------------------------------------------------------------------- 1 | program GMail; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | Main in 'Main.pas' {Form1}, 7 | OAuth.GMail in 'OAuth.GMail.pas'; 8 | 9 | {$R *.res} 10 | 11 | begin 12 | Application.Initialize; 13 | Application.CreateForm(TForm1, Form1); 14 | Application.Run; 15 | end. 16 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/SystemInfo.dpr: -------------------------------------------------------------------------------- 1 | program SystemInfo; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | frmMain in 'frmMain.pas' {MainForm}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TMainForm, MainForm); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/SystemInfo.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickSysInfo/SystemInfo.res -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/frmMain.pas: -------------------------------------------------------------------------------- 1 | unit frmMain; 2 | 3 | interface 4 | 5 | uses 6 | System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, 7 | FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, 8 | Quick.Commons, Quick.SysInfo, FMX.StdCtrls, FMX.Controls.Presentation, FMX.Layouts; 9 | 10 | type 11 | TMainForm = class(TForm) 12 | Layout1: TLayout; 13 | Layout2: TLayout; 14 | Label2: TLabel; 15 | lblDeviceName: TLabel; 16 | Layout3: TLayout; 17 | Label3: TLabel; 18 | lblAppPath: TLabel; 19 | Layout4: TLayout; 20 | Label5: TLabel; 21 | lblOS: TLabel; 22 | Layout5: TLayout; 23 | Label7: TLabel; 24 | lblAppName: TLabel; 25 | Layout6: TLayout; 26 | Label4: TLabel; 27 | lblAppVersion: TLabel; 28 | Layout7: TLayout; 29 | Label1: TLabel; 30 | lblUserName: TLabel; 31 | procedure FormCreate(Sender: TObject); 32 | private 33 | { Private declarations } 34 | public 35 | { Public declarations } 36 | end; 37 | 38 | var 39 | MainForm: TMainForm; 40 | 41 | implementation 42 | 43 | {$R *.fmx} 44 | 45 | procedure TMainForm.FormCreate(Sender: TObject); 46 | begin 47 | lblDeviceName.Text := SystemInfo.HostName; 48 | lblUserName.Text := SystemInfo.UserName; 49 | lblOS.Text := SystemInfo.OsVersion; 50 | lblAppPath.Text := SystemInfo.AppPath; 51 | lblAppName.Text := SystemInfo.AppName; 52 | lblAppVersion.Text := SystemInfo.AppVersion; 53 | end; 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickSysInfo/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/AndroidManifest.template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | <%uses-permission%> 11 | 12 | 21 | 22 | <%provider%> 23 | <%application-meta-data%> 24 | <%services%> 25 | 27 | 31 | 32 | 34 | 35 | 36 | 37 | 38 | 39 | <%activity%> 40 | <%receivers%> 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/Entitlement.TemplateOSX32.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%appSandboxKeys%> 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/Entitlement.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | <%getTaskAllowKey%> 6 | <%applicationIdentifier%> 7 | <%pushNotificationKey%> 8 | <%keychainAccessGroups%> 9 | 10 | 11 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/RunScheduledTasks.dpr: -------------------------------------------------------------------------------- 1 | program RunScheduledTasks; 2 | 3 | uses 4 | System.StartUpCopy, 5 | FMX.Forms, 6 | main in 'main.pas' {frmMain}; 7 | 8 | {$R *.res} 9 | 10 | begin 11 | Application.Initialize; 12 | Application.CreateForm(TfrmMain, frmMain); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/RunScheduledTasks.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/firemonkey/QuickThreads/ScheduledTasks/RunScheduledTasks.res -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/info.plist.TemplateOSX.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/info.plist.TemplateiOS.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | <%VersionInfoPListKeys%> 6 | <%ExtraInfoPListKeys%> 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/firemonkey/QuickThreads/ScheduledTasks/main.fmx: -------------------------------------------------------------------------------- 1 | object frmMain: TfrmMain 2 | Left = 0 3 | Top = 0 4 | Caption = 'Form1' 5 | ClientHeight = 480 6 | ClientWidth = 331 7 | FormFactor.Width = 320 8 | FormFactor.Height = 480 9 | FormFactor.Devices = [Desktop] 10 | OnActivate = FormActivate 11 | OnCreate = FormCreate 12 | OnClose = FormClose 13 | DesignerMasterStyle = 0 14 | object meLog: TMemo 15 | Touch.InteractiveGestures = [Pan, LongTap, DoubleTap] 16 | DataDetectorTypes = [] 17 | Align = Client 18 | Size.Width = 331.000000000000000000 19 | Size.Height = 430.000000000000000000 20 | Size.PlatformDefault = False 21 | TabOrder = 0 22 | Viewport.Width = 327.000000000000000000 23 | Viewport.Height = 426.000000000000000000 24 | end 25 | object Layout1: TLayout 26 | Align = MostBottom 27 | Position.Y = 430.000000000000000000 28 | Size.Width = 331.000000000000000000 29 | Size.Height = 50.000000000000000000 30 | Size.PlatformDefault = False 31 | TabOrder = 2 32 | object btnStart: TButton 33 | Align = Center 34 | StyledSettings = [Family, FontColor] 35 | Size.Width = 167.000000000000000000 36 | Size.Height = 35.000000000000000000 37 | Size.PlatformDefault = False 38 | TabOrder = 0 39 | Text = 'Start Scheduler' 40 | TextSettings.Font.Size = 18.000000000000000000 41 | TextSettings.Font.StyleExt = {00070000000000000004000000} 42 | OnClick = btnStartClick 43 | end 44 | end 45 | end 46 | -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/MyServiceConsole.lpi: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <Units Count="1"> 28 | <Unit0> 29 | <Filename Value="MyServiceConsole.lpr"/> 30 | <IsPartOfProject Value="True"/> 31 | </Unit0> 32 | </Units> 33 | </ProjectOptions> 34 | <CompilerOptions> 35 | <Version Value="11"/> 36 | <PathDelim Value="\"/> 37 | <Target> 38 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\MyServiceConsole"/> 39 | </Target> 40 | <SearchPaths> 41 | <IncludeFiles Value="$(ProjOutDir)"/> 42 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 43 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 44 | </SearchPaths> 45 | </CompilerOptions> 46 | <Debugging> 47 | <Exceptions Count="3"> 48 | <Item1> 49 | <Name Value="EAbort"/> 50 | </Item1> 51 | <Item2> 52 | <Name Value="ECodetoolError"/> 53 | </Item2> 54 | <Item3> 55 | <Name Value="EFOpenError"/> 56 | </Item3> 57 | </Exceptions> 58 | </Debugging> 59 | </CONFIG> 60 | -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/MyServiceConsole.lpr: -------------------------------------------------------------------------------- 1 | program MyServiceConsole; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$MODE DELPHI} 6 | 7 | {$R *.res} 8 | 9 | uses 10 | SysUtils, 11 | Quick.Commons, 12 | Quick.Console, 13 | Quick.AppService; 14 | 15 | type 16 | 17 | TSrvFactory = class 18 | class procedure CreateMyService; 19 | end; 20 | 21 | TMyService = class 22 | public 23 | procedure Execute; 24 | end; 25 | 26 | procedure TMyService.Execute; 27 | begin 28 | //your code 29 | end; 30 | 31 | var 32 | 33 | MyService : TMyService; 34 | 35 | class procedure TSrvFactory.CreateMyService; 36 | begin 37 | MyService := TMyService.Create; 38 | end; 39 | 40 | begin 41 | try 42 | if not AppService.IsRunningAsService then 43 | begin 44 | cout('Running in console mode',etInfo); 45 | MyService := TMyService.Create; 46 | MyService.Execute; 47 | cout('Press [Enter] to exit',etInfo); 48 | ConsoleWaitForEnterKey; 49 | cout('Closing app...',etInfo); 50 | MyService.Free; 51 | end 52 | else 53 | begin 54 | AppService.ServiceName := 'MyService'; 55 | AppService.DisplayName := 'MyServicesvc'; 56 | AppService.OnStart := TSrvFactory.CreateMyService; 57 | AppService.OnExecute := MyService.Execute; 58 | AppService.OnStop := MyService.Free; 59 | AppService.CheckParams; 60 | end; 61 | except 62 | on E: Exception do 63 | Writeln(E.ClassName, ': ', E.Message); 64 | end; 65 | end. 66 | -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/MyServiceConsole.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickAppService/ConsoleAndService/MyServiceConsole.res -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/backup/MyServiceConsole.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasScaledStatement Value="False"/> 10 | </Flags> 11 | <SessionStorage Value="InProjectDir"/> 12 | <MainUnit Value="0"/> 13 | <Title Value="QuickAppService"/> 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <Units Count="1"> 28 | <Unit0> 29 | <Filename Value="MyServiceConsole.lpr"/> 30 | <IsPartOfProject Value="True"/> 31 | </Unit0> 32 | </Units> 33 | </ProjectOptions> 34 | <CompilerOptions> 35 | <Version Value="11"/> 36 | <PathDelim Value="\"/> 37 | <Target> 38 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\MyServiceConsole"/> 39 | </Target> 40 | <SearchPaths> 41 | <IncludeFiles Value="$(ProjOutDir)"/> 42 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 43 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 44 | </SearchPaths> 45 | </CompilerOptions> 46 | <Debugging> 47 | <Exceptions Count="3"> 48 | <Item1> 49 | <Name Value="EAbort"/> 50 | </Item1> 51 | <Item2> 52 | <Name Value="ECodetoolError"/> 53 | </Item2> 54 | <Item3> 55 | <Name Value="EFOpenError"/> 56 | </Item3> 57 | </Exceptions> 58 | </Debugging> 59 | </CONFIG> 60 | -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/backup/MyServiceConsole.pas: -------------------------------------------------------------------------------- 1 | program MyServiceConsole; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$IFDEF FPC} 6 | {$MODE DELPHI} 7 | {$ENDIF} 8 | 9 | {$R *.res} 10 | 11 | uses 12 | SysUtils, 13 | Quick.Commons, 14 | Quick.Console, 15 | Quick.AppService; 16 | 17 | type 18 | 19 | {$IFDEF FPC} 20 | TSrvFactory = class 21 | class procedure CreateMyService; 22 | end; 23 | {$ENDIF} 24 | 25 | TMyService = class 26 | public 27 | procedure Execute; 28 | end; 29 | 30 | procedure TMyService.Execute; 31 | begin 32 | //your code 33 | end; 34 | 35 | var 36 | 37 | MyService : TMyService; 38 | 39 | {$IFDEF FPC} 40 | class procedure TSrvFactory.CreateMyService; 41 | begin 42 | MyService := TMyService.Create; 43 | end; 44 | {$ENDIF} 45 | 46 | begin 47 | 48 | try 49 | if not AppService.IsRunningAsService then 50 | begin 51 | cout('Running in console mode',etInfo); 52 | MyService := TMyService.Create; 53 | MyService.Execute; 54 | cout('Press [Enter] to exit',etInfo); 55 | ConsoleWaitForEnterKey; 56 | cout('Closing app...',etInfo); 57 | MyService.Free; 58 | end 59 | else 60 | begin 61 | AppService.ServiceName := 'MyService'; 62 | AppService.DisplayName := 'MyServicesvc'; 63 | {$IFDEF FPC} 64 | AppService.OnStart := TSrvFactory.CreateMyService; 65 | {$ELSE} 66 | //you can pass an anonymous method to events 67 | AppService.OnStart := procedure 68 | begin 69 | MyService := TMyService.Start; 70 | end; 71 | {$ENDIF} 72 | AppService.OnExecute := MyService.Execute; 73 | AppService.OnStop := MyService.Free; 74 | AppService.CheckParams; 75 | end; 76 | except 77 | on E: Exception do 78 | Writeln(E.ClassName, ': ', E.Message); 79 | end; 80 | end. 81 | -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/lib/i386-win32/MyServiceConsole.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickAppService/ConsoleAndService/lib/i386-win32/MyServiceConsole.res -------------------------------------------------------------------------------- /samples/fpc/QuickAppService/ConsoleAndService/lib/i386-win32/QuickAppServiceSample.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickAppService/ConsoleAndService/lib/i386-win32/QuickAppServiceSample.res -------------------------------------------------------------------------------- /samples/fpc/QuickArrayHelper/ArrayHelpers.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="ArrayHelpers"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="ArrayHelpers.pas"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="ArrayHelpers"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\.."/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrayHelper/ArrayHelpers.pas: -------------------------------------------------------------------------------- 1 | program ArrayHelpers; 2 | 3 | {$Mode delphi} 4 | 5 | uses 6 | SysUtils, 7 | Quick.Commons, 8 | Quick.Console, 9 | Quick.Arrays.Helper; 10 | 11 | var 12 | 13 | myarray : TStringArray; 14 | 15 | begin 16 | try 17 | myarray.Add('one'); 18 | myarray.Add('two'); 19 | myarray.Add('three'); 20 | coutFmt('count: %d',[myarray.Count],etInfo); 21 | if myarray.Contains('two') then cout('found "two" in array',etInfo) 22 | else cout('not found',etInfo); 23 | 24 | coutFmt('"three" in position %d',[myarray.IndexOf('three')],etInfo); 25 | 26 | TArrayHelper<string>.Add(myarray,'four'); 27 | 28 | cout('Press <Enter> to Exit',ccYellow); 29 | 30 | ConsoleWaitForEnterKey; 31 | except 32 | on E: Exception do 33 | Writeln(E.ClassName, ': ', E.Message); 34 | end; 35 | end. 36 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/FlexArrays/ManageFlexArrays.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="ManageFlexArrays"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="ManageFlexArrays.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="ManageFlexArrays"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\quicklib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/FlexArrays/ManageFlexArrays.lpr: -------------------------------------------------------------------------------- 1 | program ManageFlexArrays; 2 | 3 | {$MODE DELPHI} 4 | 5 | uses 6 | SysUtils, 7 | Quick.Commons, 8 | Quick.Console, 9 | Quick.Arrays; 10 | 11 | type 12 | TUser = class 13 | private 14 | fName : string; 15 | public 16 | property Name : string read fName write fName; 17 | end; 18 | 19 | var 20 | flexarray : TFlexArray; 21 | user : TUser; 22 | 23 | begin 24 | try 25 | flexarray.Add(10); 26 | flexarray.Add('Hello'); 27 | user := TUser.Create; 28 | try 29 | user.Name := 'Joe'; 30 | flexarray.Add(user); 31 | 32 | cout('Integer Item = %d',[flexarray[0].AsInteger],etInfo); 33 | cout('String Item = %s',[flexarray[1].AsString],etInfo); 34 | cout('Record Item = %s',[TUser(flexarray[2].AsObject).Name],etInfo); 35 | finally 36 | user.Free; 37 | end; 38 | cout('Press <Enter> to Exit',ccYellow); 39 | ConsoleWaitForEnterKey; 40 | except 41 | on E: Exception do 42 | Writeln(E.ClassName, ': ', E.Message); 43 | end; 44 | end. 45 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/FlexPairArrays/ManageFlexPairArrays.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="ManageFlexPairArrays"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="ManageFlexPairArrays.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="ManageFlexPairArrays"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\quicklib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/FlexPairArrays/ManageFlexPairArrays.lpr: -------------------------------------------------------------------------------- 1 | program ManageFlexPairArrays; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$MODE DELPHI} 6 | 7 | uses 8 | SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Value, 12 | Quick.Arrays; 13 | 14 | type 15 | TUser = class 16 | private 17 | fName : string; 18 | public 19 | property Name : string read fName write fName; 20 | end; 21 | 22 | var 23 | flexarray : TFlexPairArray; 24 | user : TUser; 25 | 26 | begin 27 | try 28 | flexarray.Add('onenumber',10); 29 | flexarray.Add('other','Hello boy!'); 30 | user := TUser.Create; 31 | try 32 | user.Name := 'Joe'; 33 | flexarray.Add('myuser',user); 34 | 35 | cout('Integer Item = %d',[flexarray.GetValue('onenumber').AsInteger],etInfo); 36 | cout('String Item = %s',[flexarray.GetValue('other').AsString],etInfo); 37 | cout('Record Item = %s',[TUser(flexarray.GetValue('myuser').AsObject).Name],etInfo); 38 | finally 39 | user.Free; 40 | end; 41 | 42 | cout('Press <Enter> to Exit',ccYellow); 43 | ConsoleWaitForEnterKey; 44 | except 45 | on E: Exception do 46 | Writeln(E.ClassName, ': ', E.Message); 47 | end; 48 | end. 49 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/ManageXArrays/ManageArrays.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="ManageArrays"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="ManageArrays.pas"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="ManageArrays"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\quicklib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/ManageXArrays/ManageArrays.pas: -------------------------------------------------------------------------------- 1 | program ManageArrays; 2 | 3 | {$Mode delphi} 4 | 5 | uses 6 | SysUtils, 7 | Quick.Commons, 8 | Quick.Console, 9 | Quick.Arrays; 10 | 11 | type 12 | 13 | TUser = record 14 | Name : string; 15 | Age : Integer; 16 | end; 17 | 18 | TUserArray = TXArray<TUser>; 19 | 20 | var 21 | userarray : TUserArray; 22 | user : TUser; 23 | normalarray : TArray<TUser>; 24 | 25 | 26 | begin 27 | try 28 | user.Name := 'Joe'; 29 | user.Age := 30; 30 | userarray.Add(user); 31 | user.Name := 'Peter'; 32 | user.Age := 32; 33 | userarray.Add(user); 34 | user.Name := 'James'; 35 | user.Age := 40; 36 | userarray.Add(user); 37 | 38 | if userarray.Contains(user) then cout('found user in array',etInfo); 39 | 40 | cout('List users:',ccYellow); 41 | for user in userarray do 42 | begin 43 | coutFmt('User: %s',[user.Name],etInfo); 44 | end; 45 | 46 | normalarray := userarray; 47 | 48 | coutFmt('Copied array value 1: %s',[normalarray[1].Name],etInfo); 49 | 50 | cout('Press <Enter> to Exit',ccYellow); 51 | 52 | ConsoleWaitForEnterKey; 53 | except 54 | on E: Exception do 55 | Writeln(E.ClassName, ': ', E.Message); 56 | end; 57 | end. 58 | -------------------------------------------------------------------------------- /samples/fpc/QuickArrays/ManageXArrays/ppas.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | SET THEFILE=ManageArrays.exe 3 | echo Linking %THEFILE% 4 | D:\Lazarus\fpc\bin\i386-win32\ld.exe -b pei-i386 -m i386pe --gc-sections --entry=_mainCRTStartup -o ManageArrays.exe link.res 5 | if errorlevel 1 goto linkend 6 | D:\Lazarus\fpc\bin\i386-win32\postw32.exe --subsystem console --input ManageArrays.exe --stack 16777216 7 | if errorlevel 1 goto linkend 8 | goto end 9 | :asmend 10 | echo An error occurred while assembling %THEFILE% 11 | goto end 12 | :linkend 13 | echo An error occurred while linking %THEFILE% 14 | :end 15 | -------------------------------------------------------------------------------- /samples/fpc/QuickAutoMapper/AutoMapperObjects.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="AutoMapperObjects"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="AutoMapperObjects.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\AutoMapperObjects"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickChrono/simplechrono.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="simplechrono"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="simplechrono.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\simplechrono"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickChrono/simplechrono.lpr: -------------------------------------------------------------------------------- 1 | program simplechrono; 2 | 3 | uses 4 | SysUtils, 5 | DateUtils, 6 | Quick.Commons, 7 | Quick.Console, 8 | Quick.Chrono; 9 | 10 | var 11 | crono : TChronometer; 12 | starttime : TDateTime; 13 | ms : Int64; 14 | begin 15 | try 16 | Console.LogVerbose := LOG_ALL; 17 | cout('Chrono Test',etInfo); 18 | crono := TChronometer.Create; 19 | crono.Start; 20 | starttime := Now(); 21 | repeat 22 | ms := MillisecondsBetween(Now(),StartTime); 23 | until ms >= 4000; 24 | crono.Stop; 25 | cout('crono stopped!',etInfo); 26 | cout('Loop: %d Elapsed: %s',[ms,crono.ElapsedTime],etInfo); 27 | Readln; 28 | except 29 | on e : Exception do WriteLn(e.message); 30 | end; 31 | end. 32 | 33 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.ico -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <SessionStorage Value="InProjectDir"/> 8 | <MainUnit Value="0"/> 9 | <Title Value="QuickConfig"/> 10 | <Scaled Value="True"/> 11 | <ResourceType Value="res"/> 12 | <UseXPManifest Value="True"/> 13 | <XPManifest> 14 | <DpiAware Value="True"/> 15 | </XPManifest> 16 | <Icon Value="0"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <RequiredPackages Count="1"> 29 | <Item1> 30 | <PackageName Value="LCL"/> 31 | </Item1> 32 | </RequiredPackages> 33 | <Units Count="2"> 34 | <Unit0> 35 | <Filename Value="QuickConfig.pas"/> 36 | <IsPartOfProject Value="True"/> 37 | </Unit0> 38 | <Unit1> 39 | <Filename Value="umain.pas"/> 40 | <IsPartOfProject Value="True"/> 41 | <ComponentName Value="Form1"/> 42 | <HasResources Value="True"/> 43 | <ResourceBaseClass Value="Form"/> 44 | <UnitName Value="uMain"/> 45 | </Unit1> 46 | </Units> 47 | </ProjectOptions> 48 | <CompilerOptions> 49 | <Version Value="11"/> 50 | <PathDelim Value="\"/> 51 | <Target> 52 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\QuickConfig"/> 53 | </Target> 54 | <SearchPaths> 55 | <IncludeFiles Value="$(ProjOutDir)"/> 56 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 57 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 58 | </SearchPaths> 59 | <Linking> 60 | <Options> 61 | <Win32> 62 | <GraphicApplication Value="True"/> 63 | </Win32> 64 | </Options> 65 | </Linking> 66 | </CompilerOptions> 67 | <Debugging> 68 | <Exceptions Count="4"> 69 | <Item1> 70 | <Name Value="EAbort"/> 71 | </Item1> 72 | <Item2> 73 | <Name Value="ECodetoolError"/> 74 | </Item2> 75 | <Item3> 76 | <Name Value="EFOpenError"/> 77 | </Item3> 78 | <Item4> 79 | <Name Value="Exception"/> 80 | </Item4> 81 | </Exceptions> 82 | </Debugging> 83 | </CONFIG> 84 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.lpr: -------------------------------------------------------------------------------- 1 | program QuickConfig; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | uses 6 | {$IFDEF UNIX}{$IFDEF UseCThreads} 7 | cthreads, 8 | {$ENDIF}{$ENDIF} 9 | Interfaces, // this includes the LCL widgetset 10 | Forms; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | RequireDerivedFormResource:=True; 16 | Application.Scaled:=True; 17 | Application.Initialize; 18 | Application.Run; 19 | end. 20 | 21 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.pas: -------------------------------------------------------------------------------- 1 | program QuickConfig; 2 | 3 | uses 4 | Forms, Interfaces, 5 | uMain in 'uMain.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Scaled:=True; 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToJSON/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/lib/i386-win32/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToJSON/lib/i386-win32/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/lib/i386-win32/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 379 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveJson: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Json' 18 | OnClick = btnSaveJsonClick 19 | TabOrder = 0 20 | end 21 | object btnLoadJson: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Cancel = True 27 | Caption = 'Load From Json' 28 | OnClick = btnLoadJsonClick 29 | TabOrder = 1 30 | end 31 | object meInfo: TMemo 32 | Left = 19 33 | Height = 407 34 | Top = 9 35 | Width = 549 36 | ReadOnly = True 37 | ScrollBars = ssAutoBoth 38 | TabOrder = 2 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToJSON/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 379 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveJson: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Json' 18 | OnClick = btnSaveJsonClick 19 | TabOrder = 0 20 | end 21 | object btnLoadJson: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Cancel = True 27 | Caption = 'Load From Json' 28 | OnClick = btnLoadJsonClick 29 | TabOrder = 1 30 | end 31 | object meInfo: TMemo 32 | Left = 19 33 | Height = 407 34 | Top = 9 35 | Width = 549 36 | ReadOnly = True 37 | ScrollBars = ssAutoBoth 38 | TabOrder = 2 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/QuickConfig.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToRegistry/QuickConfig.ico -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/QuickConfig.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <SessionStorage Value="InProjectDir"/> 8 | <MainUnit Value="0"/> 9 | <Title Value="QuickConfig"/> 10 | <Scaled Value="True"/> 11 | <ResourceType Value="res"/> 12 | <UseXPManifest Value="True"/> 13 | <XPManifest> 14 | <DpiAware Value="True"/> 15 | </XPManifest> 16 | <Icon Value="0"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <RequiredPackages Count="1"> 29 | <Item1> 30 | <PackageName Value="LCL"/> 31 | </Item1> 32 | </RequiredPackages> 33 | <Units Count="2"> 34 | <Unit0> 35 | <Filename Value="QuickConfig.pas"/> 36 | <IsPartOfProject Value="True"/> 37 | </Unit0> 38 | <Unit1> 39 | <Filename Value="umain.pas"/> 40 | <IsPartOfProject Value="True"/> 41 | <ComponentName Value="Form1"/> 42 | <HasResources Value="True"/> 43 | <ResourceBaseClass Value="Form"/> 44 | <UnitName Value="uMain"/> 45 | </Unit1> 46 | </Units> 47 | </ProjectOptions> 48 | <CompilerOptions> 49 | <Version Value="11"/> 50 | <PathDelim Value="\"/> 51 | <Target> 52 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\QuickConfig"/> 53 | </Target> 54 | <SearchPaths> 55 | <IncludeFiles Value="$(ProjOutDir)"/> 56 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 57 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 58 | </SearchPaths> 59 | <Linking> 60 | <Options> 61 | <Win32> 62 | <GraphicApplication Value="True"/> 63 | </Win32> 64 | </Options> 65 | </Linking> 66 | </CompilerOptions> 67 | <Debugging> 68 | <Exceptions Count="4"> 69 | <Item1> 70 | <Name Value="EAbort"/> 71 | </Item1> 72 | <Item2> 73 | <Name Value="ECodetoolError"/> 74 | </Item2> 75 | <Item3> 76 | <Name Value="EFOpenError"/> 77 | </Item3> 78 | <Item4> 79 | <Name Value="Exception"/> 80 | </Item4> 81 | </Exceptions> 82 | </Debugging> 83 | </CONFIG> 84 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/QuickConfig.pas: -------------------------------------------------------------------------------- 1 | program QuickConfig; 2 | 3 | uses 4 | Forms, Interfaces, 5 | umain; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Scaled:=True; 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToRegistry/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/lib/i386-win32/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToRegistry/lib/i386-win32/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/lib/i386-win32/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 379 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveJson: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Registry' 18 | OnClick = btnSaveJsonClick 19 | TabOrder = 0 20 | end 21 | object btnLoadJson: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Caption = 'Load From Registry' 27 | OnClick = btnLoadJsonClick 28 | TabOrder = 1 29 | end 30 | object meInfo: TMemo 31 | Left = 19 32 | Height = 407 33 | Top = 9 34 | Width = 549 35 | ReadOnly = True 36 | ScrollBars = ssAutoBoth 37 | TabOrder = 2 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/lib/x86_64-win64/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToRegistry/lib/x86_64-win64/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/lib/x86_64-win64/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 379 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveJson: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Registry' 18 | OnClick = btnSaveJsonClick 19 | TabOrder = 0 20 | end 21 | object btnLoadJson: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Caption = 'Load From Registry' 27 | OnClick = btnLoadJsonClick 28 | TabOrder = 1 29 | end 30 | object meInfo: TMemo 31 | Left = 19 32 | Height = 407 33 | Top = 9 34 | Width = 549 35 | ReadOnly = True 36 | ScrollBars = ssAutoBoth 37 | TabOrder = 2 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToRegistry/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 379 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveJson: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Registry' 18 | OnClick = btnSaveJsonClick 19 | TabOrder = 0 20 | end 21 | object btnLoadJson: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Caption = 'Load From Registry' 27 | OnClick = btnLoadJsonClick 28 | TabOrder = 1 29 | end 30 | object meInfo: TMemo 31 | Left = 19 32 | Height = 407 33 | Top = 9 34 | Width = 549 35 | ReadOnly = True 36 | ScrollBars = ssAutoBoth 37 | TabOrder = 2 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/QuickConfig.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <SessionStorage Value="InProjectDir"/> 8 | <MainUnit Value="0"/> 9 | <Title Value="QuickConfig"/> 10 | <Scaled Value="True"/> 11 | <ResourceType Value="res"/> 12 | <UseXPManifest Value="True"/> 13 | <XPManifest> 14 | <DpiAware Value="True"/> 15 | </XPManifest> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <RequiredPackages Count="1"> 28 | <Item1> 29 | <PackageName Value="LCL"/> 30 | </Item1> 31 | </RequiredPackages> 32 | <Units Count="2"> 33 | <Unit0> 34 | <Filename Value="QuickConfig.pas"/> 35 | <IsPartOfProject Value="True"/> 36 | </Unit0> 37 | <Unit1> 38 | <Filename Value="umain.pas"/> 39 | <IsPartOfProject Value="True"/> 40 | <ComponentName Value="Form1"/> 41 | <HasResources Value="True"/> 42 | <ResourceBaseClass Value="Form"/> 43 | <UnitName Value="uMain"/> 44 | </Unit1> 45 | </Units> 46 | </ProjectOptions> 47 | <CompilerOptions> 48 | <Version Value="11"/> 49 | <PathDelim Value="\"/> 50 | <Target> 51 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\QuickConfig"/> 52 | </Target> 53 | <SearchPaths> 54 | <IncludeFiles Value="$(ProjOutDir)"/> 55 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 56 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 57 | </SearchPaths> 58 | <Linking> 59 | <Options> 60 | <Win32> 61 | <GraphicApplication Value="True"/> 62 | </Win32> 63 | </Options> 64 | </Linking> 65 | </CompilerOptions> 66 | <Debugging> 67 | <Exceptions Count="4"> 68 | <Item1> 69 | <Name Value="EAbort"/> 70 | </Item1> 71 | <Item2> 72 | <Name Value="ECodetoolError"/> 73 | </Item2> 74 | <Item3> 75 | <Name Value="EFOpenError"/> 76 | </Item3> 77 | <Item4> 78 | <Name Value="Exception"/> 79 | </Item4> 80 | </Exceptions> 81 | </Debugging> 82 | </CONFIG> 83 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/QuickConfig.lpr: -------------------------------------------------------------------------------- 1 | program QuickConfig; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | uses 6 | {$IFDEF UNIX}{$IFDEF UseCThreads} 7 | cthreads, 8 | {$ENDIF}{$ENDIF} 9 | Interfaces, // this includes the LCL widgetset 10 | Forms; 11 | 12 | {$R *.res} 13 | 14 | begin 15 | RequireDerivedFormResource:=True; 16 | Application.Scaled:=True; 17 | Application.Initialize; 18 | Application.Run; 19 | end. 20 | 21 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/QuickConfig.pas: -------------------------------------------------------------------------------- 1 | program QuickConfig; 2 | 3 | uses 4 | Forms, Interfaces, 5 | uMain in 'uMain.pas' {MainForm}; 6 | 7 | {$R *.res} 8 | 9 | begin 10 | Application.Scaled:=True; 11 | Application.Initialize; 12 | Application.CreateForm(TForm1, Form1); 13 | Application.Run; 14 | end. 15 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToYAML/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/lib/i386-win32/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToYAML/lib/i386-win32/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/lib/i386-win32/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = -1541 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveYaml: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Yaml' 18 | OnClick = btnSaveYamlClick 19 | TabOrder = 0 20 | end 21 | object btnLoadYaml: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Cancel = True 27 | Caption = 'Load From Yaml' 28 | OnClick = btnLoadYamlClick 29 | TabOrder = 1 30 | end 31 | object meInfo: TMemo 32 | Left = 19 33 | Height = 407 34 | Top = 9 35 | Width = 549 36 | ReadOnly = True 37 | ScrollBars = ssAutoBoth 38 | TabOrder = 2 39 | end 40 | object Button1: TButton 41 | Left = 96 42 | Height = 25 43 | Top = 424 44 | Width = 75 45 | Caption = 'Button1' 46 | OnClick = Button1Click 47 | TabOrder = 3 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/lib/x86_64-linux/QuickConfig.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConfig/ConfigToYAML/lib/x86_64-linux/QuickConfig.res -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/lib/x86_64-linux/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 379 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveYaml: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Yaml' 18 | OnClick = btnSaveYamlClick 19 | TabOrder = 0 20 | end 21 | object btnLoadYaml: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Cancel = True 27 | Caption = 'Load From Yaml' 28 | OnClick = btnLoadYamlClick 29 | TabOrder = 1 30 | end 31 | object meInfo: TMemo 32 | Left = 19 33 | Height = 407 34 | Top = 9 35 | Width = 549 36 | ReadOnly = True 37 | ScrollBars = ssAutoBoth 38 | TabOrder = 2 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /samples/fpc/QuickConfig/ConfigToYAML/umain.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = -1541 3 | Height = 457 4 | Top = 208 5 | Width = 592 6 | Caption = 'Form1' 7 | ClientHeight = 457 8 | ClientWidth = 592 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object btnSaveYaml: TButton 13 | Left = 448 14 | Height = 25 15 | Top = 424 16 | Width = 120 17 | Caption = 'Save to Yaml' 18 | OnClick = btnSaveYamlClick 19 | TabOrder = 0 20 | end 21 | object btnLoadYaml: TButton 22 | Left = 312 23 | Height = 25 24 | Top = 424 25 | Width = 123 26 | Cancel = True 27 | Caption = 'Load From Yaml' 28 | OnClick = btnLoadYamlClick 29 | TabOrder = 1 30 | end 31 | object meInfo: TMemo 32 | Left = 19 33 | Height = 407 34 | Top = 9 35 | Width = 549 36 | ReadOnly = True 37 | ScrollBars = ssAutoBoth 38 | TabOrder = 2 39 | end 40 | object Button1: TButton 41 | Left = 96 42 | Height = 25 43 | Top = 424 44 | Width = 75 45 | Caption = 'Button1' 46 | OnClick = Button1Click 47 | TabOrder = 3 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleMenu/ConsoleMenu.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasScaledStatement Value="False"/> 10 | </Flags> 11 | <SessionStorage Value="InProjectDir"/> 12 | <MainUnit Value="0"/> 13 | <Title Value="Console Menu"/> 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <Units Count="1"> 28 | <Unit0> 29 | <Filename Value="ConsoleMenu.pas"/> 30 | <IsPartOfProject Value="True"/> 31 | </Unit0> 32 | </Units> 33 | </ProjectOptions> 34 | <CompilerOptions> 35 | <Version Value="11"/> 36 | <PathDelim Value="\"/> 37 | <Target> 38 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\ConsoleMenu"/> 39 | </Target> 40 | <SearchPaths> 41 | <IncludeFiles Value="$(ProjOutDir)"/> 42 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 43 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 44 | </SearchPaths> 45 | </CompilerOptions> 46 | <Debugging> 47 | <Exceptions Count="3"> 48 | <Item1> 49 | <Name Value="EAbort"/> 50 | </Item1> 51 | <Item2> 52 | <Name Value="ECodetoolError"/> 53 | </Item2> 54 | <Item3> 55 | <Name Value="EFOpenError"/> 56 | </Item3> 57 | </Exceptions> 58 | </Debugging> 59 | </CONFIG> 60 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleMenu/ConsoleMenu.pas: -------------------------------------------------------------------------------- 1 | program ConsoleMenu; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$MODE DELPHI} 6 | 7 | {$R *.res} 8 | 9 | uses 10 | SysUtils, 11 | Windows, 12 | Quick.Commons, 13 | Quick.Console; 14 | 15 | type 16 | TTest = class 17 | class procedure Option1; 18 | class procedure Option2; 19 | class procedure Option3; 20 | class procedure Option4; 21 | class procedure Option5; 22 | end; 23 | 24 | var 25 | conmenu : TConsoleMenu; 26 | Test : TTest; 27 | menuop : TConsoleMenuOption; 28 | i : Integer; 29 | 30 | { TTest } 31 | 32 | class procedure TTest.Option1; 33 | begin 34 | coutXY(10,10,'Option 1 pressed',etInfo); 35 | end; 36 | 37 | class procedure TTest.Option2; 38 | begin 39 | coutXY(10,10,'Option 2 pressed',etInfo); 40 | end; 41 | 42 | class procedure TTest.Option3; 43 | begin 44 | coutXY(10,10,'Option 3 pressed',etInfo); 45 | end; 46 | 47 | class procedure TTest.Option4; 48 | begin 49 | coutXY(10,10,'Option 4 pressed',etInfo); 50 | end; 51 | 52 | class procedure TTest.Option5; 53 | begin 54 | coutXY(10,10,'Option 5 pressed',etInfo); 55 | end; 56 | 57 | begin 58 | try 59 | conmenu := TConsoleMenu.Create; 60 | menuop.Caption := 'Option 1'; 61 | menuop.Key := VK_F1; 62 | menuop.OnKeyPressed := Test.Option1; 63 | conmenu.AddMenu(menuop); 64 | conmenu.AddMenu('Option 2',VK_F2,Test.Option2); 65 | conmenu.AddMenu('Option 3',VK_F3,Test.Option3); 66 | 67 | conmenu.AddMenu('Option 4',VK_F4,Test.Option4); 68 | 69 | conmenu.AddMenu('Option 5',VK_F5,Test.Option5); 70 | 71 | for i := 0 to 30 do writeln('hola que tal'); 72 | 73 | conmenu.WaitForKeys; 74 | conmenu.Free; 75 | except 76 | on E: Exception do 77 | Writeln(E.ClassName, ': ', E.Message); 78 | end; 79 | end. 80 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleMenu/ConsoleMenu.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConsole/ConsoleMenu/ConsoleMenu.res -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleMenu/backup/ConsoleMenu.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasScaledStatement Value="False"/> 10 | </Flags> 11 | <SessionStorage Value="InProjectDir"/> 12 | <MainUnit Value="0"/> 13 | <Title Value="Console Menu"/> 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <Units Count="1"> 28 | <Unit0> 29 | <Filename Value="ConsoleMenu.pas"/> 30 | <IsPartOfProject Value="True"/> 31 | </Unit0> 32 | </Units> 33 | </ProjectOptions> 34 | <CompilerOptions> 35 | <Version Value="11"/> 36 | <PathDelim Value="\"/> 37 | <Target> 38 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\ConsoleMenu"/> 39 | </Target> 40 | <SearchPaths> 41 | <IncludeFiles Value="$(ProjOutDir)"/> 42 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 43 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 44 | </SearchPaths> 45 | </CompilerOptions> 46 | <Debugging> 47 | <Exceptions Count="3"> 48 | <Item1> 49 | <Name Value="EAbort"/> 50 | </Item1> 51 | <Item2> 52 | <Name Value="ECodetoolError"/> 53 | </Item2> 54 | <Item3> 55 | <Name Value="EFOpenError"/> 56 | </Item3> 57 | </Exceptions> 58 | </Debugging> 59 | </CONFIG> 60 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleMenu/backup/ConsoleMenu.pas: -------------------------------------------------------------------------------- 1 | program ConsoleMenu; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$MODE DELPHI} 6 | 7 | {$R *.res} 8 | 9 | uses 10 | SysUtils, 11 | Windows, 12 | Quick.Commons, 13 | Quick.Console; 14 | 15 | type 16 | TTest = class 17 | class procedure Option1; 18 | class procedure Option2; 19 | class procedure Option3; 20 | class procedure Option4; 21 | class procedure Option5; 22 | end; 23 | 24 | var 25 | conmenu : TConsoleMenu; 26 | Test : TTest; 27 | menuop : TConsoleMenuOption; 28 | i : Integer; 29 | 30 | { TTest } 31 | 32 | class procedure TTest.Option1; 33 | begin 34 | coutXY(10,10,'Option 1 pressed',etInfo); 35 | end; 36 | 37 | class procedure TTest.Option2; 38 | begin 39 | coutXY(10,10,'Option 2 pressed',etInfo); 40 | end; 41 | 42 | class procedure TTest.Option3; 43 | begin 44 | coutXY(10,10,'Option 3 pressed',etInfo); 45 | end; 46 | 47 | class procedure TTest.Option4; 48 | begin 49 | coutXY(10,10,'Option 4 pressed',etInfo); 50 | end; 51 | 52 | class procedure TTest.Option5; 53 | begin 54 | coutXY(10,10,'Option 5 pressed',etInfo); 55 | end; 56 | 57 | begin 58 | Application.Title:='Console Menu'; 59 | try 60 | conmenu := TConsoleMenu.Create; 61 | menuop.Caption := 'Option 1'; 62 | menuop.Key := VK_F1; 63 | menuop.OnKeyPressed := Test.Option1; 64 | conmenu.AddMenu(menuop); 65 | conmenu.AddMenu('Option 2',VK_F2,Test.Option2); 66 | conmenu.AddMenu('Option 3',VK_F3,Test.Option3); 67 | 68 | conmenu.AddMenu('Option 4',VK_F4,Test.Option4); 69 | 70 | conmenu.AddMenu('Option 5',VK_F5,Test.Option5); 71 | 72 | for i := 0 to 30 do writeln('hola que tal'); 73 | 74 | conmenu.WaitForKeys; 75 | conmenu.Free; 76 | except 77 | on E: Exception do 78 | Writeln(E.ClassName, ': ', E.Message); 79 | end; 80 | end. 81 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleMenu/lib/i386-win32/ConsoleMenu.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConsole/ConsoleMenu/lib/i386-win32/ConsoleMenu.res -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/ConsoleOut.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasScaledStatement Value="False"/> 10 | </Flags> 11 | <SessionStorage Value="InProjectDir"/> 12 | <MainUnit Value="0"/> 13 | <Title Value="ConsoleDemo"/> 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <Units Count="1"> 28 | <Unit0> 29 | <Filename Value="ConsoleOut.pas"/> 30 | <IsPartOfProject Value="True"/> 31 | </Unit0> 32 | </Units> 33 | </ProjectOptions> 34 | <CompilerOptions> 35 | <Version Value="11"/> 36 | <PathDelim Value="\"/> 37 | <Target> 38 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\ConsoleOut\bin"/> 39 | </Target> 40 | <SearchPaths> 41 | <IncludeFiles Value="$(ProjOutDir)"/> 42 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 43 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 44 | </SearchPaths> 45 | <CodeGeneration> 46 | <TargetCPU Value="x86_64"/> 47 | <TargetOS Value="linux"/> 48 | </CodeGeneration> 49 | </CompilerOptions> 50 | <Debugging> 51 | <Exceptions Count="3"> 52 | <Item1> 53 | <Name Value="EAbort"/> 54 | </Item1> 55 | <Item2> 56 | <Name Value="ECodetoolError"/> 57 | </Item2> 58 | <Item3> 59 | <Name Value="EFOpenError"/> 60 | </Item3> 61 | </Exceptions> 62 | </Debugging> 63 | </CONFIG> 64 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/ConsoleOut.pas: -------------------------------------------------------------------------------- 1 | program ConsoleOut; 2 | 3 | {$IFDEF MSWINDOWS} 4 | {$APPTYPE CONSOLE} 5 | {$ENDIF} 6 | 7 | {$MODE DELPHI} 8 | 9 | {$R *.res} 10 | 11 | uses 12 | SysUtils, 13 | Quick.Commons, 14 | Quick.Console; 15 | 16 | begin 17 | Application.Title:='ConsoleDemo'; 18 | {$IFDEF MSWINDOWS} 19 | Application.Title:='ConsoleDemo'; 20 | {$ENDIF} 21 | try 22 | Console.LogVerbose := LOG_DEBUG; 23 | writeln('Console Out Example'); 24 | coutXY(10,10,'this line will be replaced by the next',etInfo); 25 | coutXY(10,10,'this line replaces previous',etSuccess); 26 | cout('Normal line 1',etInfo); 27 | coutBL('bottom line: 1',etInfo); 28 | cout('Normal line 2',etDebug); 29 | coutXY(10,5,'I''m here',etSuccess); 30 | cout('Normal line 3',etSuccess); 31 | coutBL('bottom line: 2',etInfo); 32 | coutBL('bottom line: 3',etInfo); 33 | ConsoleWaitForEnterKey; 34 | except 35 | on E: Exception do 36 | Writeln(E.ClassName, ': ', E.Message); 37 | end; 38 | end. 39 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/ConsoleOut.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConsole/ConsoleOut/ConsoleOut.res -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/backup/ConsoleOut.pas: -------------------------------------------------------------------------------- 1 | program ConsoleOut; 2 | 3 | {$IFDEF MSWINDOWS} 4 | {$APPTYPE CONSOLE} 5 | {$ENDIF} 6 | 7 | {$MODE DELPHI} 8 | 9 | {$R *.res} 10 | 11 | uses 12 | SysUtils, 13 | Quick.Commons, 14 | Quick.Console; 15 | 16 | begin 17 | {$IFDEF MSWINDOWS} 18 | Application.Title:='ConsoleDemo'; 19 | {$ENDIF} 20 | try 21 | Console.LogVerbose := LOG_DEBUG; 22 | writeln('Console Out Example'); 23 | coutXY(10,10,'this line will be replaced by the next',etInfo); 24 | coutXY(10,10,'this line replaces previous',etSuccess); 25 | cout('Normal line 1',etInfo); 26 | coutBL('bottom line: 1',etInfo); 27 | cout('Normal line 2',etDebug); 28 | coutXY(10,5,'I''m here',etSuccess); 29 | cout('Normal line 3',etSuccess); 30 | coutBL('bottom line: 2',etInfo); 31 | coutBL('bottom line: 3',etInfo); 32 | ConsoleWaitForEnterKey; 33 | except 34 | on E: Exception do 35 | Writeln(E.ClassName, ': ', E.Message); 36 | end; 37 | end. 38 | -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/bin/x86_64-linux/ConsoleOut: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConsole/ConsoleOut/bin/x86_64-linux/ConsoleOut -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/lib/i386-win32/ConsoleOut.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConsole/ConsoleOut/lib/i386-win32/ConsoleOut.res -------------------------------------------------------------------------------- /samples/fpc/QuickConsole/ConsoleOut/lib/x86_64-linux/ConsoleOut.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickConsole/ConsoleOut/lib/x86_64-linux/ConsoleOut.res -------------------------------------------------------------------------------- /samples/fpc/QuickHttpServer/HttpServerService.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="HttpServerService"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <RequiredPackages Count="1"> 29 | <Item1> 30 | <PackageName Value="indylaz"/> 31 | </Item1> 32 | </RequiredPackages> 33 | <Units Count="1"> 34 | <Unit0> 35 | <Filename Value="HttpServerService.pas"/> 36 | <IsPartOfProject Value="True"/> 37 | </Unit0> 38 | </Units> 39 | </ProjectOptions> 40 | <CompilerOptions> 41 | <Version Value="11"/> 42 | <PathDelim Value="\"/> 43 | <Target> 44 | <Filename Value="HttpServerService"/> 45 | </Target> 46 | <SearchPaths> 47 | <IncludeFiles Value="$(ProjOutDir)"/> 48 | <Libraries Value="..\..\..;..\..\..\..\QuickLogger"/> 49 | <OtherUnitFiles Value="..\..\..;..\..\..\..\QuickLogger"/> 50 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 51 | </SearchPaths> 52 | </CompilerOptions> 53 | <Debugging> 54 | <Exceptions Count="3"> 55 | <Item1> 56 | <Name Value="EAbort"/> 57 | </Item1> 58 | <Item2> 59 | <Name Value="ECodetoolError"/> 60 | </Item2> 61 | <Item3> 62 | <Name Value="EFOpenError"/> 63 | </Item3> 64 | </Exceptions> 65 | </Debugging> 66 | </CONFIG> 67 | -------------------------------------------------------------------------------- /samples/fpc/QuickHttpServer/HttpServerService.pas: -------------------------------------------------------------------------------- 1 | program HttpServerService; 2 | 3 | uses 4 | SysUtils, 5 | Quick.Commons, 6 | Quick.Logger.Intf, 7 | Quick.Console, 8 | Quick.AppService, 9 | Quick.HttpServer, 10 | Quick.HttpServer.Request, 11 | Quick.HttpServer.Response, 12 | HttpServerService.Logger; 13 | 14 | type 15 | TMyHttpServer = class(THttpServer) 16 | public 17 | procedure ProcessRequest(aRequest: IHttpRequest; aResponse: IHttpResponse); override; 18 | end; 19 | 20 | procedure TMyHttpServer.ProcessRequest(aRequest: IHttpRequest; aResponse: IHttpResponse); 21 | begin 22 | aResponse.ContentText := 'Hello world!'; 23 | end; 24 | 25 | var 26 | HttpServer : TMyHttpServer; 27 | Port : Integer; 28 | Logger : TQuickLogger; 29 | 30 | begin 31 | try 32 | {$IFNDEF FPC} 33 | ReportMemoryLeaksOnShutdown := True; 34 | {$ENDIF} 35 | //run as console 36 | Logger := TQuickLogger.Create; 37 | Logger.Init; 38 | if not AppService.IsRunningAsService then 39 | begin 40 | //create server 41 | cout('Init server...',etInfo); 42 | if ParamCount > 0 then 43 | begin 44 | Integer.TryParse(ParamStr(1),Port) 45 | end; 46 | //start server 47 | if Port = 0 then Port := 8080; 48 | HttpServer := TMyHttpServer.Create('127.0.0.1',Port,False,Logger); 49 | try 50 | HttpServer.Start; 51 | //Wait for Exit 52 | cout(' ',ccWhite); 53 | cout('Press [Enter] to quit',ccYellow); 54 | ConsoleWaitForEnterKey; 55 | finally 56 | HttpServer.Free; 57 | end; 58 | end 59 | else //run as a service 60 | begin 61 | AppService.DisplayName := 'Remote Server'; 62 | AppService.ServiceName := 'RemoteServerSvc'; 63 | AppService.CanInstallWithOtherName := True; 64 | HttpServer := TMyHttpServer.Create('127.0.0.1',Port,False,Logger); 65 | AppService.OnStop := @HttpServer.Free; 66 | AppService.OnExecute := @HttpServer.Start; 67 | AppService.CheckParams; 68 | end; 69 | except 70 | on E: Exception do 71 | Writeln(E.ClassName, ': ', E.Message); 72 | end; 73 | end. 74 | -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest1/JsonSerializerTest1.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="JsonSerializerTest1"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="JsonSerializerTest1.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="JsonSerializerTest1"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\Quicklib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/JsonSerializer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickJsonSerializer/JsonSerializerTest2/JsonSerializer.ico -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/JsonSerializer.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <SessionStorage Value="InProjectDir"/> 8 | <MainUnit Value="0"/> 9 | <Title Value="JsonSerializer"/> 10 | <Scaled Value="True"/> 11 | <ResourceType Value="res"/> 12 | <UseXPManifest Value="True"/> 13 | <XPManifest> 14 | <DpiAware Value="True"/> 15 | </XPManifest> 16 | <Icon Value="0"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <RequiredPackages Count="1"> 29 | <Item1> 30 | <PackageName Value="LCL"/> 31 | </Item1> 32 | </RequiredPackages> 33 | <Units Count="2"> 34 | <Unit0> 35 | <Filename Value="JsonSerializer.lpr"/> 36 | <IsPartOfProject Value="True"/> 37 | </Unit0> 38 | <Unit1> 39 | <Filename Value="main.pas"/> 40 | <IsPartOfProject Value="True"/> 41 | <ComponentName Value="Form1"/> 42 | <HasResources Value="True"/> 43 | <ResourceBaseClass Value="Form"/> 44 | </Unit1> 45 | </Units> 46 | </ProjectOptions> 47 | <CompilerOptions> 48 | <Version Value="11"/> 49 | <PathDelim Value="\"/> 50 | <Target> 51 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\JsonSerializer"/> 52 | </Target> 53 | <SearchPaths> 54 | <IncludeFiles Value="$(ProjOutDir)"/> 55 | <Libraries Value="..\..\.."/> 56 | <OtherUnitFiles Value="..\..\..\..\..\Quicklib"/> 57 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 58 | </SearchPaths> 59 | <Linking> 60 | <Options> 61 | <Win32> 62 | <GraphicApplication Value="True"/> 63 | </Win32> 64 | </Options> 65 | </Linking> 66 | </CompilerOptions> 67 | <Debugging> 68 | <Exceptions Count="3"> 69 | <Item1> 70 | <Name Value="EAbort"/> 71 | </Item1> 72 | <Item2> 73 | <Name Value="ECodetoolError"/> 74 | </Item2> 75 | <Item3> 76 | <Name Value="EFOpenError"/> 77 | </Item3> 78 | </Exceptions> 79 | </Debugging> 80 | </CONFIG> 81 | -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/JsonSerializer.lpr: -------------------------------------------------------------------------------- 1 | program JsonSerializer; 2 | 3 | {$mode objfpc}{$H+} 4 | 5 | uses 6 | {$IFDEF UNIX}{$IFDEF UseCThreads} 7 | cthreads, 8 | {$ENDIF}{$ENDIF} 9 | Interfaces, // this includes the LCL widgetset 10 | Forms, main 11 | { you can add units after this }; 12 | 13 | {$R *.res} 14 | 15 | begin 16 | RequireDerivedFormResource:=True; 17 | Application.Scaled:=True; 18 | Application.Initialize; 19 | Application.CreateForm(TForm1, Form1); 20 | Application.Run; 21 | end. 22 | 23 | -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/JsonSerializer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickJsonSerializer/JsonSerializerTest2/JsonSerializer.res -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/lib/i386-win32/JsonSerializer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickJsonSerializer/JsonSerializerTest2/lib/i386-win32/JsonSerializer.res -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/lib/i386-win32/main.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 343 3 | Height = 621 4 | Top = 226 5 | Width = 1025 6 | Caption = 'Form1' 7 | ClientHeight = 621 8 | ClientWidth = 1025 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object Memo1: TMemo 13 | Left = 8 14 | Height = 540 15 | Top = 8 16 | Width = 1008 17 | Lines.Strings = ( 18 | 'Memo1' 19 | ) 20 | TabOrder = 0 21 | end 22 | object btnFromJson: TButton 23 | Left = 920 24 | Height = 25 25 | Top = 582 26 | Width = 94 27 | Caption = 'FromJson' 28 | OnClick = btnFromJsonClick 29 | TabOrder = 1 30 | end 31 | object btnToJson: TButton 32 | Left = 808 33 | Height = 25 34 | Top = 582 35 | Width = 99 36 | Caption = 'ToJson' 37 | OnClick = btnToJsonClick 38 | TabOrder = 2 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/lib/x86_64-linux/JsonSerializer.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickJsonSerializer/JsonSerializerTest2/lib/x86_64-linux/JsonSerializer.res -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/lib/x86_64-linux/main.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 343 3 | Height = 621 4 | Top = 226 5 | Width = 1025 6 | Caption = 'Form1' 7 | ClientHeight = 621 8 | ClientWidth = 1025 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object Memo1: TMemo 13 | Left = 8 14 | Height = 540 15 | Top = 8 16 | Width = 1008 17 | Lines.Strings = ( 18 | 'Memo1' 19 | ) 20 | TabOrder = 0 21 | end 22 | object btnFromJson: TButton 23 | Left = 920 24 | Height = 25 25 | Top = 582 26 | Width = 94 27 | Caption = 'FromJson' 28 | OnClick = btnFromJsonClick 29 | TabOrder = 1 30 | end 31 | object btnToJson: TButton 32 | Left = 808 33 | Height = 25 34 | Top = 582 35 | Width = 99 36 | Caption = 'ToJson' 37 | OnClick = btnToJsonClick 38 | TabOrder = 2 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /samples/fpc/QuickJsonSerializer/JsonSerializerTest2/main.lfm: -------------------------------------------------------------------------------- 1 | object Form1: TForm1 2 | Left = 343 3 | Height = 621 4 | Top = 226 5 | Width = 1025 6 | Caption = 'Form1' 7 | ClientHeight = 621 8 | ClientWidth = 1025 9 | OnClose = FormClose 10 | OnCreate = FormCreate 11 | LCLVersion = '1.9.0.0' 12 | object Memo1: TMemo 13 | Left = 8 14 | Height = 540 15 | Top = 8 16 | Width = 1008 17 | Lines.Strings = ( 18 | 'Memo1' 19 | ) 20 | TabOrder = 0 21 | end 22 | object btnFromJson: TButton 23 | Left = 920 24 | Height = 25 25 | Top = 582 26 | Width = 94 27 | Caption = 'FromJson' 28 | OnClick = btnFromJsonClick 29 | TabOrder = 1 30 | end 31 | object btnToJson: TButton 32 | Left = 808 33 | Height = 25 34 | Top = 582 35 | Width = 99 36 | Caption = 'ToJson' 37 | OnClick = btnToJsonClick 38 | TabOrder = 2 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /samples/fpc/QuickLinq/LinqQuerySample.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="LinqQuerySample"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="LinqQuerySample.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="LinqQuerySample"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\QuickLibs\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickNetwork/GetIPRanges/GetIPRanges.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasScaledStatement Value="False"/> 10 | </Flags> 11 | <SessionStorage Value="InProjectDir"/> 12 | <MainUnit Value="0"/> 13 | <Title Value="Network Demo"/> 14 | <UseAppBundle Value="False"/> 15 | <ResourceType Value="res"/> 16 | </General> 17 | <BuildModes Count="1"> 18 | <Item1 Name="Default" Default="True"/> 19 | </BuildModes> 20 | <PublishOptions> 21 | <Version Value="2"/> 22 | </PublishOptions> 23 | <RunParams> 24 | <FormatVersion Value="2"/> 25 | <Modes Count="0"/> 26 | </RunParams> 27 | <Units Count="1"> 28 | <Unit0> 29 | <Filename Value="GetIPRanges.pas"/> 30 | <IsPartOfProject Value="True"/> 31 | </Unit0> 32 | </Units> 33 | </ProjectOptions> 34 | <CompilerOptions> 35 | <Version Value="11"/> 36 | <PathDelim Value="\"/> 37 | <Target> 38 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\GetIPRanges"/> 39 | </Target> 40 | <SearchPaths> 41 | <IncludeFiles Value="$(ProjOutDir)"/> 42 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 43 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 44 | </SearchPaths> 45 | </CompilerOptions> 46 | <Debugging> 47 | <Exceptions Count="3"> 48 | <Item1> 49 | <Name Value="EAbort"/> 50 | </Item1> 51 | <Item2> 52 | <Name Value="ECodetoolError"/> 53 | </Item2> 54 | <Item3> 55 | <Name Value="EFOpenError"/> 56 | </Item3> 57 | </Exceptions> 58 | </Debugging> 59 | </CONFIG> 60 | -------------------------------------------------------------------------------- /samples/fpc/QuickNetwork/GetIPRanges/GetIPRanges.pas: -------------------------------------------------------------------------------- 1 | program GetIPRanges; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | SysUtils, 9 | Quick.Commons, 10 | Quick.Network, 11 | Quick.Console; 12 | 13 | var 14 | Ip, 15 | Mask : string; 16 | LowIP, 17 | HighIp : string; 18 | 19 | begin 20 | try 21 | Console.LogVerbose := LOG_DEBUG; 22 | ip := '192.168.1.15'; 23 | mask := '255.255.255.0'; 24 | GetIpRange(Ip,Mask,LowIP,HighIp); 25 | coutFmt('IP: %s Mask: %s / Range: %s to %s',[Ip,Mask,LowIP,HighIp],etInfo); 26 | ConsoleWaitForEnterKey; 27 | except 28 | on E: Exception do 29 | Writeln(E.ClassName, ': ', E.Message); 30 | end; 31 | end. 32 | -------------------------------------------------------------------------------- /samples/fpc/QuickNetwork/GetIPRanges/GetIPRanges.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickNetwork/GetIPRanges/GetIPRanges.res -------------------------------------------------------------------------------- /samples/fpc/QuickNetwork/GetIPRanges/lib/i386-win32/GetIPRanges.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickNetwork/GetIPRanges/lib/i386-win32/GetIPRanges.res -------------------------------------------------------------------------------- /samples/fpc/QuickService/ServiceManagement/ServiceManagement.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="ServiceManagement"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="ServiceManagement.pas"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\ServiceManagement"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickService/ServiceManagement/ServiceManagement.pas: -------------------------------------------------------------------------------- 1 | program ServiceManagement; 2 | 3 | {$APPTYPE CONSOLE} 4 | 5 | {$R *.res} 6 | 7 | uses 8 | SysUtils, 9 | Quick.Commons, 10 | Quick.Console, 11 | Quick.Service; 12 | 13 | var 14 | svcname : string; 15 | 16 | begin 17 | try 18 | svcname := 'aspnet_state'; 19 | cout('Need to run as admin',etWarning); 20 | if ServiceIsPresent('localhost',svcname) then cout('"%s" service is installed"',[svcname],etSuccess) 21 | else cout('"%s" service is not installed!"',[svcname],etWarning); 22 | if GetServiceState('localhost',svcname) = TServiceState.ssStopped then 23 | begin 24 | cout('"%s" service is stopped"',[svcname],etWarning); 25 | cout('Trying to start "%s" service..."',[svcname],etInfo); 26 | ServiceStart('localhost','aspnet_state'); 27 | Sleep(3000); 28 | if GetServiceState('localhost','aspnet_state') = TServiceState.ssRunning then cout('%s service is now started!',[svcname],etSuccess); 29 | end 30 | else 31 | begin 32 | cout('"%s" service is started"',[svcname],etSuccess); 33 | cout('Trying to stop "%s" service..."',[svcname],etInfo); 34 | ServiceStop('localhost','aspnet_state'); 35 | Sleep(3000); 36 | if GetServiceState('localhost','aspnet_state') = TServiceState.ssStopped then cout('%s service is now stopped!',[svcname],etWarning); 37 | end; 38 | cout('Press [ENTER] to exit',etInfo); 39 | ConsoleWaitForEnterKey; 40 | except 41 | on E: Exception do 42 | Writeln(E.ClassName, ': ', E.Message); 43 | end; 44 | end. 45 | -------------------------------------------------------------------------------- /samples/fpc/QuickService/ServiceManagement/ServiceManagement.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickService/ServiceManagement/ServiceManagement.res -------------------------------------------------------------------------------- /samples/fpc/QuickService/ServiceManagement/lib/i386-win32/ServiceManagement.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exilon/QuickLib/3fb5b8448f775629692ac1b58feb9c1f907fb817/samples/fpc/QuickService/ServiceManagement/lib/i386-win32/ServiceManagement.res -------------------------------------------------------------------------------- /samples/fpc/QuickThreads/AnonymousThreads/AnonymousThreads.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="AnonymousThreads"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="AnonymousThreads.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\AnonymousThreads"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickThreads/AnonymousThreads/AnonymousThreads.lpr: -------------------------------------------------------------------------------- 1 | program AnonymousThreads; 2 | 3 | {$MODE DELPHI} 4 | 5 | {$IFDEF MSWINDOWS} 6 | {$APPTYPE CONSOLE} 7 | {$ENDIF} 8 | 9 | uses 10 | {$IFDEF UNIX} 11 | cthreads, 12 | {$ENDIF} 13 | Classes, 14 | Quick.Commons, 15 | Quick.Console, 16 | SysUtils, 17 | Quick.Threads; 18 | 19 | type 20 | TMyProcs = class 21 | class procedure DoWork; 22 | class procedure DoTerminate; 23 | end; 24 | 25 | class procedure TMyProcs.DoWork; 26 | var 27 | i : Integer; 28 | begin 29 | for i := 0 to 10 do cout('Working %d',[i],etTrace); 30 | cout('executed thread',etSuccess); 31 | end; 32 | 33 | class procedure TMyProcs.DoTerminate; 34 | begin 35 | cout('terminated thread',etSuccess); 36 | cout('PRESS <ENTER> TO EXIT',TLogEventType.etInfo); 37 | end; 38 | 39 | begin 40 | try 41 | console.LogVerbose := LOG_DEBUG; 42 | TAnonymousThread.Execute(TMyProcs.DoWork) 43 | .OnTerminate(TMyProcs.DoTerminate).Start; 44 | 45 | cout('Press <Enter> to exit',TLogEventType.etWarning); 46 | ConsoleWaitForEnterKey; 47 | except 48 | on E: Exception do 49 | Writeln(E.ClassName, ': ', E.Message); 50 | end; 51 | end. 52 | -------------------------------------------------------------------------------- /samples/fpc/QuickThreads/BackgroundTasks/RunBackgroundTasks.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="RunBackgroundTasks"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="RunBackgroundTasks.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\RunBackgroundTasks"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | </CompilerOptions> 47 | <Debugging> 48 | <Exceptions Count="3"> 49 | <Item1> 50 | <Name Value="EAbort"/> 51 | </Item1> 52 | <Item2> 53 | <Name Value="ECodetoolError"/> 54 | </Item2> 55 | <Item3> 56 | <Name Value="EFOpenError"/> 57 | </Item3> 58 | </Exceptions> 59 | </Debugging> 60 | </CONFIG> 61 | -------------------------------------------------------------------------------- /samples/fpc/QuickThreads/ScheduledTasks/RunScheduledTasks.lpi: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8"?> 2 | <CONFIG> 3 | <ProjectOptions> 4 | <Version Value="11"/> 5 | <PathDelim Value="\"/> 6 | <General> 7 | <Flags> 8 | <MainUnitHasCreateFormStatements Value="False"/> 9 | <MainUnitHasTitleStatement Value="False"/> 10 | <MainUnitHasScaledStatement Value="False"/> 11 | </Flags> 12 | <SessionStorage Value="InProjectDir"/> 13 | <MainUnit Value="0"/> 14 | <Title Value="RunScheduledTasks"/> 15 | <UseAppBundle Value="False"/> 16 | <ResourceType Value="res"/> 17 | </General> 18 | <BuildModes Count="1"> 19 | <Item1 Name="Default" Default="True"/> 20 | </BuildModes> 21 | <PublishOptions> 22 | <Version Value="2"/> 23 | </PublishOptions> 24 | <RunParams> 25 | <FormatVersion Value="2"/> 26 | <Modes Count="0"/> 27 | </RunParams> 28 | <Units Count="1"> 29 | <Unit0> 30 | <Filename Value="RunScheduledTasks.lpr"/> 31 | <IsPartOfProject Value="True"/> 32 | </Unit0> 33 | </Units> 34 | </ProjectOptions> 35 | <CompilerOptions> 36 | <Version Value="11"/> 37 | <PathDelim Value="\"/> 38 | <Target> 39 | <Filename Value="bin\$(TargetCPU)-$(TargetOS)\RunScheduledTasks"/> 40 | </Target> 41 | <SearchPaths> 42 | <IncludeFiles Value="$(ProjOutDir)"/> 43 | <OtherUnitFiles Value="..\..\..\..\..\QuickLib"/> 44 | <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 45 | </SearchPaths> 46 | <CodeGeneration> 47 | <TargetCPU Value="x86_64"/> 48 | <TargetOS Value="linux"/> 49 | </CodeGeneration> 50 | </CompilerOptions> 51 | <Debugging> 52 | <Exceptions Count="3"> 53 | <Item1> 54 | <Name Value="EAbort"/> 55 | </Item1> 56 | <Item2> 57 | <Name Value="ECodetoolError"/> 58 | </Item2> 59 | <Item3> 60 | <Name Value="EFOpenError"/> 61 | </Item3> 62 | </Exceptions> 63 | </Debugging> 64 | </CONFIG> 65 | --------------------------------------------------------------------------------