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
|
unit About;
interface
uses
gnugettext, Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
Dialogs, StdCtrls, PngImage, ExtCtrls, AuxFuncs, TntStdCtrls, TntExtCtrls, TntForms;
{$include Defines.ini}
type
TAboutForm = class(TTntForm)
AboutImg: TTntImage;
VersionLbl: TTntLabel;
CopyrightLbl: TTntLabel;
LicenceLbl: TTntLabel;
CloseBtn: TTntButton;
TextLbl: TTntLabel;
CreditsBtn: TTntButton;
TntBevel1: TTntBevel;
procedure FormCreate(Sender: TObject);
procedure CreditsBtnClick(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
{ Private declarations }
AboutPNGImg: TPNGObject;
protected
procedure CreateParams(var Params: TCreateParams); override;
public
{ Public declarations }
end;
implementation
{$R *.dfm}
uses
PNGTools;
procedure TAboutForm.FormCreate(Sender: TObject);
begin
InitForm(self);
AboutPNGImg:=LoadPNGImageFromResource('about', AboutImg);
{$ifdef commercial_build}
LicenceLbl.Caption:='This is commercial software and is distributed with NO WARRANTY OF ANY KIND. No author or '+
'distributor accepts any responsibility for the consequences of using it. '+
'Refer to the MySQLEULA.txt file for details.';
{$endif}
TextLbl.Caption:='Michael G. Zinner, main concept, graphical design, '+
'Windows development, library coding | '+
'Alfredo Kengi Kojima, Linux development, library coding | '+
'Ulrich Bayer, library coding | '+
'Brian Aker, conceptual design, supervising | '+
'Stefan Hinz, documentation | '+
'Mike Hillyer, documentation';
TextLbl.Visible:=False;
end;
procedure TAboutForm.FormDestroy(Sender: TObject);
begin
AboutPNGImg.Free;
end;
procedure TAboutForm.CreateParams(var Params: TCreateParams);
const CS_DROPSHADOW = $00020000;
begin
inherited;
if(IsWinXP)then
Params.WindowClass.Style := Params.WindowClass.Style or CS_DROPSHADOW;
end;
procedure TAboutForm.CreditsBtnClick(Sender: TObject);
begin
if(Not(TextLbl.Visible))then
begin
CopyrightLbl.Visible:=False;
LicenceLbl.Visible:=False;
TextLbl.Visible:=True;
CreditsBtn.Caption:=_('About');
end
else
begin
CopyrightLbl.Visible:=True;
LicenceLbl.Visible:=True;
TextLbl.Visible:=False;
CreditsBtn.Caption:=_('Credits');
end;
end;
end.
|