1
{ Package detail form for the lazarus package manager
3
Copyright (C) 2011 Darius Blaszyk
5
This library is free software; you can redistribute it and/or modify it
6
under the terms of the GNU Library General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or (at your
8
option) any later version with the following modification:
10
As a special exception, the copyright holders of this library give you
11
permission to link this library with independent modules to produce an
12
executable, regardless of the license terms of these independent modules,and
13
to copy and distribute the resulting executable under terms of your choice,
14
provided that you also meet, for each linked independent module, the terms
15
and conditions of the license of that module. An independent module is a
16
module which is not derived from or based on this library. If you modify
17
this library, you may extend this exception to your version of the library,
18
but you are not obligated to do so. If you do not wish to do so, delete this
19
exception statement from your version.
21
This program is distributed in the hope that it will be useful, but WITHOUT
22
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
23
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License
26
You should have received a copy of the GNU Library General Public License
27
along with this library; if not, write to the Free Software Foundation,
28
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38
StdCtrls, ButtonPanel, laz_pkgrepos;
44
TPkgDetailsForm = class(TForm)
45
ButtonPanel1: TButtonPanel;
46
DescriptionMemo: TMemo;
49
HomepageURLLabel: TLabel;
50
DownloadURLLabel: TLabel;
51
FileNameLabel: TLabel;
57
procedure FormCreate(Sender: TObject);
58
procedure FormShow(Sender: TObject);
61
{ private declarations }
63
{ public declarations }
64
property PackageName: string read FPackageName write FPackageName;
68
PkgDetailsForm: TPkgDetailsForm;
76
procedure TPkgDetailsForm.FormCreate(Sender: TObject);
78
Caption := 'Package details';
81
procedure TPkgDetailsForm.FormShow(Sender: TObject);
85
if PackageName = '' then
88
pkg := Laz_Packages.FindPackage(PackageName);
90
NameLabel.Caption := PackageName;
91
DescriptionMemo.Text:= pkg.Description;
93
AuthorLabel.Caption:= 'Author: ' + pkg.Author;
94
VersionLabel.Caption:= 'Version: ' + pkg.AvialableVersion;
95
LicenseLabel.Caption:= 'License: ' + pkg.License;
96
HomePageURLLabel.Caption:= 'Homepage: ' + pkg.HomepageURL;
97
DownloadURLLabel.Caption:= 'Download: ' + pkg.DownloadURL;
98
FileNameLabel.Caption:= 'Filename: ' + pkg.FileName;
99
EmailLabel.Caption:= 'Email: ' + pkg.Email;
100
OSLabel.Caption:= 'OS: ' + pkg.OS;
101
CPULabel.Caption:= 'CPU: ' + pkg.CPU;