-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathUnit9.pas
More file actions
76 lines (63 loc) · 1.7 KB
/
Unit9.pas
File metadata and controls
76 lines (63 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
unit Unit9;
interface
uses
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, uSkiaAliveProgress,
FMX.Controls.Presentation, FMX.StdCtrls, FMX.Objects, FMX.Edit, FMX.EditBox,
FMX.SpinBox;
type
TForm9 = class(TForm)
Button1: TButton;
Panel1: TPanel;
Rectangle1: TRectangle;
Rectangle2: TRectangle;
start: TButton;
Button2: TButton;
SpinBox1: TSpinBox;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure SpinBox1Change(Sender: TObject);
procedure startClick(Sender: TObject);
private
{ Private-Deklarationen }
FProgress: TSkiaAliveProgress;
public
{ Public-Deklarationen }
end;
var
Form9: TForm9;
implementation
{$R *.fmx}
procedure TForm9.Button1Click(Sender: TObject);
begin
FProgress.AnimateOut;
end;
procedure TForm9.Button2Click(Sender: TObject);
begin
if FProgress.ProgressMode = pmIndeterminate then begin
FProgress.ProgressMode := pmDeterminate;
Button2.Text := 'Progress';
end
else begin
FProgress.ProgressMode := pmIndeterminate;
Button2.Text := 'Loading';
end;
end;
procedure TForm9.FormShow(Sender: TObject);
begin
FProgress := TSkiaAliveProgress.Create(Self);
FProgress.Parent := Panel1;
FProgress.Align := TAlignLayout.Client;
FProgress.Visible := True;
FProgress.Start;
end;
procedure TForm9.SpinBox1Change(Sender: TObject);
begin
FProgress.XPosition := SpinBox1.Value;
end;
procedure TForm9.startClick(Sender: TObject);
begin
FProgress.AnimateIn;
end;
end.