* Replaced fphttpclient with indy10.
* Added compression support
This commit is contained in:
193
indy/Design/DsnIndy.bdsproj
Normal file
193
indy/Design/DsnIndy.bdsproj
Normal file
@@ -0,0 +1,193 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">DelphiDotNet.Personality</Option>
|
||||
<Option Name="ProjectType">Library</Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{0D051047-BDC1-490B-AC98-7478F665E87C}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<DelphiDotNet.Personality>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<FileList>
|
||||
<File FileName="" ContainerId="" ModuleName="SysUtils"/>
|
||||
<File FileName="" ContainerId="" ModuleName="Classes"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.Reflection"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.Runtime.InteropServices"/>
|
||||
</FileList>
|
||||
<Source>
|
||||
<Source Name="MainSource">DsnIndy.dpr</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">0</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">0</Compiler>
|
||||
<Compiler Name="R">0</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">True</Compiler>
|
||||
<Compiler Name="UnsafeCode">True</Compiler>
|
||||
<Compiler Name="UnsafeCast">True</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">True</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">4096</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription"></Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir"></Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath"></Directories>
|
||||
<Directories Name="Packages"></Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
</Parameters>
|
||||
<Language>
|
||||
<Language Name="ActiveLang"></Language>
|
||||
<Language Name="ProjectLang">$00000000</Language>
|
||||
<Language Name="RootDir"></Language>
|
||||
</Language>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</DelphiDotNet.Personality>
|
||||
</BorlandProject>
|
||||
77
indy/Design/DsnIndy.dpr
Normal file
77
indy/Design/DsnIndy.dpr
Normal file
@@ -0,0 +1,77 @@
|
||||
library DsnIndy;
|
||||
|
||||
|
||||
|
||||
|
||||
uses
|
||||
SysUtils,
|
||||
Classes,
|
||||
System.Reflection,
|
||||
System.Runtime.InteropServices;
|
||||
|
||||
[assembly: AssemblyTitle('')]
|
||||
[assembly: AssemblyDescription('')]
|
||||
[assembly: AssemblyConfiguration('')]
|
||||
[assembly: AssemblyCompany('')]
|
||||
[assembly: AssemblyProduct('')]
|
||||
[assembly: AssemblyCopyright('')]
|
||||
[assembly: AssemblyTrademark('')]
|
||||
[assembly: AssemblyCulture('')]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion('1.0.*')]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output
|
||||
// directory is the project directory (the default).
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile('')]
|
||||
[assembly: AssemblyKeyName('')]
|
||||
|
||||
//
|
||||
// Use the attributes below to control the COM visibility of your assembly. By
|
||||
// default the entire assembly is visible to COM. Setting ComVisible to false
|
||||
// is the recommended default for your assembly. To then expose a class and interface
|
||||
// to COM set ComVisible to true on each one. It is also recommended to add a
|
||||
// Guid attribute.
|
||||
//
|
||||
|
||||
[assembly: ComVisible(False)]
|
||||
//[assembly: Guid('')]
|
||||
//[assembly: TypeLibVersion(1, 0)]
|
||||
|
||||
|
||||
begin
|
||||
end.
|
||||
206
indy/Design/DsnIndy90.bdsproj
Normal file
206
indy/Design/DsnIndy90.bdsproj
Normal file
@@ -0,0 +1,206 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">DelphiDotNet.Personality</Option>
|
||||
<Option Name="ProjectType">Library</Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{0D051047-BDC1-490B-AC98-7478F665E87C}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<DelphiDotNet.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">DsnIndy90.dpr</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">0</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">0</Compiler>
|
||||
<Compiler Name="R">0</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">True</Compiler>
|
||||
<Compiler Name="UnsafeCode">True</Compiler>
|
||||
<Compiler Name="UnsafeCast">True</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">True</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">4096</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription"></Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir">W:\source\Indy10\Lib\System</Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath">c:\windows\microsoft.net\framework\v1.1.4322;w:\source\indy10\lib\system</Directories>
|
||||
<Directories Name="Packages">IndySystem90Net;c:\windows\microsoft.net\framework\v1.1.4322\System.Design.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Data.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.Design.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.dll</Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">True</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
</Parameters>
|
||||
<Language>
|
||||
<Language Name="ActiveLang"></Language>
|
||||
<Language Name="ProjectLang">$00000000</Language>
|
||||
<Language Name="RootDir"></Language>
|
||||
</Language>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<FileList>
|
||||
<File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System" AssemblyName="System" Version="1.0.5000.0" LinkUnits="False"/>
|
||||
<File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/>
|
||||
<File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.Design.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing.Design" AssemblyName="System.Drawing.Design" Version="1.0.5000.0" LinkUnits="False"/>
|
||||
<File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Windows.Forms" AssemblyName="System.Windows.Forms" Version="1.0.5000.0" LinkUnits="False"/>
|
||||
<File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Data" AssemblyName="System.Data" Version="1.0.5000.0" LinkUnits="False"/>
|
||||
<File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Design.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Design" AssemblyName="System.Design" Version="1.0.5000.0" LinkUnits="False"/>
|
||||
<File FileName="..\system\IndySystem90Net.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="IndySystem90Net" AssemblyName="IndySystem90Net" Version="10.0.81.33250" LinkUnits="False"/>
|
||||
<File FileName="IdDsnPropEdBindingNET.resx" ContainerId="ResXCompiler" ModuleName="IdDsnPropEdBindingNET" Parent="IdDsnPropEdBindingNET.pas"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.Data"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.ComponentModel"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.ComponentModel.Design"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.Reflection"/>
|
||||
<File FileName="" ContainerId="" ModuleName="System.Runtime.InteropServices"/>
|
||||
<File FileName="IdDsnNETCompEditor.pas" ContainerId="" ModuleName="IdDsnNETCompEditor"/>
|
||||
<File FileName="IdDsnCoreResourceStrings.pas" ContainerId="" ModuleName="IdDsnCoreResourceStrings"/>
|
||||
<File FileName="IdDsnPropEdBindingNET.pas" ContainerId="" ModuleName="IdDsnPropEdBindingNET"/>
|
||||
</FileList>
|
||||
</DelphiDotNet.Personality>
|
||||
</BorlandProject>
|
||||
88
indy/Design/DsnIndy90.dpr
Normal file
88
indy/Design/DsnIndy90.dpr
Normal file
@@ -0,0 +1,88 @@
|
||||
library DsnIndy90;
|
||||
|
||||
|
||||
{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll'}
|
||||
{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll'}
|
||||
{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.Design.dll'}
|
||||
{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll'}
|
||||
{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll'}
|
||||
{%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Design.dll'}
|
||||
{%DelphiDotNetAssemblyCompiler '..\system\IndySystem90Net.dll'}
|
||||
{$R 'IdDsnPropEdBindingNET.TIdDsnPropEdBindingNET.resources' 'IdDsnPropEdBindingNET.resx'}
|
||||
|
||||
uses
|
||||
System.Data,
|
||||
System.ComponentModel,
|
||||
System.ComponentModel.Design,
|
||||
System.Reflection,
|
||||
System.Runtime.InteropServices,
|
||||
IdDsnNETCompEditor in 'IdDsnNETCompEditor.pas',
|
||||
IdDsnCoreResourceStrings in 'IdDsnCoreResourceStrings.pas',
|
||||
IdDsnPropEdBindingNET in 'IdDsnPropEdBindingNET.pas' {IdDsnPropEdBindingNET.TIdDsnPropEdBindingNET: System.Windows.Forms.Form};
|
||||
|
||||
[assembly: AssemblyTitle('')]
|
||||
[assembly: AssemblyDescription('')]
|
||||
[assembly: AssemblyConfiguration('')]
|
||||
[assembly: AssemblyCompany('')]
|
||||
[assembly: AssemblyProduct('')]
|
||||
[assembly: AssemblyCopyright('')]
|
||||
[assembly: AssemblyTrademark('')]
|
||||
[assembly: AssemblyCulture('')]
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly: AssemblyVersion('1.0.*')]
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project output directory. For example, if your KeyFile is
|
||||
// located in the project directory, you would specify the AssemblyKeyFile
|
||||
// attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output
|
||||
// directory is the project directory (the default).
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly: AssemblyDelaySignAttribute(false)]
|
||||
[assembly: AssemblyKeyFileAttribute('')]
|
||||
[assembly: AssemblyKeyName('')]
|
||||
|
||||
//
|
||||
// Use the attributes below to control the COM visibility of your assembly. By
|
||||
// default the entire assembly is visible to COM. Setting ComVisible to false
|
||||
// is the recommended default for your assembly. To then expose a class and interface
|
||||
// to COM set ComVisible to true on each one. It is also recommended to add a
|
||||
// Guid attribute.
|
||||
//
|
||||
|
||||
[assembly: ComVisible(False)]
|
||||
//[assembly: Guid('')]
|
||||
//[assembly: TypeLibVersion(1, 0)]
|
||||
|
||||
|
||||
begin
|
||||
end.
|
||||
129
indy/Design/IdDsnCoreResourceStrings.pas
Normal file
129
indy/Design/IdDsnCoreResourceStrings.pas
Normal file
@@ -0,0 +1,129 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
{ Rev 1.5 1/29/2004 8:54:30 AM JPMugaas
|
||||
{ Removed myself from the distribution Team Chairperson entry as I am resigning
|
||||
{ from that role.
|
||||
}
|
||||
{
|
||||
Rev 1.4 10/15/2003 10:11:46 PM DSiders
|
||||
Added resource string for About box credits.
|
||||
Corrected spelling error in comments.
|
||||
}
|
||||
{
|
||||
{ Rev 1.3 6/16/2003 12:01:44 PM JPMugaas
|
||||
{ Updated copyright to say 2003.
|
||||
}
|
||||
{
|
||||
{ Rev 1.2 6/8/2003 05:46:58 AM JPMugaas
|
||||
{ The kitchen sink has now been implemented.
|
||||
}
|
||||
{
|
||||
{ Rev 1.1 1/15/2003 08:03:56 AM JPMugaas
|
||||
{ Updated with new website address.
|
||||
}
|
||||
{
|
||||
{ Rev 1.0 11/13/2002 08:43:24 AM JPMugaas
|
||||
}
|
||||
unit IdDsnCoreResourceStrings;
|
||||
{
|
||||
Note: This unit is for resource strings that are used in the Core Design-Time package
|
||||
and NOT any design-time packages. This is to prevent design-time resource strings
|
||||
from being linked into the Run-Time only package.
|
||||
}
|
||||
interface
|
||||
|
||||
const
|
||||
IndyPitCrew = 'Kudzu (Chad Z. Hower)'#13#10
|
||||
+ 'and the'#13#10
|
||||
+ 'Indy Pit Crew';
|
||||
|
||||
resourcestring
|
||||
{ About Box stuff }
|
||||
RSAAboutFormCaption = 'About';
|
||||
RSAAboutBoxCompName = 'Internet Direct (Indy)';
|
||||
RSAAboutMenuItemName = 'About Internet &Direct (Indy) %s...';
|
||||
|
||||
RSAAboutBoxVersion = 'Version %s';
|
||||
RSAAboutBoxCopyright = 'Copyright (c) 1993 - 2005'#13#10
|
||||
+ IndyPitCrew;
|
||||
|
||||
RSAAboutBoxPleaseVisit = 'For the latest updates and information please visit:';
|
||||
RSAAboutBoxIndyWebsite = 'http://www.indyproject.org/'; {Do not Localize}
|
||||
|
||||
RSAAboutCreditsCoordinator = 'Project Coordinator';
|
||||
RSAAboutCreditsCoCordinator = 'Project Co-Coordinator';
|
||||
RSAAboutCreditsDocumentation = 'Documentation Coordinator';
|
||||
RSAAboutCreditsDemos = 'Demos Coordinator';
|
||||
RSAAboutCreditsRetiredPast = 'Retired/Past Contributors';
|
||||
RSAAboutCreditsIndyCrew = 'The Indy Pit Crew';
|
||||
|
||||
RSAAboutKitchenSink = IndyPitCrew+#10#13+'present the'#10#13'Kitchen Sink';
|
||||
|
||||
{Binding Editor stuff}
|
||||
{
|
||||
Note to translators - Please Read!!!
|
||||
|
||||
For all the constants except RSBindingFormCaption, there may be an
|
||||
& symbol before a letter or number. This is rendered as that character being
|
||||
underlined. In addition, the character after the & symbol along with the ALT
|
||||
key enables a user to move to that control. Since these are on one form, be
|
||||
careful to ensure that the same letter or number does not have a & before it
|
||||
in more than one string, otherwise an ALT key sequence will be broken.
|
||||
}
|
||||
RSBindingFormCaption = 'Binding Editor';
|
||||
RSBindingNewCaption = '&New';
|
||||
RSBindingDeleteCaption = '&Delete';
|
||||
//RSBindingAddCaption = '&Add';
|
||||
RSBindingRemoveCaption = '&Remove';
|
||||
RSBindingLabelBindings = '&Bindings';
|
||||
RSBindingHostnameLabel = '&IP Address';
|
||||
RSBindingPortLabel = '&Port';
|
||||
RSBindingIPVerLabel = 'IP &Version';
|
||||
RSBindingIPV4Item = 'IPv&4 (127.0.0.1)';
|
||||
RSBindingIPV6Item = 'IPv&6 (::1)';
|
||||
{Design time SASLList Hints}
|
||||
RSADlgSLMoveUp = 'Move Up';
|
||||
RSADlgSLMoveDown = 'Move Down';
|
||||
RSADlgSLAdd = 'Add';
|
||||
RSADlgSLRemove = 'Remove';
|
||||
//Caption that uses format with component name
|
||||
RSADlgSLCaption = 'Editing SASL List for %s';
|
||||
RSADlgSLAvailable = '&Available';
|
||||
RSADlgSLAssigned = 'A&ssigned (tried in order listed)';
|
||||
{Note that the Ampersand indicates an ALT keyboard sequence}
|
||||
RSADlgSLEditList = 'Edit &List';
|
||||
//Display item constants
|
||||
RSBindingAll = 'All'; //all IP addresses
|
||||
RSBindingAny = 'Any'; //any port
|
||||
|
||||
{Standard dialog stock strings}
|
||||
RSOk = 'OK';
|
||||
RSCancel = 'Cancel';
|
||||
RSHelp = '&Help';
|
||||
|
||||
// IdRegister
|
||||
RSRegIndyClients = 'Indy Clients';
|
||||
RSRegIndyServers = 'Indy Servers';
|
||||
RSRegIndyIntercepts = 'Indy Intercepts';
|
||||
RSRegIndyIOHandlers = 'Indy I/O Handlers';
|
||||
RSRegIndyMisc = 'Indy Misc';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
46
indy/Design/IdDsnNETCompEditor.pas
Normal file
46
indy/Design/IdDsnNETCompEditor.pas
Normal file
@@ -0,0 +1,46 @@
|
||||
unit IdDsnNETCompEditor;
|
||||
|
||||
interface
|
||||
uses
|
||||
System.ComponentModel,
|
||||
System.ComponentModel.Design;
|
||||
|
||||
type
|
||||
TIdNetComponentEditor = class(System.ComponentModel.Design.ComponentDesigner)
|
||||
protected
|
||||
procedure OnVerItemSelected(sender : System.Object; args : System.EventArgs);
|
||||
|
||||
public
|
||||
function get_Verbs : DesignerVerbCollection; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses
|
||||
IdAbout,
|
||||
IdGlobal,
|
||||
IdDsnCoreResourceStrings,
|
||||
IdSys;
|
||||
|
||||
{ TIdNetComponentEditor }
|
||||
|
||||
function TIdNetComponentEditor.get_Verbs: DesignerVerbCollection;
|
||||
var LV : DesignerVerb;
|
||||
begin
|
||||
Result := inherited get_Verbs;
|
||||
if not Assigned(Result) then
|
||||
begin
|
||||
Result := DesignerVerbCollection.Create;
|
||||
end;
|
||||
LV := DesignerVerb.Create(Sys.Format(RSAAboutMenuItemName, [gsIdVersion]),OnVerItemSelected);
|
||||
LV.Enabled := True;
|
||||
LV.Visible := True;
|
||||
Result.Add(LV);
|
||||
end;
|
||||
|
||||
procedure TIdNetComponentEditor.OnVerItemSelected(sender: TObject;
|
||||
args: System.EventArgs);
|
||||
begin
|
||||
ShowAboutBox(RSAAboutBoxCompName, gsIdVersion)
|
||||
end;
|
||||
|
||||
end.
|
||||
Binary file not shown.
679
indy/Design/IdDsnPropEdBindingNET.pas
Normal file
679
indy/Design/IdDsnPropEdBindingNET.pas
Normal file
@@ -0,0 +1,679 @@
|
||||
unit IdDsnPropEdBindingNET;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.Drawing, System.Collections, System.ComponentModel,
|
||||
System.Windows.Forms, System.Data, IdObjs, IdSocketHandle;
|
||||
|
||||
type
|
||||
TIdDsnPropEdBindingNET = class(System.Windows.Forms.Form)
|
||||
{$REGION 'Designer Managed Code'}
|
||||
strict private
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
Components: System.ComponentModel.Container;
|
||||
btnOk: System.Windows.Forms.Button;
|
||||
btnCancel: System.Windows.Forms.Button;
|
||||
lblBindings: System.Windows.Forms.Label;
|
||||
lbBindings: System.Windows.Forms.ListBox;
|
||||
btnNew: System.Windows.Forms.Button;
|
||||
btnDelete: System.Windows.Forms.Button;
|
||||
lblIPAddress: System.Windows.Forms.Label;
|
||||
edtIPAddress: System.Windows.Forms.ComboBox;
|
||||
lblPort: System.Windows.Forms.Label;
|
||||
edtPort: System.Windows.Forms.NumericUpDown;
|
||||
cboIPVersion: System.Windows.Forms.ComboBox;
|
||||
lblIPVersion: System.Windows.Forms.Label;
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
procedure InitializeComponent;
|
||||
procedure btnNew_Click(sender: System.Object; e: System.EventArgs);
|
||||
procedure btnDelete_Click(sender: System.Object; e: System.EventArgs);
|
||||
procedure edtPort_ValueChanged(sender: System.Object; e: System.EventArgs);
|
||||
procedure edtIPAddress_SelectedValueChanged(sender: System.Object; e: System.EventArgs);
|
||||
procedure cboIPVersion_SelectedValueChanged(sender: System.Object; e: System.EventArgs);
|
||||
procedure lbBindings_SelectedValueChanged(sender: System.Object; e: System.EventArgs);
|
||||
{$ENDREGION}
|
||||
strict protected
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
procedure Dispose(Disposing: Boolean); override;
|
||||
private
|
||||
FHandles : TIdSocketHandles;
|
||||
FDefaultPort : Integer;
|
||||
FIPv4Addresses : TIdStrings;
|
||||
FIPv6Addresses : TIdStrings;
|
||||
FCurrentHandle : TIdSocketHandle;
|
||||
|
||||
{ Private Declarations }
|
||||
procedure SetHandles(const Value: TIdSocketHandles);
|
||||
procedure SetIPv4Addresses(const Value: TIdStrings);
|
||||
procedure SetIPv6Addresses(const Value: TIdStrings);
|
||||
procedure UpdateBindingList;
|
||||
procedure UpdateEditControls;
|
||||
procedure FillComboBox(ACombo : System.Windows.Forms.ComboBox; AStrings :TIdStrings);
|
||||
public
|
||||
constructor Create;
|
||||
function Execute : Boolean;
|
||||
function GetList: string;
|
||||
procedure SetList(const AList: string);
|
||||
property Handles : TIdSocketHandles read FHandles write SetHandles;
|
||||
property DefaultPort : Integer read FDefaultPort write FDefaultPort;
|
||||
property IPv4Addresses : TIdStrings read FIPv4Addresses write SetIPv4Addresses;
|
||||
property IPv6Addresses : TIdStrings read FIPv6Addresses write SetIPv6Addresses;
|
||||
|
||||
end;
|
||||
|
||||
[assembly: RuntimeRequiredAttribute(TypeOf(TIdDsnPropEdBindingNET))]
|
||||
|
||||
procedure FillHandleList(const AList: string; ADest: TIdSocketHandles);
|
||||
function GetListValues(const ASocketHandles : TIdSocketHandles) : String;
|
||||
|
||||
implementation
|
||||
uses
|
||||
IdGlobal,
|
||||
IdIPAddress,
|
||||
IdDsnCoreResourceStrings, IdStack, IdSys;
|
||||
|
||||
const
|
||||
IPv6Wildcard1 = '::'; {do not localize}
|
||||
IPv6Wildcard2 = '0:0:0:0:0:0:0:0'; {do not localize}
|
||||
IPv6Loopback = '::1'; {do not localize}
|
||||
IPv4Wildcard = '0.0.0.0'; {do not localize}
|
||||
IPv4Loopback = '127.0.0.1'; {do not localize}
|
||||
|
||||
function IsValidIP(const AAddr : String): Boolean;
|
||||
var LIP : TIdIPAddress;
|
||||
begin
|
||||
LIP := TIdIPAddress.MakeAddressObject(AAddr);
|
||||
Result := Assigned(LIP);
|
||||
if Result then
|
||||
begin
|
||||
Sys.FreeAndNil(LIP);
|
||||
end;
|
||||
end;
|
||||
|
||||
function StripAndSymbol(s : String) : String;
|
||||
begin
|
||||
Result := '';
|
||||
repeat
|
||||
if s='' then
|
||||
begin
|
||||
Break;
|
||||
end;
|
||||
Result := Result + Fetch(s,'&');
|
||||
until False;
|
||||
end;
|
||||
|
||||
procedure FillHandleList(const AList: string; ADest: TIdSocketHandles);
|
||||
var
|
||||
LItems: TIdStringList;
|
||||
i: integer;
|
||||
LIPVersion: TIdIPVersion;
|
||||
LAddr, LText: string;
|
||||
LPort: integer;
|
||||
begin
|
||||
|
||||
ADest.Clear;
|
||||
LItems := TIdStringList.Create;
|
||||
try
|
||||
LItems.CommaText := AList;
|
||||
for i := 0 to LItems.Count-1 do begin
|
||||
if Length(LItems[i]) > 0 then begin
|
||||
if TextStartsWith(LItems[i], '[') then begin
|
||||
// ipv6
|
||||
LIPVersion := Id_IPv6;
|
||||
LText := Copy(LItems[i], 2, MaxInt);
|
||||
LAddr := Fetch(LText, ']:');
|
||||
LPort := Sys.StrToInt(LText, -1);
|
||||
|
||||
end else begin
|
||||
// ipv4
|
||||
LIPVersion := Id_IPv4;
|
||||
LText := LItems[i];
|
||||
LAddr := Fetch(LText, ':');
|
||||
LPort := Sys.StrToInt(LText, -1);
|
||||
//Note that 0 is legal and indicates the server binds to a random port
|
||||
end;
|
||||
if IsValidIP(LAddr) and (LPort > -1) and (LPort < 65536) then begin
|
||||
with ADest.Add do begin
|
||||
IPVersion := LIPVersion;
|
||||
IP := LAddr;
|
||||
Port := LPort;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
LItems.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
function NumericOnly(const AText : String) : String;
|
||||
var i : Integer;
|
||||
|
||||
begin
|
||||
Result := '';
|
||||
for i := 1 to Length(AText) do
|
||||
begin
|
||||
if IsNumeric(AText[i]) then
|
||||
begin
|
||||
Result := Result + AText[i];
|
||||
end
|
||||
else
|
||||
begin
|
||||
Break;
|
||||
end;
|
||||
end;
|
||||
if (Length(Result) = 0) then
|
||||
begin
|
||||
Result := '0';
|
||||
end;
|
||||
end;
|
||||
|
||||
function IndexOfNo(const ANo : Integer; AItems : System.Windows.Forms.ComboBox.ObjectCollection) : Integer;
|
||||
begin
|
||||
for Result := 0 to AItems.Count -1 do
|
||||
begin
|
||||
if ANo = Sys.StrToInt( NumericOnly(AItems[Result].ToString )) then
|
||||
begin
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
Result := -1;
|
||||
end;
|
||||
|
||||
function GetDisplayString(const AIP : String; const APort : Integer; AIPVer : TIdIPVersion): string;
|
||||
begin
|
||||
Result := '';
|
||||
case AIPVer of
|
||||
Id_IPv4 : Result := Sys.Format('%s:%d',[AIP,APort]);
|
||||
Id_IPv6 : Result := Sys.Format('[%s]:%d',[AIP,APort]);
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetListValues(const ASocketHandles : TIdSocketHandles) : String;
|
||||
var i : Integer;
|
||||
begin
|
||||
Result := '';
|
||||
for i := 0 to ASocketHandles.Count -1 do begin
|
||||
Result := Result + ',' + GetDisplayString(ASocketHandles[i].IP,ASocketHandles[i].Port,ASocketHandles[i].IPVersion );
|
||||
end;
|
||||
Delete(Result,1,1);
|
||||
end;
|
||||
|
||||
{$AUTOBOX ON}
|
||||
|
||||
{$REGION 'Windows Form Designer generated code'}
|
||||
/// <summary>
|
||||
/// Required method for Designer support -- do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
procedure TIdDsnPropEdBindingNET.InitializeComponent;
|
||||
type
|
||||
TArrayOfInteger = array of Integer;
|
||||
begin
|
||||
Self.btnOk := System.Windows.Forms.Button.Create;
|
||||
Self.btnCancel := System.Windows.Forms.Button.Create;
|
||||
Self.lblBindings := System.Windows.Forms.Label.Create;
|
||||
Self.lbBindings := System.Windows.Forms.ListBox.Create;
|
||||
Self.btnNew := System.Windows.Forms.Button.Create;
|
||||
Self.btnDelete := System.Windows.Forms.Button.Create;
|
||||
Self.lblIPAddress := System.Windows.Forms.Label.Create;
|
||||
Self.edtIPAddress := System.Windows.Forms.ComboBox.Create;
|
||||
Self.lblPort := System.Windows.Forms.Label.Create;
|
||||
Self.edtPort := System.Windows.Forms.NumericUpDown.Create;
|
||||
Self.cboIPVersion := System.Windows.Forms.ComboBox.Create;
|
||||
Self.lblIPVersion := System.Windows.Forms.Label.Create;
|
||||
(System.ComponentModel.ISupportInitialize(Self.edtPort)).BeginInit;
|
||||
Self.SuspendLayout;
|
||||
//
|
||||
// btnOk
|
||||
//
|
||||
Self.btnOk.Anchor := (System.Windows.Forms.AnchorStyles((System.Windows.Forms.AnchorStyles.Bottom
|
||||
or System.Windows.Forms.AnchorStyles.Right)));
|
||||
Self.btnOk.DialogResult := System.Windows.Forms.DialogResult.OK;
|
||||
Self.btnOk.Location := System.Drawing.Point.Create(312, 160);
|
||||
Self.btnOk.Name := 'btnOk';
|
||||
Self.btnOk.TabIndex := 0;
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
Self.btnCancel.Anchor := (System.Windows.Forms.AnchorStyles((System.Windows.Forms.AnchorStyles.Bottom
|
||||
or System.Windows.Forms.AnchorStyles.Right)));
|
||||
Self.btnCancel.DialogResult := System.Windows.Forms.DialogResult.Cancel;
|
||||
Self.btnCancel.Location := System.Drawing.Point.Create(392, 160);
|
||||
Self.btnCancel.Name := 'btnCancel';
|
||||
Self.btnCancel.TabIndex := 1;
|
||||
//
|
||||
// lblBindings
|
||||
//
|
||||
Self.lblBindings.AutoSize := True;
|
||||
Self.lblBindings.Location := System.Drawing.Point.Create(8, 8);
|
||||
Self.lblBindings.Name := 'lblBindings';
|
||||
Self.lblBindings.Size := System.Drawing.Size.Create(42, 16);
|
||||
Self.lblBindings.TabIndex := 2;
|
||||
Self.lblBindings.Text := '&Binding';
|
||||
//
|
||||
// lbBindings
|
||||
//
|
||||
Self.lbBindings.Anchor := (System.Windows.Forms.AnchorStyles(((System.Windows.Forms.AnchorStyles.Top
|
||||
or System.Windows.Forms.AnchorStyles.Bottom) or System.Windows.Forms.AnchorStyles.Left)));
|
||||
Self.lbBindings.Location := System.Drawing.Point.Create(8, 24);
|
||||
Self.lbBindings.Name := 'lbBindings';
|
||||
Self.lbBindings.Size := System.Drawing.Size.Create(137, 121);
|
||||
Self.lbBindings.TabIndex := 3;
|
||||
Include(Self.lbBindings.SelectedValueChanged, Self.lbBindings_SelectedValueChanged);
|
||||
//
|
||||
// btnNew
|
||||
//
|
||||
Self.btnNew.Location := System.Drawing.Point.Create(152, 56);
|
||||
Self.btnNew.Name := 'btnNew';
|
||||
Self.btnNew.TabIndex := 4;
|
||||
Include(Self.btnNew.Click, Self.btnNew_Click);
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
Self.btnDelete.Location := System.Drawing.Point.Create(152, 88);
|
||||
Self.btnDelete.Name := 'btnDelete';
|
||||
Self.btnDelete.TabIndex := 5;
|
||||
Include(Self.btnDelete.Click, Self.btnDelete_Click);
|
||||
//
|
||||
// lblIPAddress
|
||||
//
|
||||
Self.lblIPAddress.Location := System.Drawing.Point.Create(240, 8);
|
||||
Self.lblIPAddress.Name := 'lblIPAddress';
|
||||
Self.lblIPAddress.Size := System.Drawing.Size.Create(100, 16);
|
||||
Self.lblIPAddress.TabIndex := 6;
|
||||
Self.lblIPAddress.Text := 'Label1';
|
||||
//
|
||||
// edtIPAddress
|
||||
//
|
||||
Self.edtIPAddress.Anchor := (System.Windows.Forms.AnchorStyles(((System.Windows.Forms.AnchorStyles.Top
|
||||
or System.Windows.Forms.AnchorStyles.Left) or System.Windows.Forms.AnchorStyles.Right)));
|
||||
Self.edtIPAddress.DropDownStyle := System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
Self.edtIPAddress.Location := System.Drawing.Point.Create(240, 24);
|
||||
Self.edtIPAddress.Name := 'edtIPAddress';
|
||||
Self.edtIPAddress.Size := System.Drawing.Size.Create(224, 21);
|
||||
Self.edtIPAddress.TabIndex := 7;
|
||||
Include(Self.edtIPAddress.SelectedValueChanged, Self.edtIPAddress_SelectedValueChanged);
|
||||
//
|
||||
// lblPort
|
||||
//
|
||||
Self.lblPort.Location := System.Drawing.Point.Create(240, 58);
|
||||
Self.lblPort.Name := 'lblPort';
|
||||
Self.lblPort.Size := System.Drawing.Size.Create(100, 16);
|
||||
Self.lblPort.TabIndex := 8;
|
||||
Self.lblPort.Text := 'Label1';
|
||||
//
|
||||
// edtPort
|
||||
//
|
||||
Self.edtPort.Anchor := (System.Windows.Forms.AnchorStyles(((System.Windows.Forms.AnchorStyles.Top
|
||||
or System.Windows.Forms.AnchorStyles.Left) or System.Windows.Forms.AnchorStyles.Right)));
|
||||
Self.edtPort.Location := System.Drawing.Point.Create(240, 74);
|
||||
Self.edtPort.Maximum := System.Decimal.Create(TArrayOfInteger.Create(65535,
|
||||
0, 0, 0));
|
||||
Self.edtPort.Name := 'edtPort';
|
||||
Self.edtPort.Size := System.Drawing.Size.Create(224, 20);
|
||||
Self.edtPort.TabIndex := 9;
|
||||
Include(Self.edtPort.ValueChanged, Self.edtPort_ValueChanged);
|
||||
//
|
||||
// cboIPVersion
|
||||
//
|
||||
Self.cboIPVersion.DropDownStyle := System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
Self.cboIPVersion.Location := System.Drawing.Point.Create(240, 124);
|
||||
Self.cboIPVersion.Name := 'cboIPVersion';
|
||||
Self.cboIPVersion.Size := System.Drawing.Size.Create(224, 21);
|
||||
Self.cboIPVersion.TabIndex := 10;
|
||||
Include(Self.cboIPVersion.SelectedValueChanged, Self.cboIPVersion_SelectedValueChanged);
|
||||
//
|
||||
// lblIPVersion
|
||||
//
|
||||
Self.lblIPVersion.Location := System.Drawing.Point.Create(240, 108);
|
||||
Self.lblIPVersion.Name := 'lblIPVersion';
|
||||
Self.lblIPVersion.Size := System.Drawing.Size.Create(100, 16);
|
||||
Self.lblIPVersion.TabIndex := 11;
|
||||
Self.lblIPVersion.Text := 'Label1';
|
||||
//
|
||||
// TIdDsnPropEdBindingNET
|
||||
//
|
||||
Self.AcceptButton := Self.btnOk;
|
||||
Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13);
|
||||
Self.CancelButton := Self.btnCancel;
|
||||
Self.ClientSize := System.Drawing.Size.Create(470, 189);
|
||||
Self.Controls.Add(Self.lblIPVersion);
|
||||
Self.Controls.Add(Self.cboIPVersion);
|
||||
Self.Controls.Add(Self.edtPort);
|
||||
Self.Controls.Add(Self.lblPort);
|
||||
Self.Controls.Add(Self.edtIPAddress);
|
||||
Self.Controls.Add(Self.lblIPAddress);
|
||||
Self.Controls.Add(Self.btnDelete);
|
||||
Self.Controls.Add(Self.btnNew);
|
||||
Self.Controls.Add(Self.lbBindings);
|
||||
Self.Controls.Add(Self.lblBindings);
|
||||
Self.Controls.Add(Self.btnCancel);
|
||||
Self.Controls.Add(Self.btnOk);
|
||||
Self.FormBorderStyle := System.Windows.Forms.FormBorderStyle.Fixed3D;
|
||||
Self.MaximizeBox := False;
|
||||
Self.MaximumSize := System.Drawing.Size.Create(480, 225);
|
||||
Self.MinimizeBox := False;
|
||||
Self.MinimumSize := System.Drawing.Size.Create(480, 225);
|
||||
Self.Name := 'TIdDsnPropEdBindingNET';
|
||||
Self.ShowInTaskbar := False;
|
||||
Self.StartPosition := System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
Self.Text := 'WinForm';
|
||||
(System.ComponentModel.ISupportInitialize(Self.edtPort)).EndInit;
|
||||
Self.ResumeLayout(False);
|
||||
end;
|
||||
{$ENDREGION}
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.Dispose(Disposing: Boolean);
|
||||
begin
|
||||
if Disposing then
|
||||
begin
|
||||
if Components <> nil then
|
||||
begin
|
||||
Components.Dispose();
|
||||
Sys.FreeAndNil(FHandles);
|
||||
|
||||
Sys.FreeAndNil( FIPv4Addresses);
|
||||
Sys.FreeAndNil( FIPv6Addresses);
|
||||
|
||||
//don't free FCurrentHandle; - it's in the handles collection
|
||||
TIdStack.DecUsage;
|
||||
end;
|
||||
end;
|
||||
inherited Dispose(Disposing);
|
||||
|
||||
end;
|
||||
|
||||
constructor TIdDsnPropEdBindingNET.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
//
|
||||
// Required for Windows Form Designer support
|
||||
//
|
||||
InitializeComponent;
|
||||
//
|
||||
// TODO: Add any constructor code after InitializeComponent call
|
||||
//
|
||||
FHandles := TIdSocketHandles.Create(nil);
|
||||
FIPv4Addresses := TIdStringList.Create;
|
||||
FIPv6Addresses := TIdStringList.Create;
|
||||
SetIPv4Addresses(nil);
|
||||
SetIPv6Addresses(nil);
|
||||
|
||||
TIdStack.IncUsage;
|
||||
|
||||
IPv4Addresses := GStack.LocalAddresses;
|
||||
UpdateEditControls;
|
||||
//captions
|
||||
btnNew.Text := RSBindingNewCaption;
|
||||
btnDelete.Text := RSBindingDeleteCaption;
|
||||
lblIPAddress.Text := RSBindingHostnameLabel;
|
||||
lblPort.Text := RSBindingPortLabel;
|
||||
lblIPVersion.Text := RSBindingIPVerLabel;
|
||||
btnOk.Text := RSOk;
|
||||
btnCancel.Text := RSCancel;
|
||||
//IPVersion choices
|
||||
//we yhave to strip out the & symbol. In Win32, we use this
|
||||
//in a radio-box so a user could select by pressingg the 4 or 6
|
||||
//key. For this, we don't have a radio box and I'm too lazy
|
||||
//to use two Radio Buttons.
|
||||
cboIPVersion.Items.Add(StripAndSymbol(RSBindingIPV4Item));
|
||||
cboIPVersion.Items.Add(StripAndSymbol(RSBindingIPV6Item));
|
||||
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.SetHandles(const Value: TIdSocketHandles);
|
||||
begin
|
||||
FHandles.Assign(Value);
|
||||
UpdateBindingList;
|
||||
end;
|
||||
|
||||
function TIdDsnPropEdBindingNET.GetList: string;
|
||||
begin
|
||||
Result := GetListValues(Handles);
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.SetIPv6Addresses(const Value: TIdStrings);
|
||||
begin
|
||||
if Assigned(Value) then
|
||||
begin
|
||||
FIPv6Addresses.Assign(Value);
|
||||
end;
|
||||
// Ensure that these two are always present
|
||||
if FIPv6Addresses.IndexOf(IPv6Loopback)=-1 then
|
||||
begin
|
||||
FIPv6Addresses.Insert(0,IPv6Loopback);
|
||||
end;
|
||||
if FIPv6Addresses.IndexOf(IPv6Wildcard1)=-1 then
|
||||
begin
|
||||
FIPv6Addresses.Insert(0,IPv6Wildcard1);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.SetIPv4Addresses(const Value: TIdStrings);
|
||||
begin
|
||||
if Assigned(Value) then
|
||||
begin
|
||||
FIPv4Addresses.Assign(Value);
|
||||
end;
|
||||
// Ensure that these two are always present
|
||||
if FIPv4Addresses.IndexOf(IPv6Loopback)=-1 then
|
||||
begin
|
||||
FIPv4Addresses.Insert(0,IPv4Loopback);
|
||||
end;
|
||||
|
||||
if FIPv4Addresses.IndexOf(IPv4Wildcard)=-1 then
|
||||
begin
|
||||
FIPv4Addresses.Insert(0,IPv4Wildcard);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.SetList(const AList: string);
|
||||
begin
|
||||
FCurrentHandle := nil;
|
||||
FillHandleList(AList, Handles);
|
||||
UpdateBindingList;
|
||||
UpdateEditControls;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.lbBindings_SelectedValueChanged(sender: System.Object;
|
||||
e: System.EventArgs);
|
||||
begin
|
||||
if lbBindings.SelectedIndex >= 0 then begin
|
||||
btnDelete.Enabled := True;
|
||||
FCurrentHandle := FHandles[lbBindings.SelectedIndex];
|
||||
end else begin
|
||||
btnDelete.Enabled := False;
|
||||
FCurrentHandle := nil;
|
||||
end;
|
||||
UpdateEditControls;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.cboIPVersion_SelectedValueChanged(sender: System.Object;
|
||||
e: System.EventArgs);
|
||||
begin
|
||||
case cboIPVersion.SelectedIndex of
|
||||
0 :
|
||||
begin
|
||||
if FCurrentHandle.IPVersion <> Id_IPv4 then
|
||||
begin
|
||||
FCurrentHandle.IPVersion := Id_IPv4;
|
||||
FillComboBox(edtIPAddress,FIPv4Addresses);
|
||||
FCurrentHandle.IP := IPv4Wildcard;
|
||||
end;
|
||||
end;
|
||||
1 :
|
||||
begin
|
||||
if FCurrentHandle.IPVersion <> Id_IPv6 then
|
||||
begin
|
||||
FCurrentHandle.IPVersion := Id_IPv6;
|
||||
FillComboBox(edtIPAddress,FIPv6Addresses);
|
||||
FCurrentHandle.IP := IPv6Wildcard1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
UpdateEditControls;
|
||||
UpdateBindingList;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.edtIPAddress_SelectedValueChanged(sender: System.Object;
|
||||
e: System.EventArgs);
|
||||
begin
|
||||
FCurrentHandle.IP := edtIPAddress.SelectedItem.ToString;
|
||||
UpdateBindingList;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.edtPort_ValueChanged(sender: System.Object;
|
||||
e: System.EventArgs);
|
||||
begin
|
||||
if Assigned(FCurrentHandle) then
|
||||
begin
|
||||
FCurrentHandle.Port := edtPort.Value.ToInt16(edtPort.Value);
|
||||
end;
|
||||
UpdateBindingList;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.btnDelete_Click(sender: System.Object; e: System.EventArgs);
|
||||
var LSH : TIdSocketHandle;
|
||||
i : Integer;
|
||||
begin
|
||||
if lbBindings.SelectedIndex >= 0 then
|
||||
begin
|
||||
// Delete is not available in D4's collection classes
|
||||
// This should work just as well.
|
||||
i := lbBindings.get_SelectedIndex;
|
||||
LSH := Handles[i];
|
||||
Sys.FreeAndNil(LSH);
|
||||
lbBindings.Items.Remove(i);
|
||||
FCurrentHandle := nil;
|
||||
UpdateBindingList;
|
||||
|
||||
end;
|
||||
Self.lbBindings_SelectedValueChanged(nil,nil);
|
||||
UpdateEditControls;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.btnNew_Click(sender: System.Object; e: System.EventArgs);
|
||||
begin
|
||||
FCurrentHandle := FHandles.Add;
|
||||
FCurrentHandle.IP := IPv4Wildcard;
|
||||
FCurrentHandle.Port := FDefaultPort;
|
||||
UpdateBindingList;
|
||||
FillComboBox(edtIPAddress,FIPv4Addresses);
|
||||
UpdateEditControls;
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.UpdateBindingList;
|
||||
var
|
||||
i: integer;
|
||||
selected: integer;
|
||||
s: string;
|
||||
begin
|
||||
selected := lbBindings.SelectedIndex;
|
||||
lbBindings.BeginUpdate;
|
||||
try
|
||||
if lbBindings.Items.Count = FHandles.Count then begin
|
||||
for i := 0 to FHandles.Count - 1 do begin
|
||||
s := GetDisplayString(FHandles[i].IP, FHandles[i].Port, FHandles[i].IPVersion);
|
||||
if s <> lbBindings.Items[i].ToString then begin
|
||||
lbBindings.Items[i] := s;
|
||||
end;
|
||||
end;
|
||||
end else begin
|
||||
lbBindings.Items.Clear;
|
||||
for i := 0 to FHandles.Count-1 do begin
|
||||
lbBindings.Items.Add(GetDisplayString(FHandles[i].IP, FHandles[i].Port,FHandles[i].IPVersion));
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
lbBindings.EndUpdate;
|
||||
if Assigned(FCurrentHandle) then begin
|
||||
lbBindings.SelectedIndex := FCurrentHandle.Index;
|
||||
end else begin
|
||||
lbBindings.SelectedIndex := Min(selected, lbBindings.Items.Count-1);
|
||||
end;
|
||||
end;
|
||||
{ selected := lbBindings.SelectedItem;
|
||||
lbBindings.Items.BeginUpdate;
|
||||
try
|
||||
if lbBindings.Items.Count = FHandles.Count then begin
|
||||
for i := 0 to FHandles.Count - 1 do begin
|
||||
s := GetDisplayString(FHandles[i].IP, FHandles[i].Port, FHandles[i].IPVersion);
|
||||
if s <> lbBindings.Items[i] then begin
|
||||
lbBindings.Items[i] := s;
|
||||
end;
|
||||
end;
|
||||
end else begin
|
||||
lbBindings.Items.Clear;
|
||||
for i := 0 to FHandles.Count-1 do begin
|
||||
lbBindings.Items.Add(GetDisplayString(FHandles[i].IP, FHandles[i].Port,FHandles[i].IPVersion));
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
lbBindings.Items.EndUpdate;
|
||||
if Assigned(FCurrentHandle) then begin
|
||||
lbBindings.ItemIndex := FCurrentHandle.Index;
|
||||
end else begin
|
||||
lbBindings.ItemIndex := Min(selected, lbBindings.Items.Count-1);
|
||||
end;
|
||||
end; }
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.UpdateEditControls;
|
||||
|
||||
begin
|
||||
if Assigned(FCurrentHandle) then
|
||||
begin
|
||||
edtPort.Text := '';
|
||||
edtPort.Value := FCurrentHandle.Port;
|
||||
case FCurrentHandle.IPVersion of
|
||||
Id_IPv4 :
|
||||
begin
|
||||
|
||||
FillComboBox(edtIPAddress,FIPv4Addresses);
|
||||
edtIPAddress.SelectedItem := edtIPAddress.Items[0];
|
||||
cboIPVersion.SelectedItem := cboIPVersion.Items[0];
|
||||
end;
|
||||
Id_IPv6 :
|
||||
begin
|
||||
FillComboBox(edtIPAddress,FIPv6Addresses);
|
||||
edtIPAddress.SelectedItem := edtIPAddress.Items[0];
|
||||
cboIPVersion.SelectedItem := cboIPVersion.Items[1];
|
||||
end;
|
||||
end;
|
||||
edtIPAddress.SelectedIndex := edtIPAddress.Items.IndexOf(FCurrentHandle.IP);
|
||||
end;
|
||||
|
||||
lblIPAddress.Enabled := Assigned(FCurrentHandle);
|
||||
edtIPAddress.Enabled := Assigned(FCurrentHandle);
|
||||
lblPort.Enabled := Assigned(FCurrentHandle);
|
||||
edtPort.Enabled := Assigned(FCurrentHandle);
|
||||
lblIPVersion.Enabled := Assigned(FCurrentHandle);
|
||||
cboIPVersion.Enabled := Assigned(FCurrentHandle);
|
||||
end;
|
||||
|
||||
procedure TIdDsnPropEdBindingNET.FillComboBox(
|
||||
ACombo: System.Windows.Forms.ComboBox; AStrings: TIdStrings);
|
||||
var i : INteger;
|
||||
begin
|
||||
ACombo.Items.Clear;
|
||||
for i := 0 to AStrings.Count -1 do
|
||||
begin
|
||||
ACombo.Items.Add(AStrings[i]);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TIdDsnPropEdBindingNET.Execute: Boolean;
|
||||
begin
|
||||
Result := Self.ShowDialog = System.Windows.Forms.DialogResult.OK;
|
||||
end;
|
||||
|
||||
end.
|
||||
196
indy/Design/IdDsnPropEdBindingNET.resx
Normal file
196
indy/Design/IdDsnPropEdBindingNET.resx
Normal file
@@ -0,0 +1,196 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 1.3
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">1.3</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1">this is my long string</data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
[base64 mime encoded serialized .NET Framework object]
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
[base64 mime encoded string representing a byte array form of the .NET Framework object]
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used forserialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>1.3</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="btnOk.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnOk.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnCancel.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnCancel.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblBindings.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblBindings.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lbBindings.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lbBindings.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnNew.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnNew.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="btnDelete.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="btnDelete.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblIPAddress.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblIPAddress.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="edtIPAddress.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="edtIPAddress.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblPort.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblPort.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="edtPort.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="edtPort.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="cboIPVersion.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cboIPVersion.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="lblIPVersion.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="lblIPVersion.Modifiers" type="System.CodeDom.MemberAttributes, System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>Private</value>
|
||||
</data>
|
||||
<data name="$this.Locked" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>(Default)</value>
|
||||
</data>
|
||||
<data name="$this.TrayLargeIcon" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.Localizable" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="$this.GridSize" type="System.Drawing.Size, System.Drawing, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>8, 8</value>
|
||||
</data>
|
||||
<data name="$this.DrawGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>80</value>
|
||||
</data>
|
||||
<data name="$this.SnapToGrid" type="System.Boolean, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user