-
Notifications
You must be signed in to change notification settings - Fork 0
/
aboutui.pas
67 lines (48 loc) · 1.56 KB
/
aboutui.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
UNIT aboutUi;
{$mode objfpc}{$H+}
INTERFACE
USES
Classes, sysutils, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls;
TYPE
{ TAboutDialog }
TAboutDialog = class(TForm)
DownloadLinkLabel: TLabel;
LicenseLabel: TLabel;
DownloadLinkShape: TShape;
LicenseShape: TShape;
VersionLabel: TLabel;
PROCEDURE DownloadLinkShapeMouseDown(Sender: TObject; button: TMouseButton;
Shift: TShiftState; X, Y: integer);
PROCEDURE FormShow(Sender: TObject);
PROCEDURE LicenseShapeMouseDown(Sender: TObject; button: TMouseButton;
Shift: TShiftState; X, Y: integer);
private
public
end;
FUNCTION AboutDialog: TAboutDialog;
IMPLEMENTATION
USES visuals,lclintf;
VAR myAboutDialog:TAboutDialog=nil;
FUNCTION AboutDialog: TAboutDialog;
begin
if myAboutDialog=nil then myAboutDialog:=TAboutDialog.create(nil);
result:=myAboutDialog;
end;
{$R *.lfm}
{ TAboutDialog }
PROCEDURE TAboutDialog.FormShow(Sender: TObject);
begin
applyColorScheme(self);
end;
PROCEDURE TAboutDialog.LicenseShapeMouseDown(Sender: TObject; button: TMouseButton; Shift: TShiftState; X, Y: integer);
begin
OpenURL('https://creativecommons.org/licenses/by-sa/3.0/de/');
end;
PROCEDURE TAboutDialog.DownloadLinkShapeMouseDown(Sender: TObject; button: TMouseButton; Shift: TShiftState; X, Y: integer);
begin
OpenURL('https://github.com/mschlegel81/digitaltrainer/releases/latest');
end;
{ TAboutDialog }
FINALIZATION
if myAboutDialog<>nil then FreeAndNil(myAboutDialog);
end.