Стартовый пул
This commit is contained in:
77
bgracontrols/test/test_progress_ring/project1.lpi
Normal file
77
bgracontrols/test/test_progress_ring/project1.lpi
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<Title Value="project1"/>
|
||||
<Scaled Value="True"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
</General>
|
||||
<BuildModes>
|
||||
<Item Name="Default" Default="True"/>
|
||||
</BuildModes>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
<DestinationDirectory Value="$(TestDir)/publishedproject/bcprogressring"/>
|
||||
<OpenInFileMan Value="True"/>
|
||||
<UseFileFilters Value="True"/>
|
||||
</PublishOptions>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
</RunParams>
|
||||
<RequiredPackages>
|
||||
<Item>
|
||||
<PackageName Value="bgracontrols"/>
|
||||
</Item>
|
||||
<Item>
|
||||
<PackageName Value="LCL"/>
|
||||
</Item>
|
||||
</RequiredPackages>
|
||||
<Units>
|
||||
<Unit>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit>
|
||||
<Unit>
|
||||
<Filename Value="bcfluentprogressring.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="BCFluentProgressRing"/>
|
||||
</Unit>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="project1"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf2Set"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
25
bgracontrols/test/test_progress_ring/project1.lpr
Normal file
25
bgracontrols/test/test_progress_ring/project1.lpr
Normal file
@@ -0,0 +1,25 @@
|
||||
program project1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
uses
|
||||
{$IFDEF UNIX}
|
||||
cthreads,
|
||||
{$ENDIF}
|
||||
{$IFDEF HASAMIGA}
|
||||
athreads,
|
||||
{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms, Unit1, BCFluentProgressRing
|
||||
{ you can add units after this };
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
RequireDerivedFormResource:=True;
|
||||
Application.Scaled:=True;
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.Run;
|
||||
end.
|
||||
|
42
bgracontrols/test/test_progress_ring/unit1.lfm
Normal file
42
bgracontrols/test/test_progress_ring/unit1.lfm
Normal file
@@ -0,0 +1,42 @@
|
||||
object Form1: TForm1
|
||||
Left = 560
|
||||
Height = 228
|
||||
Top = 364
|
||||
Width = 454
|
||||
Caption = 'Form1'
|
||||
ClientHeight = 228
|
||||
ClientWidth = 454
|
||||
DesignTimePPI = 120
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '2.2.6.0'
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 216
|
||||
Height = 24
|
||||
Top = 48
|
||||
Width = 117
|
||||
Caption = 'Indeterminate'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 0
|
||||
end
|
||||
object TrackBar1: TTrackBar
|
||||
Left = 208
|
||||
Height = 31
|
||||
Top = 8
|
||||
Width = 237
|
||||
Max = 100
|
||||
OnChange = TrackBar1Change
|
||||
Position = 75
|
||||
TabOrder = 1
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
Left = 216
|
||||
Height = 24
|
||||
Top = 84
|
||||
Width = 78
|
||||
Caption = 'Enabled'
|
||||
Checked = True
|
||||
OnChange = CheckBox2Change
|
||||
State = cbChecked
|
||||
TabOrder = 2
|
||||
end
|
||||
end
|
66
bgracontrols/test/test_progress_ring/unit1.pas
Normal file
66
bgracontrols/test/test_progress_ring/unit1.pas
Normal file
@@ -0,0 +1,66 @@
|
||||
unit Unit1;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls,
|
||||
BCMaterialProgressBarMarquee, BCFluentProgressRing;
|
||||
|
||||
type
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
CheckBox1: TCheckBox;
|
||||
CheckBox2: TCheckBox;
|
||||
TrackBar1: TTrackBar;
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
procedure CheckBox2Change(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure TrackBar1Change(Sender: TObject);
|
||||
private
|
||||
ring: TBCFluentProgressRing;
|
||||
public
|
||||
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
{ TForm1 }
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ring:= TBCFluentProgressRing.Create(self);
|
||||
ring.Width:= 180;
|
||||
ring.Height:= 180;
|
||||
ring.Left:= 10;
|
||||
ring.top:= 10;
|
||||
ring.Value:= 75;
|
||||
ring.Parent:= self;
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.TrackBar1Change(Sender: TObject);
|
||||
begin
|
||||
ring.Value:= TrackBar1.Position;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox1Change(Sender: TObject);
|
||||
begin
|
||||
ring.Indeterminate:= CheckBox1.Checked;
|
||||
end;
|
||||
|
||||
procedure TForm1.CheckBox2Change(Sender: TObject);
|
||||
begin
|
||||
ring.Enabled:= CheckBox2.Checked;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user