Стартовый пул
This commit is contained in:
162
ANB ST CP/Demo/ParamsMngr/Demo.lpi
Normal file
162
ANB ST CP/Demo/ParamsMngr/Demo.lpi
Normal file
@@ -0,0 +1,162 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
<MainUnitHasUsesSectionForAllUnits Value="False"/>
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="Demo"/>
|
||||
<UseAppBundle Value="False"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="2">
|
||||
<Item1 Name="Win32" Default="True"/>
|
||||
<Item2 Name="Win64">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="Win64\Demo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="data;$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="data"/>
|
||||
<UnitOutputDirectory Value="data\lib\Win64\"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<SyntaxMode Value="Delphi"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<TargetCPU Value="x86_64"/>
|
||||
<TargetOS Value="win64"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
<StripSymbols Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="2">
|
||||
<Item1>
|
||||
<PackageName Value="ANBSTCP"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item2>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="Demo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="data\DemoMainForm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="DemoMainFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="DemoMainForm"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="Win32\Demo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="data;$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="data"/>
|
||||
<UnitOutputDirectory Value="data\lib\Win32\"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<SyntaxMode Value="Delphi"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<TargetCPU Value="i386"/>
|
||||
<TargetOS Value="win32"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="3"/>
|
||||
</Optimizations>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
<StripSymbols Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<MsgFileName Value=""/>
|
||||
</CompilerMessages>
|
||||
<CustomOptions Value="-dBorland -dVer150 -dDelphi7 -dCompiler6_Up -dPUREPASCAL"/>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
12
ANB ST CP/Demo/ParamsMngr/Demo.lpr
Normal file
12
ANB ST CP/Demo/ParamsMngr/Demo.lpr
Normal file
@@ -0,0 +1,12 @@
|
||||
program Demo;
|
||||
{$MODE Delphi}
|
||||
{$codepage UTF8}
|
||||
uses Forms, Interfaces,
|
||||
DemoMainForm in 'data\DemoMainForm.pas' {DemoMainFrm};
|
||||
{$R *.res}
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.MainFormOnTaskbar := True;
|
||||
Application.CreateForm(TDemoMainFrm, DemoMainFrm);
|
||||
Application.Run;
|
||||
end.
|
63
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.lfm
Normal file
63
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.lfm
Normal file
@@ -0,0 +1,63 @@
|
||||
object DemoMainFrm: TDemoMainFrm
|
||||
Left = 642
|
||||
Height = 172
|
||||
Top = 381
|
||||
Width = 326
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'DEMO -- ParamsMngr'
|
||||
ClientHeight = 172
|
||||
ClientWidth = 326
|
||||
Color = clBtnFace
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Color = clWindowText
|
||||
Font.Height = -15
|
||||
Font.Name = 'Times New Roman'
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.2.2.0'
|
||||
object TestSParam: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 16
|
||||
Width = 310
|
||||
Caption = '/s param test'
|
||||
OnClick = TestSParamClick
|
||||
TabOrder = 0
|
||||
end
|
||||
object TestTestParam: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 47
|
||||
Width = 310
|
||||
Caption = '/test param test'
|
||||
OnClick = TestTestParamClick
|
||||
TabOrder = 1
|
||||
end
|
||||
object TestVParamValue: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 78
|
||||
Width = 310
|
||||
Caption = '/v param value test'
|
||||
OnClick = TestVParamValueClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object TestMSGParamValue: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 109
|
||||
Width = 310
|
||||
Caption = '/msg param value test'
|
||||
OnClick = TestMSGParamValueClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object ExitBtn: TButton
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 140
|
||||
Width = 310
|
||||
Caption = '&Exit'
|
||||
OnClick = ExitBtnClick
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
56
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.pas
Normal file
56
ANB ST CP/Demo/ParamsMngr/data/DemoMainForm.pas
Normal file
@@ -0,0 +1,56 @@
|
||||
unit DemoMainForm;
|
||||
{$MODE Delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses LCLIntf, LCLType, LMessages, Messages, SysUtils, Variants, Classes,
|
||||
Graphics, Controls, Forms, Dialogs, StdCtrls, ParamsMngr;
|
||||
type
|
||||
TDemoMainFrm = class(TForm)
|
||||
TestSParam: TButton;
|
||||
TestTestParam: TButton;
|
||||
TestVParamValue: TButton;
|
||||
TestMSGParamValue: TButton;
|
||||
ExitBtn: TButton;
|
||||
procedure ExitBtnClick(Sender: TObject);
|
||||
procedure TestSParamClick(Sender: TObject);
|
||||
procedure TestTestParamClick(Sender: TObject);
|
||||
procedure TestVParamValueClick(Sender: TObject);
|
||||
procedure TestMSGParamValueClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
var
|
||||
DemoMainFrm: TDemoMainFrm;
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
procedure ShowDLG (const ATitle, AMessage: string);
|
||||
begin
|
||||
Application.MessageBox(pchar(AMessage), pchar(ATitle), MB_ICONASTERISK);
|
||||
end;
|
||||
procedure TDemoMainFrm.ExitBtnClick(Sender: TObject);
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
procedure TDemoMainFrm.TestMSGParamValueClick(Sender: TObject);
|
||||
begin
|
||||
if HasParam(StartParams, 'msg') then
|
||||
ShowDLG(TestMSGParamValue.Caption, GetParamValue(StartParams, 'msg'))
|
||||
else
|
||||
ShowDLG(TestMSGParamValue.Caption, 'Param "/msg" not founded!');
|
||||
end;
|
||||
procedure TDemoMainFrm.TestSParamClick(Sender: TObject);
|
||||
begin
|
||||
ShowDLG(TestSParam.Caption, BoolToStr(HasParam(StartParams, 's'), true));
|
||||
end;
|
||||
procedure TDemoMainFrm.TestTestParamClick(Sender: TObject);
|
||||
begin
|
||||
ShowDLG(TestTestParam.Caption, BoolToStr(HasParam(StartParams, 'test'), true));
|
||||
end;
|
||||
procedure TDemoMainFrm.TestVParamValueClick(Sender: TObject);
|
||||
begin
|
||||
if HasParam(StartParams, 'v') then
|
||||
ShowDLG(TestVParamValue.Caption, GetParamValue(StartParams, 'v'))
|
||||
else
|
||||
ShowDLG(TestVParamValue.Caption, 'Param "/v" not founded!');
|
||||
end;
|
||||
end.
|
Reference in New Issue
Block a user