Стартовый пул
This commit is contained in:
111
ANB ST CP/Demo/JSON/JSONFontDemo/data/MainForm.lfm
Normal file
111
ANB ST CP/Demo/JSON/JSONFontDemo/data/MainForm.lfm
Normal file
@@ -0,0 +1,111 @@
|
||||
object MainFrm: TMainFrm
|
||||
Left = 603
|
||||
Height = 297
|
||||
Top = 302
|
||||
Width = 559
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'JSON Font Demo'
|
||||
ClientHeight = 297
|
||||
ClientWidth = 559
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.6.4.0'
|
||||
object JSONFileNameEd: TFileNameEdit
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 32
|
||||
Width = 528
|
||||
Filter = 'JSON File (*.json)|*.json'
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
Flat = True
|
||||
FocusOnButtonClick = True
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object JSONFileNameEdLbl: TLabel
|
||||
Left = 16
|
||||
Height = 17
|
||||
Top = 8
|
||||
Width = 72
|
||||
Caption = '&Имя файла:'
|
||||
ParentColor = False
|
||||
end
|
||||
object KeyEdt: TLabeledEdit
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 88
|
||||
Width = 528
|
||||
EditLabel.AnchorSideLeft.Control = KeyEdt
|
||||
EditLabel.AnchorSideRight.Control = KeyEdt
|
||||
EditLabel.AnchorSideRight.Side = asrBottom
|
||||
EditLabel.AnchorSideBottom.Control = KeyEdt
|
||||
EditLabel.Left = 16
|
||||
EditLabel.Height = 17
|
||||
EditLabel.Top = 68
|
||||
EditLabel.Width = 528
|
||||
EditLabel.Caption = '&Ключ:'
|
||||
EditLabel.ParentColor = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object ExitBtn: TButton
|
||||
Left = 432
|
||||
Height = 25
|
||||
Top = 256
|
||||
Width = 112
|
||||
Caption = 'В&ыход'
|
||||
Default = True
|
||||
OnClick = ExitBtnClick
|
||||
TabOrder = 2
|
||||
end
|
||||
object WriteBtn: TButton
|
||||
Left = 296
|
||||
Height = 25
|
||||
Top = 256
|
||||
Width = 131
|
||||
Caption = '&Записать'
|
||||
OnClick = WriteBtnClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object FontDemoLbl: TLabel
|
||||
Left = 16
|
||||
Height = 56
|
||||
Top = 136
|
||||
Width = 528
|
||||
AutoSize = False
|
||||
Caption = 'Это пример шрифта'
|
||||
ParentColor = False
|
||||
end
|
||||
object ReadBtn: TButton
|
||||
Left = 160
|
||||
Height = 25
|
||||
Top = 256
|
||||
Width = 131
|
||||
Caption = '&Прочитать'
|
||||
OnClick = ReadBtnClick
|
||||
TabOrder = 4
|
||||
end
|
||||
object SelectFontBtn: TButton
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 203
|
||||
Width = 528
|
||||
Caption = 'В&ыбрать шрифт'
|
||||
OnClick = SelectFontBtnClick
|
||||
TabOrder = 5
|
||||
end
|
||||
object FontDialog: TFontDialog
|
||||
MinFontSize = 0
|
||||
MaxFontSize = 0
|
||||
left = 440
|
||||
top = 8
|
||||
end
|
||||
end
|
69
ANB ST CP/Demo/JSON/JSONFontDemo/data/MainForm.pas
Normal file
69
ANB ST CP/Demo/JSON/JSONFontDemo/data/MainForm.pas
Normal file
@@ -0,0 +1,69 @@
|
||||
unit MainForm;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, EditBtn, windows, SimplyJSON;
|
||||
type
|
||||
{ TMainFrm }
|
||||
TMainFrm = class(TForm)
|
||||
FontDialog: TFontDialog;
|
||||
SelectFontBtn: TButton;
|
||||
FontDemoLbl: TLabel;
|
||||
WriteBtn: TButton;
|
||||
ExitBtn: TButton;
|
||||
JSONFileNameEd: TFileNameEdit;
|
||||
JSONFileNameEdLbl: TLabel;
|
||||
KeyEdt: TLabeledEdit;
|
||||
ReadBtn: TButton;
|
||||
procedure ExitBtnClick(Sender: TObject);
|
||||
procedure ReadBtnClick(Sender: TObject);
|
||||
procedure SelectFontBtnClick(Sender: TObject);
|
||||
procedure WriteBtnClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
function CheckReqs: Boolean;
|
||||
end;
|
||||
var
|
||||
MainFrm: TMainFrm;
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
{ TMainFrm }
|
||||
function TMainFrm.CheckReqs: Boolean;
|
||||
begin
|
||||
Result:= True;
|
||||
if Trim(JSONFileNameEd.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox(PChar('Поле "Имя файла" не заполнено!'), PChar('Ошибка!'), MB_ICONERROR);
|
||||
Result:= False;
|
||||
end;
|
||||
if Trim(KeyEdt.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox(PChar('Поле "Ключ" не заполнено!'), PChar('Ошибка!'), MB_ICONERROR);
|
||||
Result:= False;
|
||||
end;
|
||||
end;
|
||||
procedure TMainFrm.ExitBtnClick(Sender: TObject);
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
procedure TMainFrm.ReadBtnClick(Sender: TObject);
|
||||
begin
|
||||
if not CheckReqs then
|
||||
Exit;
|
||||
FontDemoLbl.Font:= JSReadFont(KeyEdt.Text, FontDemoLbl.Font, JSONFileNameEd.Text);
|
||||
Application.MessageBox(PChar('Шрифт загружен из файла!'), PChar('Информация'), MB_ICONASTERISK);
|
||||
end;
|
||||
procedure TMainFrm.SelectFontBtnClick(Sender: TObject);
|
||||
begin
|
||||
FontDialog.Font:= FontDemoLbl.Font;
|
||||
if FontDialog.Execute then
|
||||
FontDemoLbl.Font:= FontDialog.Font;
|
||||
end;
|
||||
procedure TMainFrm.WriteBtnClick(Sender: TObject);
|
||||
begin
|
||||
if not CheckReqs then
|
||||
Exit;
|
||||
JSWriteFont(KeyEdt.Text, FontDemoLbl.Font, JSONFileNameEd.Text);
|
||||
Application.MessageBox(PChar('Шрифт записан в файл!'), PChar('Информация'), MB_ICONASTERISK);
|
||||
end;
|
||||
end.
|
BIN
ANB ST CP/Demo/JSON/JSONFontDemo/jsonfontdemo.ico
Normal file
BIN
ANB ST CP/Demo/JSON/JSONFontDemo/jsonfontdemo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
114
ANB ST CP/Demo/JSON/JSONFontDemo/jsonfontdemo.lpi
Normal file
114
ANB ST CP/Demo/JSON/JSONFontDemo/jsonfontdemo.lpi
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="10"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="JSON Font Demo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<MinorVersionNr Value="5"/>
|
||||
<RevisionNr Value="1"/>
|
||||
<BuildNr Value="5"/>
|
||||
<Language Value="0419"/>
|
||||
<StringTable CompanyName="Alexander Babaev" FileDescription="BGPlus Backups Creator" InternalName="BC" LegalCopyright="Alexander Babaev" LegalTrademarks="Alexander Babaev" OriginalFilename="BGPlus BC" ProductName="BGPlus Manager" ProductVersion="0.5"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Win32" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="ANBSTCP"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="jsonfontdemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="data\MainForm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="jsonfontdemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(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="4"/>
|
||||
</Optimizations>
|
||||
<SmallerCode Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
11
ANB ST CP/Demo/JSON/JSONFontDemo/jsonfontdemo.lpr
Normal file
11
ANB ST CP/Demo/JSON/JSONFontDemo/jsonfontdemo.lpr
Normal file
@@ -0,0 +1,11 @@
|
||||
program jsonfontdemo;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
uses Interfaces, Forms, lazcontrols, MainForm;
|
||||
{$R *.res}
|
||||
begin
|
||||
Application.Title:= 'JSON Font Demo';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainFrm, MainFrm);
|
||||
Application.Run;
|
||||
end.
|
104
ANB ST CP/Demo/JSON/JSONReader/data/MainForm.lfm
Normal file
104
ANB ST CP/Demo/JSON/JSONReader/data/MainForm.lfm
Normal file
@@ -0,0 +1,104 @@
|
||||
object MainFrm: TMainFrm
|
||||
Left = 603
|
||||
Height = 221
|
||||
Top = 302
|
||||
Width = 559
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'JSON Reader'
|
||||
ClientHeight = 221
|
||||
ClientWidth = 559
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.6.0.1'
|
||||
object JSONFileNameEd: TFileNameEdit
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 32
|
||||
Width = 528
|
||||
Filter = 'JSON File (*.json)|*.json'
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
Flat = True
|
||||
FocusOnButtonClick = True
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object JSONFileNameEdLbl: TLabel
|
||||
Left = 16
|
||||
Height = 17
|
||||
Top = 8
|
||||
Width = 72
|
||||
Caption = '&Имя файла:'
|
||||
ParentColor = False
|
||||
end
|
||||
object KeyEdt: TLabeledEdit
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 88
|
||||
Width = 528
|
||||
EditLabel.AnchorSideLeft.Control = KeyEdt
|
||||
EditLabel.AnchorSideRight.Control = KeyEdt
|
||||
EditLabel.AnchorSideRight.Side = asrBottom
|
||||
EditLabel.AnchorSideBottom.Control = KeyEdt
|
||||
EditLabel.Left = 16
|
||||
EditLabel.Height = 17
|
||||
EditLabel.Top = 68
|
||||
EditLabel.Width = 528
|
||||
EditLabel.Caption = '&Ключ:'
|
||||
EditLabel.ParentColor = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object RecTypeEd: TRadioGroup
|
||||
Left = 16
|
||||
Height = 48
|
||||
Top = 128
|
||||
Width = 528
|
||||
AutoFill = True
|
||||
Caption = '&Тип:'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 26
|
||||
ClientWidth = 524
|
||||
Columns = 3
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Строка'
|
||||
'Число'
|
||||
'Правда/Ложь'
|
||||
)
|
||||
TabOrder = 2
|
||||
end
|
||||
object ExitBtn: TButton
|
||||
Left = 432
|
||||
Height = 25
|
||||
Top = 184
|
||||
Width = 112
|
||||
Caption = 'В&ыход'
|
||||
Default = True
|
||||
OnClick = ExitBtnClick
|
||||
TabOrder = 3
|
||||
end
|
||||
object ReadBtn: TButton
|
||||
Left = 296
|
||||
Height = 25
|
||||
Top = 184
|
||||
Width = 131
|
||||
Caption = '&Прочитать'
|
||||
OnClick = ReadBtnClick
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
64
ANB ST CP/Demo/JSON/JSONReader/data/MainForm.pas
Normal file
64
ANB ST CP/Demo/JSON/JSONReader/data/MainForm.pas
Normal file
@@ -0,0 +1,64 @@
|
||||
unit MainForm;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, EditBtn, ComCtrls, Spin,
|
||||
windows, SimplyJSON;
|
||||
type
|
||||
{ TMainFrm }
|
||||
TMainFrm = class(TForm)
|
||||
ReadBtn: TButton;
|
||||
ExitBtn: TButton;
|
||||
JSONFileNameEd: TFileNameEdit;
|
||||
JSONFileNameEdLbl: TLabel;
|
||||
KeyEdt: TLabeledEdit;
|
||||
RecTypeEd: TRadioGroup;
|
||||
procedure ExitBtnClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure ReadBtnClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
var
|
||||
MainFrm: TMainFrm;
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
{ TMainFrm }
|
||||
procedure TMainFrm.ExitBtnClick(Sender: TObject);
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
procedure TMainFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
RecTypeEd.ItemIndex:= 0;
|
||||
end;
|
||||
procedure TMainFrm.ReadBtnClick(Sender: TObject);
|
||||
var STitle, SMsg: String;
|
||||
begin
|
||||
if Trim(JSONFileNameEd.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox(PChar('Поле "Имя файла" не заполнено!'), PChar('Ошибка!'), MB_ICONERROR);
|
||||
Abort;
|
||||
end;
|
||||
if Trim(KeyEdt.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox(PChar('Поле "Ключ" не заполнено!'), PChar('Ошибка!'), MB_ICONERROR);
|
||||
Abort;
|
||||
end;
|
||||
case RecTypeEd.ItemIndex of
|
||||
0: begin
|
||||
STitle:= 'Строка';
|
||||
SMsg:= JSReadString(KeyEdt.Text, '???', JSONFileNameEd.Text);
|
||||
end;
|
||||
1: begin
|
||||
STitle:= 'Число';
|
||||
SMsg:= IntToStr(JSReadInteger(KeyEdt.Text, 0, JSONFileNameEd.Text));
|
||||
end;
|
||||
2: begin
|
||||
STitle:= 'Правда/Ложь';
|
||||
SMsg:= BoolToStr(JSReadBoolean(KeyEdt.Text, False, JSONFileNameEd.Text), 'Правда', 'Ложь');
|
||||
end;
|
||||
end;
|
||||
Application.MessageBox(PChar(SMsg), PChar(STitle), MB_ICONASTERISK);
|
||||
end;
|
||||
end.
|
BIN
ANB ST CP/Demo/JSON/JSONReader/jsonreader.ico
Normal file
BIN
ANB ST CP/Demo/JSON/JSONReader/jsonreader.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
114
ANB ST CP/Demo/JSON/JSONReader/jsonreader.lpi
Normal file
114
ANB ST CP/Demo/JSON/JSONReader/jsonreader.lpi
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="JSONReader Demo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<MinorVersionNr Value="5"/>
|
||||
<RevisionNr Value="1"/>
|
||||
<BuildNr Value="5"/>
|
||||
<Language Value="0419"/>
|
||||
<StringTable CompanyName="Alexander Babaev" FileDescription="BGPlus Backups Creator" InternalName="BC" LegalCopyright="Alexander Babaev" LegalTrademarks="Alexander Babaev" OriginalFilename="BGPlus BC" ProductName="BGPlus Manager" ProductVersion="0.5"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Win32" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="ANBSTCP"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="jsonreader.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="data\MainForm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="jsonreader"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(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="4"/>
|
||||
</Optimizations>
|
||||
<SmallerCode Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
11
ANB ST CP/Demo/JSON/JSONReader/jsonreader.lpr
Normal file
11
ANB ST CP/Demo/JSON/JSONReader/jsonreader.lpr
Normal file
@@ -0,0 +1,11 @@
|
||||
program jsonreader;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
uses Interfaces, Forms, lazcontrols, MainForm;
|
||||
{$R *.res}
|
||||
begin
|
||||
Application.Title:='JSONReader Demo';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainFrm, MainFrm);
|
||||
Application.Run;
|
||||
end.
|
170
ANB ST CP/Demo/JSON/JSONWriter/data/MainForm.lfm
Normal file
170
ANB ST CP/Demo/JSON/JSONWriter/data/MainForm.lfm
Normal file
@@ -0,0 +1,170 @@
|
||||
object MainFrm: TMainFrm
|
||||
Left = 603
|
||||
Height = 297
|
||||
Top = 302
|
||||
Width = 559
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'JSON Writer'
|
||||
ClientHeight = 297
|
||||
ClientWidth = 559
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.6.0.1'
|
||||
object JSONFileNameEd: TFileNameEdit
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 32
|
||||
Width = 528
|
||||
Filter = 'JSON File (*.json)|*.json'
|
||||
FilterIndex = 0
|
||||
HideDirectories = False
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
Flat = True
|
||||
FocusOnButtonClick = True
|
||||
MaxLength = 0
|
||||
TabOrder = 0
|
||||
end
|
||||
object JSONFileNameEdLbl: TLabel
|
||||
Left = 16
|
||||
Height = 17
|
||||
Top = 8
|
||||
Width = 72
|
||||
Caption = '&Имя файла:'
|
||||
ParentColor = False
|
||||
end
|
||||
object KeyEdt: TLabeledEdit
|
||||
Left = 16
|
||||
Height = 25
|
||||
Top = 88
|
||||
Width = 528
|
||||
EditLabel.AnchorSideLeft.Control = KeyEdt
|
||||
EditLabel.AnchorSideRight.Control = KeyEdt
|
||||
EditLabel.AnchorSideRight.Side = asrBottom
|
||||
EditLabel.AnchorSideBottom.Control = KeyEdt
|
||||
EditLabel.Left = 16
|
||||
EditLabel.Height = 17
|
||||
EditLabel.Top = 68
|
||||
EditLabel.Width = 528
|
||||
EditLabel.Caption = '&Ключ:'
|
||||
EditLabel.ParentColor = False
|
||||
TabOrder = 1
|
||||
end
|
||||
object RecTypeEd: TRadioGroup
|
||||
Left = 16
|
||||
Height = 48
|
||||
Top = 128
|
||||
Width = 528
|
||||
AutoFill = True
|
||||
Caption = '&Тип:'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
ChildSizing.EnlargeVertical = crsHomogenousChildResize
|
||||
ChildSizing.ShrinkHorizontal = crsScaleChilds
|
||||
ChildSizing.ShrinkVertical = crsScaleChilds
|
||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||
ChildSizing.ControlsPerLine = 3
|
||||
ClientHeight = 26
|
||||
ClientWidth = 524
|
||||
Columns = 3
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Строка'
|
||||
'Число'
|
||||
'Правда/Ложь'
|
||||
)
|
||||
OnSelectionChanged = RecTypeEdSelectionChanged
|
||||
TabOrder = 2
|
||||
end
|
||||
object ValuePages: TPageControl
|
||||
Left = 16
|
||||
Height = 48
|
||||
Top = 200
|
||||
Width = 528
|
||||
ActivePage = StringSht
|
||||
ShowTabs = False
|
||||
TabIndex = 0
|
||||
TabOrder = 3
|
||||
object StringSht: TTabSheet
|
||||
Caption = 'StringSht'
|
||||
ClientHeight = 40
|
||||
ClientWidth = 520
|
||||
object sValueEd: TEdit
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 504
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object IntegerSht: TTabSheet
|
||||
Caption = 'IntegerSht'
|
||||
ClientHeight = 40
|
||||
ClientWidth = 520
|
||||
object iValueEd: TSpinEdit
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 498
|
||||
Alignment = taRightJustify
|
||||
MaxValue = 2147483647
|
||||
MinValue = -2147483648
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
||||
object BooleanSht: TTabSheet
|
||||
Caption = 'BooleanSht'
|
||||
ClientHeight = 40
|
||||
ClientWidth = 520
|
||||
object bValueEd: TComboBox
|
||||
Left = 8
|
||||
Height = 25
|
||||
Top = 8
|
||||
Width = 496
|
||||
ItemHeight = 17
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Правда'
|
||||
'Ложь'
|
||||
)
|
||||
Style = csDropDownList
|
||||
TabOrder = 0
|
||||
Text = 'Правда'
|
||||
end
|
||||
end
|
||||
end
|
||||
object ValueEdLbl: TLabel
|
||||
Left = 16
|
||||
Height = 17
|
||||
Top = 183
|
||||
Width = 115
|
||||
Caption = '&Введите значение:'
|
||||
ParentColor = False
|
||||
end
|
||||
object ExitBtn: TButton
|
||||
Left = 432
|
||||
Height = 25
|
||||
Top = 256
|
||||
Width = 112
|
||||
Caption = 'В&ыход'
|
||||
Default = True
|
||||
OnClick = ExitBtnClick
|
||||
TabOrder = 4
|
||||
end
|
||||
object WriteBtn: TButton
|
||||
Left = 296
|
||||
Height = 25
|
||||
Top = 256
|
||||
Width = 131
|
||||
Caption = '&Записать'
|
||||
OnClick = WriteBtnClick
|
||||
TabOrder = 5
|
||||
end
|
||||
end
|
72
ANB ST CP/Demo/JSON/JSONWriter/data/MainForm.pas
Normal file
72
ANB ST CP/Demo/JSON/JSONWriter/data/MainForm.pas
Normal file
@@ -0,0 +1,72 @@
|
||||
unit MainForm;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls, EditBtn, ComCtrls, Spin,
|
||||
windows, SimplyJSON;
|
||||
type
|
||||
{ TMainFrm }
|
||||
TMainFrm = class(TForm)
|
||||
WriteBtn: TButton;
|
||||
ExitBtn: TButton;
|
||||
bValueEd: TComboBox;
|
||||
iValueEd: TSpinEdit;
|
||||
sValueEd: TEdit;
|
||||
JSONFileNameEd: TFileNameEdit;
|
||||
JSONFileNameEdLbl: TLabel;
|
||||
KeyEdt: TLabeledEdit;
|
||||
BooleanSht: TTabSheet;
|
||||
ValueEdLbl: TLabel;
|
||||
StringSht: TTabSheet;
|
||||
IntegerSht: TTabSheet;
|
||||
ValuePages: TPageControl;
|
||||
RecTypeEd: TRadioGroup;
|
||||
procedure ExitBtnClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure RecTypeEdSelectionChanged(Sender: TObject);
|
||||
procedure WriteBtnClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
end;
|
||||
var
|
||||
MainFrm: TMainFrm;
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
{ TMainFrm }
|
||||
procedure TMainFrm.ExitBtnClick(Sender: TObject);
|
||||
begin
|
||||
Application.Terminate;
|
||||
end;
|
||||
procedure TMainFrm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
RecTypeEd.ItemIndex:= 0;
|
||||
ValuePages.ActivePage:= StringSht;
|
||||
end;
|
||||
procedure TMainFrm.RecTypeEdSelectionChanged(Sender: TObject);
|
||||
begin
|
||||
case RecTypeEd.ItemIndex of
|
||||
0: ValuePages.ActivePage:= StringSht;
|
||||
1: ValuePages.ActivePage:= IntegerSht;
|
||||
2: ValuePages.ActivePage:= BooleanSht;
|
||||
end;
|
||||
end;
|
||||
procedure TMainFrm.WriteBtnClick(Sender: TObject);
|
||||
begin
|
||||
if Trim(JSONFileNameEd.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox(PChar('Поле "Имя файла" не заполнено!'), PChar('Ошибка!'), MB_ICONERROR);
|
||||
Abort;
|
||||
end;
|
||||
if Trim(KeyEdt.Text) = '' then
|
||||
begin
|
||||
Application.MessageBox(PChar('Поле "Ключ" не заполнено!'), PChar('Ошибка!'), MB_ICONERROR);
|
||||
Abort;
|
||||
end;
|
||||
case RecTypeEd.ItemIndex of
|
||||
0: JSWriteString(KeyEdt.Text, sValueEd.Text, JSONFileNameEd.Text);
|
||||
1: JSWriteInteger(KeyEdt.Text, iValueEd.Value, JSONFileNameEd.Text);
|
||||
2: JSWriteBoolean(KeyEdt.Text, (bValueEd.ItemIndex = 0), JSONFileNameEd.Text);
|
||||
end;
|
||||
Application.MessageBox(PChar('Выполнено!'), PChar('Информация'), MB_ICONASTERISK);
|
||||
end;
|
||||
end.
|
BIN
ANB ST CP/Demo/JSON/JSONWriter/jsonwriter.ico
Normal file
BIN
ANB ST CP/Demo/JSON/JSONWriter/jsonwriter.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
114
ANB ST CP/Demo/JSON/JSONWriter/jsonwriter.lpi
Normal file
114
ANB ST CP/Demo/JSON/JSONWriter/jsonwriter.lpi
Normal file
@@ -0,0 +1,114 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="JSONWriter Demo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<MinorVersionNr Value="5"/>
|
||||
<RevisionNr Value="1"/>
|
||||
<BuildNr Value="5"/>
|
||||
<Language Value="0419"/>
|
||||
<StringTable CompanyName="Alexander Babaev" FileDescription="BGPlus Backups Creator" InternalName="BC" LegalCopyright="Alexander Babaev" LegalTrademarks="Alexander Babaev" OriginalFilename="BGPlus BC" ProductName="BGPlus Manager" ProductVersion="0.5"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Win32" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<local>
|
||||
<FormatVersion Value="1"/>
|
||||
</local>
|
||||
</RunParams>
|
||||
<RequiredPackages Count="3">
|
||||
<Item1>
|
||||
<PackageName Value="ANBSTCP"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<PackageName Value="LazControls"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="2">
|
||||
<Unit0>
|
||||
<Filename Value="jsonwriter.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="data\MainForm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainFrm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="jsonwriter"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(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="4"/>
|
||||
</Optimizations>
|
||||
<SmallerCode Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
<Item1>
|
||||
<Name Value="EAbort"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Name Value="ECodetoolError"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Name Value="EFOpenError"/>
|
||||
</Item3>
|
||||
</Exceptions>
|
||||
</Debugging>
|
||||
</CONFIG>
|
11
ANB ST CP/Demo/JSON/JSONWriter/jsonwriter.lpr
Normal file
11
ANB ST CP/Demo/JSON/JSONWriter/jsonwriter.lpr
Normal file
@@ -0,0 +1,11 @@
|
||||
program jsonwriter;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
uses Interfaces, Forms, lazcontrols, MainForm;
|
||||
{$R *.res}
|
||||
begin
|
||||
Application.Title:= 'JSONWriter Demo';
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainFrm, MainFrm);
|
||||
Application.Run;
|
||||
end.
|
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.
|
59
ANB ST CP/Demo/WaitDemo/sources/data/MainForm.lfm
Normal file
59
ANB ST CP/Demo/WaitDemo/sources/data/MainForm.lfm
Normal file
@@ -0,0 +1,59 @@
|
||||
object MainFrm: TMainFrm
|
||||
Left = 301
|
||||
Height = 154
|
||||
Top = 148
|
||||
Width = 397
|
||||
BorderIcons = [biSystemMenu]
|
||||
BorderStyle = bsSingle
|
||||
Caption = 'Wait DEMO'
|
||||
ClientHeight = 154
|
||||
ClientWidth = 397
|
||||
Font.CharSet = RUSSIAN_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = 'Times New Roman'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
LCLVersion = '1.6.0.4'
|
||||
object WaitingIntro: TLabel
|
||||
Left = 10
|
||||
Height = 17
|
||||
Top = 10
|
||||
Width = 377
|
||||
Align = alTop
|
||||
BorderSpacing.Around = 10
|
||||
Caption = '&We waiting (sec):'
|
||||
ParentColor = False
|
||||
end
|
||||
object WaitingSec: TLabel
|
||||
Left = 10
|
||||
Height = 72
|
||||
Top = 37
|
||||
Width = 377
|
||||
Align = alClient
|
||||
Alignment = taCenter
|
||||
BorderSpacing.Around = 10
|
||||
Caption = '&Press "wait 5 sec"...'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
Font.Color = clBlack
|
||||
Font.Height = -15
|
||||
Font.Name = 'Old English Text MT'
|
||||
Font.Pitch = fpVariable
|
||||
Font.Quality = fqDraft
|
||||
Font.Style = [fsBold]
|
||||
Layout = tlCenter
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
end
|
||||
object WaitBtn: TButton
|
||||
Left = 10
|
||||
Height = 25
|
||||
Top = 119
|
||||
Width = 377
|
||||
Align = alBottom
|
||||
BorderSpacing.Around = 10
|
||||
Caption = '&Wait 5 sec'
|
||||
OnClick = WaitBtnClick
|
||||
TabOrder = 0
|
||||
end
|
||||
end
|
41
ANB ST CP/Demo/WaitDemo/sources/data/MainForm.pas
Normal file
41
ANB ST CP/Demo/WaitDemo/sources/data/MainForm.pas
Normal file
@@ -0,0 +1,41 @@
|
||||
unit MainForm;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
interface
|
||||
uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, VCLEx;
|
||||
type
|
||||
{ TMainFrm }
|
||||
TMainFrm = class(TForm)
|
||||
WaitBtn: TButton;
|
||||
WaitingSec: TLabel;
|
||||
WaitingIntro: TLabel;
|
||||
procedure WaitBtnClick(Sender: TObject);
|
||||
private
|
||||
public
|
||||
CurWait, OldS, NewS: Int64;
|
||||
end;
|
||||
var
|
||||
MainFrm: TMainFrm;
|
||||
implementation
|
||||
{$R *.lfm}
|
||||
{ TMainFrm }
|
||||
procedure TMainFrm.WaitBtnClick(Sender: TObject);
|
||||
procedure OnWait;
|
||||
begin
|
||||
MainFrm.CurWait:= MainFrm.CurWait + 1;
|
||||
MainFrm.NewS:= MainFrm.CurWait div 1000;
|
||||
if MainFrm.NewS > MainFrm.OldS then
|
||||
begin
|
||||
MainFrm.WaitingSec.Caption:= IntToStr(MainFrm.NewS);
|
||||
MainFrm.OldS:= MainFrm.NewS;
|
||||
end;
|
||||
Application.ProcessMessages;
|
||||
end;
|
||||
begin
|
||||
OldS:= 0;
|
||||
CurWait:= 0;
|
||||
WaitingSec.Caption:= '0';
|
||||
WaitEx(5000, @OnWait);
|
||||
WaitingSec.Caption:= '&Stoped...';
|
||||
end;
|
||||
end.
|
BIN
ANB ST CP/Demo/WaitDemo/sources/wdemo.ico
Normal file
BIN
ANB ST CP/Demo/WaitDemo/sources/wdemo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 KiB |
96
ANB ST CP/Demo/WaitDemo/sources/wdemo.lpi
Normal file
96
ANB ST CP/Demo/WaitDemo/sources/wdemo.lpi
Normal file
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="Wait Demo"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<i18n>
|
||||
<EnableI18N LFM="False"/>
|
||||
</i18n>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="1">
|
||||
<Item1 Name="Default" Default="True"/>
|
||||
</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="wdemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="data\MainForm.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainFrm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="..\output\wdemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<OtherUnitFiles Value="data"/>
|
||||
<UnitOutputDirectory Value="data\lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<CodeGeneration>
|
||||
<SmartLinkUnit Value="True"/>
|
||||
<Optimizations>
|
||||
<OptimizationLevel Value="4"/>
|
||||
</Optimizations>
|
||||
<SmallerCode Value="True"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<StripSymbols Value="True"/>
|
||||
<UseExternalDbgSyms Value="True"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</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/WaitDemo/sources/wdemo.lpr
Normal file
12
ANB ST CP/Demo/WaitDemo/sources/wdemo.lpr
Normal file
@@ -0,0 +1,12 @@
|
||||
program wdemo;
|
||||
{$mode delphi}
|
||||
{$codepage UTF8}
|
||||
uses Interfaces, Forms, MainForm;
|
||||
{$R *.res}
|
||||
begin
|
||||
Application.Title:='Wait Demo';
|
||||
RequireDerivedFormResource:= True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TMainFrm, MainFrm);
|
||||
Application.Run;
|
||||
end.
|
Reference in New Issue
Block a user