[go: up one dir, main page]

Menu

[r3]: / trunk / about.pas  Maximize  Restore  History

Download this file

141 lines (112 with data), 3.8 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
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{
Health Organizer (http://sourceforge.net/projects/hor/,
http://hor.sourceforge.net/)
Copyright (C) 2014 Andrea Urbani ( matfanjol@users.sf.net,
matfanjol@mail.com )
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
}
unit about;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, RTTICtrls, Forms, Controls, Graphics, Dialogs,
StdCtrls, ExtCtrls;
type
{ TfrmAbout }
TfrmAbout = class(TForm)
imgGPLv3: TImage;
lblGPLv3: TLabel;
lblEmail1: TLabel;
lblEmail2: TLabel;
lblSite: TLabel;
lblCopyright: TLabel;
lblWarranty: TLabel;
lblAuthor: TLabel;
lblTitle: TLabel;
lblBrief: TLabel;
procedure FormCreate(Sender: TObject);
procedure lblGPLv3Click(Sender: TObject);
procedure lblAuthorClick(Sender: TObject);
procedure lblEmail1Click(Sender: TObject);
procedure lblEmail2Click(Sender: TObject);
procedure lblSiteClick(Sender: TObject);
procedure lblSiteMouseEnter(Sender: TObject);
procedure lblSiteMouseLeave(Sender: TObject);
protected
procedure ActivateDeactivateLink( ToBeActivated: boolean; TheLabel : TLabel);
private
{ private declarations }
public
{ public declarations }
end;
var
frmAbout: TfrmAbout;
resourcestring
rsAboutTitle = 'Health Organizer';
rsAboutBrief = 'Organize your health and the health of your loved ones';
implementation
{$R *.lfm}
{ TfrmAbout }
Uses LCLIntf;
procedure TfrmAbout.FormCreate(Sender: TObject);
begin
lblTitle.Caption:=rsAboutTitle;
lblBrief.Caption:=rsAboutBrief;
end;
procedure TfrmAbout.lblGPLv3Click(Sender: TObject);
begin
OpenURL('http://www.gnu.org/licenses/');
end;
procedure TfrmAbout.lblAuthorClick(Sender: TObject);
begin
OpenURL( 'http://matfanjol.users.sourceforge.net/' );
end;
procedure TfrmAbout.lblEmail1Click(Sender: TObject);
begin
// I type the url to be sure it is not changed via the translations...
OpenURL( 'mailto:matfanjol@users.sf.net' );
end;
procedure TfrmAbout.lblEmail2Click(Sender: TObject);
begin
// I type the url to be sure it is not changed via the translations...
OpenURL( 'mailto:matfanjol@mail.com' );
end;
procedure TfrmAbout.lblSiteClick(Sender: TObject);
begin
// I type the url to be sure it is not changed via the translations...
OpenURL( 'http://hor.sourceforge.net' );
end;
procedure TfrmAbout.lblSiteMouseEnter(Sender: TObject);
begin
if ( Sender is TLabel ) then
ActivateDeactivateLink(true, Sender as TLabel );
end;
procedure TfrmAbout.lblSiteMouseLeave(Sender: TObject);
begin
if ( Sender is TLabel ) then
ActivateDeactivateLink(false, Sender as TLabel );
end;
procedure TfrmAbout.ActivateDeactivateLink(ToBeActivated: boolean;
TheLabel: TLabel);
begin
if ToBeActivated then
begin
TheLabel.Font.Color:=clBlue;
TheLabel.Font.Style:=TheLabel.Font.Style + [fsBold,fsUnderline];
end
else
begin
TheLabel.Font.Color:=clDefault;
TheLabel.Font.Style:=TheLabel.Font.Style - [fsBold,fsUnderline];
end
end;
end.