Стартовый пул
This commit is contained in:
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