-
Notifications
You must be signed in to change notification settings - Fork 6
/
frameEditSite.pas
52 lines (45 loc) · 1.13 KB
/
frameEditSite.pas
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
unit frameEditSite;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes,
Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Mask,
Vcl.ExtCtrls, Skia, Skia.Vcl;
type
TFrame1 = class(TFrame)
lblName: TLabeledEdit;
lblURL: TLabeledEdit;
lblAltURL: TLabeledEdit;
svgIcon: TSkSvg;
btnSearchSVG: TButton;
ckUserScript: TCheckBox;
ckUserStyle: TCheckBox;
ckEnabled: TCheckBox;
txtUserScript: TMemo;
txtUserStyle: TMemo;
btnCancel: TButton;
btnOK: TButton;
openSVG: TOpenDialog;
lblUA: TLabeledEdit;
procedure btnSearchSVGClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.dfm}
procedure TFrame1.btnSearchSVGClick(Sender: TObject);
begin
openSVG.Filter := 'SVG Files|*.svg|All Files|*.*';
if openSVG.Execute then
begin
var txt := TStringList.Create;
try
txt.LoadFromFile(openSVG.FileName);
svgIcon.Svg.Source := txt.Text;
finally
txt.Free;
end;
end;
end;
end.