1
0
mirror of https://bitbucket.org/Dennis07/lina-components.git synced 2025-08-24 21:49:04 +02:00

Version 1.0 DEV 1.10a

Signed-off-by: Dennis07 <den.goehlert@t-online.de>
This commit is contained in:
Dennis07
2014-09-29 05:34:42 +02:00
parent 9e90ffe3c3
commit 15d0b479d2
23 changed files with 681 additions and 10 deletions

View File

@@ -0,0 +1,14 @@
program pExample;
uses
Vcl.Forms,
uMain in 'uMain.pas' {fmMain};
{$R *.res}
begin
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TfmMain, fmMain);
Application.Run;
end.

View File

@@ -0,0 +1,170 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{B81BCCF5-1526-4845-AD3B-E68EC5AC46F9}</ProjectGuid>
<ProjectVersion>15.3</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>pExample.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
<AppType>Application</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
<Base_Win32>true</Base_Win32>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
<Base_Win64>true</Base_Win64>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
<Cfg_1_Win32>true</Cfg_1_Win32>
<CfgParent>Cfg_1</CfgParent>
<Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
<DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
<DCC_F>false</DCC_F>
<DCC_K>false</DCC_K>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_Locale>1033</VerInfo_Locale>
<DCC_UsePackage>JvBDE;JvGlobus;O408br;JvMM;JvManagedThreads;FireDACSqliteDriver;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;VampyreImagingPackage.D2009;fmx;JvDlgs;IndySystem;JvCrypt;TeeDB;frx19;inetdbbde;vclib;DBXInterBaseDriver;GR32_DSGN_RSXE5;DataSnapCommon;MiscrosoftScriptControls;pkCindyDERDXE5;JvNet;JvDotNetCtrls;DbxCommonDriver;vclimg;dbxcds;PieLib;vclshlctrls;MetropolisUILiveTile;JvXPCtrls;pkCindyPackDXE5;vcldb;vcldsnap;pkCindyIEDXE5;fmxFireDAC;pkCindyDBXDXE5;CustomIPTransport;JvCore;SynEdit_RXE5;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;DebenuPDFLibraryLite;DCEF_XE5;CodeSiteExpressPkg;IndyIPCommon;CloudService;FmxTeeUI;FireDACIBDriver;JvAppFrm;JvDB;JvRuntimeDesign;inetdbxpress;webdsnap;frxe19;JclDeveloperTools;JvDocking;adortl;JvWizards;frxDB19;FireDACASADriver;JvHMI;bindcompfmx;JvBands;vcldbx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;JvPluginSystem;Tee;JclContainers;JvCmp;vclFireDAC;JvSystem;xmlrtl;svnui;ibxpress;SVATimer_DXE5;JvControls;JvTimeFramework;IndyProtocols;DBXMySQLDriver;djsonrt;FireDACCommonDriver;O408_r;bindengine;vclactnband;soaprtl;bindcompdbx;TeeUI;FMXTee;bindcompvcl;JvStdCtrls;JvCustom;Jcl;vclie;JvJans;JvPageComps;JvPrintPreview;pkCindyDBCtrlsPackDXE5;FireDACADSDriver;vcltouch;LINA_D_XE5;VclSmp;FireDAC;VCLRESTComponents;Intraweb;GR32_RSXE5;dsnapcon;inet;fmxobj;JclVcl;JvPascalInterpreter;FireDACMySQLDriver;vclx;svn;fmxdae;RESTComponents;bdertl;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win64)'!=''">
<DCC_UsePackage>O408br;FireDACSqliteDriver;DBXSqliteDriver;AbbreviaVCL;FireDACPgDriver;fmx;IndySystem;vclib;DBXInterBaseDriver;DataSnapCommon;DbxCommonDriver;vclimg;dbxcds;vclshlctrls;MetropolisUILiveTile;vcldb;vcldsnap;fmxFireDAC;CustomIPTransport;SynEdit_RXE5;vclribbon;dsnap;IndyIPServer;fmxase;vcl;IndyCore;IndyIPCommon;CloudService;FireDACIBDriver;inetdbxpress;webdsnap;adortl;FireDACASADriver;bindcompfmx;FireDACODBCDriver;rtl;dbrtl;DbxClientDriver;FireDACCommon;bindcomp;vclFireDAC;xmlrtl;ibxpress;IndyProtocols;DBXMySQLDriver;FireDACCommonDriver;O408_r;bindengine;vclactnband;soaprtl;bindcompdbx;bindcompvcl;vclie;FireDACADSDriver;vcltouch;LINA_D_XE5;VclSmp;FireDAC;VCLRESTComponents;Intraweb;dsnapcon;inet;fmxobj;FireDACMySQLDriver;vclx;fmxdae;RESTComponents;FireDACMSAccDriver;dbexpress;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
<DCC_DebugDCUs>true</DCC_DebugDCUs>
<DCC_Optimize>false</DCC_Optimize>
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
<DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
<DCC_RemoteDebug>false</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
<DCC_DebugInformation>0</DCC_DebugInformation>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
<MainSource>MainSource</MainSource>
</DelphiCompile>
<DCCReference Include="uMain.pas">
<Form>fmMain</Form>
<FormType>dfm</FormType>
</DCCReference>
<BuildConfiguration Include="Release">
<Key>Cfg_2</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
<BuildConfiguration Include="Debug">
<Key>Cfg_1</Key>
<CfgParent>Base</CfgParent>
</BuildConfiguration>
</ItemGroup>
<ProjectExtensions>
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
<Borland.ProjectType/>
<BorlandProject>
<Delphi.Personality>
<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">1031</VersionInfo>
<VersionInfo Name="CodePage">1252</VersionInfo>
</VersionInfo>
<VersionInfoKeys>
<VersionInfoKeys Name="CompanyName"/>
<VersionInfoKeys Name="FileDescription"/>
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="InternalName"/>
<VersionInfoKeys Name="LegalCopyright"/>
<VersionInfoKeys Name="LegalTrademarks"/>
<VersionInfoKeys Name="OriginalFilename"/>
<VersionInfoKeys Name="ProductName"/>
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
<VersionInfoKeys Name="Comments"/>
<VersionInfoKeys Name="CFBundleName"/>
<VersionInfoKeys Name="CFBundleDisplayName"/>
<VersionInfoKeys Name="UIDeviceFamily"/>
<VersionInfoKeys Name="CFBundleIdentifier"/>
<VersionInfoKeys Name="CFBundleVersion"/>
<VersionInfoKeys Name="CFBundlePackageType"/>
<VersionInfoKeys Name="CFBundleSignature"/>
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
<VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
<VersionInfoKeys Name="CFBundleExecutable"/>
<VersionInfoKeys Name="CFBundleResourceSpecification"/>
<VersionInfoKeys Name="LSRequiresIPhoneOS"/>
<VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
<VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
<VersionInfoKeys Name="package"/>
<VersionInfoKeys Name="label"/>
<VersionInfoKeys Name="versionCode"/>
<VersionInfoKeys Name="versionName"/>
<VersionInfoKeys Name="persistent"/>
<VersionInfoKeys Name="restoreAnyVersion"/>
<VersionInfoKeys Name="installLocation"/>
<VersionInfoKeys Name="largeHeap"/>
<VersionInfoKeys Name="theme"/>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">pExample.dpr</Source>
</Source>
</Delphi.Personality>
<Deployment/>
<Platforms>
<Platform value="Win32">True</Platform>
<Platform value="Win64">False</Platform>
</Platforms>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
<Import Project="$(BDS)\Bin\CodeGear.Delphi.Targets" Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')"/>
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
</Project>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<BorlandProject>
<Transactions>
<Transaction>1899.12.30 00:00:00.000.963,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.541,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.562,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.957,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.036,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.634,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.579,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.356,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.438,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.246,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Example\TParamDefiner\uMain.dfm=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.dfm</Transaction>
<Transaction>1899.12.30 00:00:00.000.689,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.246,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Example\TParamDefiner\uMain.pas=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.507,C:\Users\Dennis G\Documents\RAD Studio\Projekte\LinaComponents\Example\TParamDefiner\pExample.dproj=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Project1.dproj</Transaction>
<Transaction>1899.12.30 00:00:00.000.215,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.177,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.129,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.256,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.832,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.028,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.333,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.086,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.120,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.029,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.629,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.376,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.505,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.779,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.044,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.012,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.911,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.283,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.165,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.169,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.726,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
<Transaction>1899.12.30 00:00:00.000.629,=C:\Users\Dennis G\Documents\RAD Studio\Projekte\Unit1.pas</Transaction>
</Transactions>
</BorlandProject>

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,119 @@
object fmMain: TfmMain
Left = 0
Top = 0
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsSingle
Caption = 'LinaComponents "TParamDefiner" Example'
ClientHeight = 429
ClientWidth = 434
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
Position = poScreenCenter
OnCreate = FormCreate
PixelsPerInch = 96
TextHeight = 13
object pnButtons: TPanel
Left = 0
Top = 369
Width = 434
Height = 41
Align = alBottom
TabOrder = 0
object btRestart: TButton
Left = 350
Top = 8
Width = 75
Height = 25
Caption = 'Restart'
TabOrder = 1
OnClick = btRestartClick
end
object btRefresh: TButton
Left = 8
Top = 8
Width = 75
Height = 25
Caption = 'Refresh'
TabOrder = 0
OnClick = btRefreshClick
end
end
object gbFormat: TGroupBox
Left = 8
Top = 8
Width = 417
Height = 65
Caption = 'Format settings'
TabOrder = 1
object lePrefix: TLabeledEdit
Left = 16
Top = 33
Width = 113
Height = 21
EditLabel.Width = 32
EditLabel.Height = 13
EditLabel.Caption = 'Prefix:'
TabOrder = 0
OnChange = lePrefixChange
end
object leSuffix: TLabeledEdit
Left = 288
Top = 33
Width = 113
Height = 21
EditLabel.Width = 32
EditLabel.Height = 13
EditLabel.Caption = 'Prefix:'
TabOrder = 1
OnChange = leSuffixChange
end
object leSeparator: TLabeledEdit
Left = 152
Top = 33
Width = 113
Height = 21
EditLabel.Width = 52
EditLabel.Height = 13
EditLabel.Caption = 'Seperator:'
TabOrder = 2
OnChange = leSeparatorChange
end
end
object ListView: TListView
Left = 8
Top = 79
Width = 418
Height = 284
Columns = <
item
Caption = 'Identifier'
Width = 150
end
item
Caption = 'Value'
end>
GridLines = True
ReadOnly = True
RowSelect = True
TabOrder = 2
ViewStyle = vsReport
end
object StatusBar: TStatusBar
Left = 0
Top = 410
Width = 434
Height = 19
Panels = <>
SimplePanel = True
end
object ParamDefiner: TParamDefiner
References = <>
Left = 32
Top = 88
end
end

View File

@@ -0,0 +1,244 @@
unit uMain;
{$IF CompilerVersion <> 26.0}
{$MESSAGE ERROR 'This example was written to compile under Delphi XE5'}
{$ENDIF}
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,
Vcl.ComCtrls, ShellAPI, uBase, uFrmCtrls;
type
TfmMain = class(TForm)
pnButtons: TPanel;
btRestart: TButton;
gbFormat: TGroupBox;
lePrefix: TLabeledEdit;
leSuffix: TLabeledEdit;
leSeparator: TLabeledEdit;
btRefresh: TButton;
ParamDefiner: TParamDefiner;
ListView: TListView;
StatusBar: TStatusBar;
procedure btRefreshClick(Sender: TObject);
procedure btRestartClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure lePrefixChange(Sender: TObject);
procedure leSeparatorChange(Sender: TObject);
procedure leSuffixChange(Sender: TObject);
private
{ Private-Deklarationen }
Params: array [100..999] of String;
procedure CreateReferences;
procedure CreateItems;
procedure GenerateParamFiles;
function GenerateParamsString: String;
public
{ Public-Deklarationen }
end;
var
fmMain: TfmMain;
implementation
{$R *.dfm}
procedure TfmMain.CreateReferences;
var
Index: Integer;
IdentList: TStrings;
begin
IdentList := TStringList.Create;
try
IdentList.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Idents.txt');
for Index := 0 to 899 do
begin
with (ParamDefiner.References.Add as TParamReference) do
begin
DefaultValue := '(not defined)';
Identifier := IdentList.Strings[Index];
Connector := @Params[Index + 100];
Format.Prefix := lePrefix.Text;
Format.Seperator := leSeparator.Text;
Format.Suffix := leSuffix.Text;
end;
end;
finally
IdentList.Free;
end;
end;
procedure TfmMain.CreateItems;
var
Index: Integer;
begin
for Index := 0 to 899 do
begin
with ListView.Items.Add do
begin
Caption := (ParamDefiner.References.Items[Index] as TParamReference).Identifier;
SubItems.Add(Params[Index + 100]);
end;
end;
end;
procedure TfmMain.GenerateParamFiles;
var
ItemList: TStrings;
Index: Integer;
begin
if FileExists(ExtractFilePath(Application.ExeName) + 'Idents.txt') = False then
begin
ItemList := TStringList.Create;
try
for Index := 100 to 999 do
begin
ItemList.Add(IntToStr(Index));
end;
ItemList.SaveToFile(ExtractFilePath(Application.ExeName) + 'Idents.txt');
finally
ItemList.Free;
end;
end;
if FileExists(ExtractFilePath(Application.ExeName) + 'Values.txt') = False then
begin
ItemList := TStringList.Create;
try
for Index := 100 to 999 do
begin
ItemList.Add(IntToStr(100000 + Random(899999)));
end;
ItemList.SaveToFile(ExtractFilePath(Application.ExeName) + 'Values.txt');
finally
ItemList.Free;
end;
end;
end;
function TfmMain.GenerateParamsString: String;
var
IdentList: TStrings;
ValueList: TStrings;
Index: Integer;
TempStr: String;
begin
Result := '';
TempStr := '';
IdentList := TStringList.Create;
ValueList := TStringList.Create;
try
IdentList.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Idents.txt');
ValueList.LoadFromFile(ExtractFilePath(Application.ExeName) + 'Values.txt');
for Index := 0 to IdentList.Count - 1 do
begin
if Index > 0 then
begin
TempStr := TempStr + ' ';
end;
TempStr := TempStr + lePrefix.Text
+ IdentList.Strings[Index]
+ leSeparator.Text
+ ValueList.Strings[Index]
+ leSuffix.Text;
end;
finally
IdentList.Free;
ValueList.Free;
end;
Result := TempStr;
end;
procedure TfmMain.lePrefixChange(Sender: TObject);
var
Index: Integer;
begin
try
for Index := 0 to ParamDefiner.References.Count - 1 do
begin
(ParamDefiner.References.Items[Index] as TParamReference).Format.Prefix := lePrefix.Text;
end;
except
Beep;
lePrefix.Text := '[';
end;
end;
procedure TfmMain.leSeparatorChange(Sender: TObject);
var
Index: Integer;
begin
try
for Index := 0 to ParamDefiner.References.Count - 1 do
begin
(ParamDefiner.References.Items[Index] as TParamReference).Format.Seperator := leSeparator.Text;
end;
except
Beep;
lePrefix.Text := ':';
end;
end;
procedure TfmMain.leSuffixChange(Sender: TObject);
var
Index: Integer;
begin
try
for Index := 0 to ParamDefiner.References.Count - 1 do
begin
(ParamDefiner.References.Items[Index] as TParamReference).Format.Suffix := leSuffix.Text;
end;
except
Beep;
lePrefix.Text := ']';
end;
end;
procedure TfmMain.btRefreshClick(Sender: TObject);
var
StartCount: Cardinal;
FinishCount: Cardinal;
begin
try
StatusBar.SimpleText := 'Loading params...';
ParamDefiner.References.Clear;
ListView.Items.Clear;
CreateReferences;
StartCount := GetTickCount;
ParamDefiner.Update;
FinishCount := GetTickCount;
StatusBar.SimpleText := 'Update time: ' + IntToStr(FinishCount - StartCount) + 'ms with ' + IntToStr(ParamCount) + ' params (' + IntToStr((FinishCount - StartCount) div ParamCount) + 'ms/param)';
CreateItems;
except
StatusBar.SimpleText := 'No params loaded';
end;
end;
procedure TfmMain.btRestartClick(Sender: TObject);
begin
ShellExecute(Application.Handle,'open',PChar(Application.ExeName),PChar(GenerateParamsString),PChar(ExtractFileDir(Application.ExeName)),SW_NORMAL);
Close;
end;
procedure TfmMain.FormCreate(Sender: TObject);
begin
ListView.Column[1].Width := ListView.ClientWidth - ListView.Column[0].Width - GetSystemMetrics(SM_CXVSCROLL);
GenerateParamFiles;
lePrefix.Text := '[';
leSeparator.Text := ':';
leSuffix.Text := ']';
if ParamCount >= 900 then
begin
btRefresh.Click;
end else
begin
StatusBar.SimpleText := 'No params found';
ListView.Enabled := False;
btRefresh.Enabled := False;
end;
end;
end.

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -19,6 +19,7 @@ type
{ Fehlermeldungen }
EParamNotFound = class(Exception);
EInvalidParamIdentifier = class(Exception);
EInvalidParamFormat = class(Exception);
type
{ Hilfsklassen }
@@ -366,15 +367,19 @@ type
FPrefix: String;
FSuffix: String;
FSeperator: String;
{ Methoden }
procedure SetPrefix(Value: String);
procedure SetSuffix(Value: String);
procedure SetSeperator(Value: String);
public
{ Public-Deklarationen }
constructor Create;
destructor Destroy; override;
published
{ Published-Deklarationen }
property Prefix: String read FPrefix write FPrefix;
property Suffix: String read FSuffix write FSuffix;
property Seperator: String read FSeperator write FSeperator;
property Prefix: String read FPrefix write SetPrefix;
property Suffix: String read FSuffix write SetSuffix;
property Seperator: String read FSeperator write SetSeperator;
end;
TParamReference = class(TCollectionItem)
@@ -426,6 +431,8 @@ type
property References: TParamReferences read FReferences write SetReferences;
end;
procedure ListParams(var OutList: TStrings);
procedure Register;
const
@@ -457,6 +464,17 @@ begin
RegisterComponents(ComponentsPage,[TSplashScreen,TProgressBarManager,TListBoxManager,TParamDefiner]);
end;
procedure ListParams(var OutList: TStrings);
var
Index: Integer;
begin
OutList.Clear;
for Index := 0 to ParamCount do
begin
OutList.Add(ParamStr(Index));
end;
end;
{ ----------------------------------------------------------------------------
TSplashObject
---------------------------------------------------------------------------- }
@@ -1445,9 +1463,7 @@ end;
constructor TParamFormat.Create;
begin
inherited;
FPrefix := '[';
FSuffix := ']';
FSeperator := ':';
//...
end;
destructor TParamFormat.Destroy;
@@ -1456,6 +1472,54 @@ begin
inherited;
end;
procedure TParamFormat.SetPrefix(Value: String);
var
Index: Integer;
begin
for Index := 1 to Length(Value) do
begin
if Value[Index] in [#34,#39] then
begin
raise EInvalidParamFormat.Create('Invalid param format for property: "Prefix"');
end else
begin
FPrefix := Value;
end;
end;
end;
procedure TParamFormat.SetSuffix(Value: String);
var
Index: Integer;
begin
for Index := 1 to Length(Value) do
begin
if Value[Index] in [#34,#39] then
begin
raise EInvalidParamFormat.Create('Invalid param format for property: "Suffix"');
end else
begin
FSuffix := Value;
end;
end;
end;
procedure TParamFormat.SetSeperator(Value: String);
var
Index: Integer;
begin
for Index := 1 to Length(Value) do
begin
if Value[Index] in [#34,#39] then
begin
raise EInvalidParamFormat.Create('Invalid param format for property: "Seperator"');
end else
begin
FSeperator := Value;
end;
end;
end;
{ ----------------------------------------------------------------------------
TParamReference
---------------------------------------------------------------------------- }
@@ -1487,7 +1551,7 @@ begin
begin
for Index := 1 to Length(Value) do
begin
if Value[Index] in Spaces then
if (Value[Index] in Spaces) or (Value[Index] in [#34,#39]) then
begin
raise EInvalidParamIdentifier.Create('"' + Value + '" is not a valid identifier value');
end;
@@ -1496,6 +1560,7 @@ begin
begin
raise EInvalidParamIdentifier.Create('"' + Value + '" is not a valid identifier value');
end;
FIdentifier := Value;
end;
procedure TParamReference.Update;
@@ -1518,11 +1583,17 @@ begin
InSep := False;
InDef := False;
ParamItem := ParamStr(ParamIndex);
for CharIndex := 1 to Length(ParamItem) do
CharIndex := 1;
while CharIndex <= Length(ParamItem) do
begin
//[X----]
if InPrefix = True then
begin
if Length(Format.Prefix) = 0 then
begin
InPrefix := False;
Continue;
end;
if ParamItem[CharIndex] = Format.Prefix[CharIndex] then
begin
if CharIndex = Length(Format.Prefix) then
@@ -1538,7 +1609,7 @@ begin
//[----X]
if InSuffix = True then
begin
if ParamItem[CharIndex] = Format.Suffix[CharIndex - Length(Format.Prefix + Identifier + Format.Seperator + Value)] then
if (ParamItem[CharIndex] = Format.Suffix[CharIndex - Length(Format.Prefix + Identifier + Format.Seperator + Value)]) then
begin
if CharIndex = Length(ParamItem) then
begin
@@ -1556,6 +1627,12 @@ begin
//[--X--]
if InSep = True then
begin
if Length(Format.Seperator) = 0 then
begin
InSep := False;
InDef := True;
Continue;
end;
if ParamItem[CharIndex] = Format.Seperator[CharIndex - Length(Format.Prefix + Identifier)] then
begin
if CharIndex = Length(Format.Prefix + Identifier + Format.Seperator) then
@@ -1577,6 +1654,12 @@ begin
begin
InDef := False;
InSuffix := True;
if Length(Format.Suffix) = 0 then
begin
//--> EXIT <--
Connector^ := Value;
Exit;
end;
end;
end else
begin
@@ -1595,7 +1678,8 @@ begin
end;
end;
end;
//For (CharIndex)
Inc(CharIndex);
//While (CharIndex)
end;
//For (ParamIndex)
end;