mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 13:27:43 +02:00
added build date to About box from vincent
git-svn-id: trunk@5503 -
This commit is contained in:
parent
8ca75716ec
commit
76405be97d
@ -30,10 +30,17 @@ object AboutForm: TAboutForm
|
|||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Alignment = tacenter
|
Alignment = tacenter
|
||||||
Caption = 'Version #:'
|
Caption = 'Version #:'
|
||||||
Layout = tltop
|
|
||||||
Left = 14
|
Left = 14
|
||||||
Height = 17
|
Height = 17
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 200
|
Width = 200
|
||||||
end
|
end
|
||||||
|
object Label2: TLabel
|
||||||
|
Alignment = tacenter
|
||||||
|
Caption = 'Date:'
|
||||||
|
Left = 14
|
||||||
|
Height = 17
|
||||||
|
Top = 23
|
||||||
|
Width = 200
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -9,6 +9,7 @@ LazarusResources.Add('TAboutForm','FORMDATA',[
|
|||||||
+#3#219#0#3'Top'#2#14#5'Width'#3'S'#1#0#0#7'TButton'#7'Button1'#11'ModalResul'
|
+#3#219#0#3'Top'#2#14#5'Width'#3'S'#1#0#0#7'TButton'#7'Button1'#11'ModalResul'
|
||||||
+'t'#2#1#7'Caption'#6#5'Close'#8'TabOrder'#2#1#4'Left'#2'N'#6'Height'#2#25#3
|
+'t'#2#1#7'Caption'#6#5'Close'#8'TabOrder'#2#1#4'Left'#2'N'#6'Height'#2#25#3
|
||||||
+'Top'#3#184#0#5'Width'#2'K'#0#0#6'TLabel'#6'Label1'#9'Alignment'#7#8'tacente'
|
+'Top'#3#184#0#5'Width'#2'K'#0#0#6'TLabel'#6'Label1'#9'Alignment'#7#8'tacente'
|
||||||
+'r'#7'Caption'#6#10'Version #:'#6'Layout'#7#5'tltop'#4'Left'#2#14#6'Height'#2
|
+'r'#7'Caption'#6#10'Version #:'#4'Left'#2#14#6'Height'#2#17#3'Top'#2#6#5'Wid'
|
||||||
+#17#3'Top'#2#6#5'Width'#3#200#0#0#0#0
|
+'th'#3#200#0#0#0#6'TLabel'#6'Label2'#9'Alignment'#7#8'tacenter'#7'Caption'#6
|
||||||
|
+#5'Date:'#4'Left'#2#14#6'Height'#2#17#3'Top'#2#23#5'Width'#3#200#0#0#0#0
|
||||||
]);
|
]);
|
||||||
|
@ -30,6 +30,7 @@ uses
|
|||||||
|
|
||||||
type
|
type
|
||||||
TAboutForm = class(TForm)
|
TAboutForm = class(TForm)
|
||||||
|
Label2: TLABEL;
|
||||||
Memo1: TMEMO;
|
Memo1: TMEMO;
|
||||||
Button1: TBUTTON;
|
Button1: TBUTTON;
|
||||||
Label1: TLABEL;
|
Label1: TLABEL;
|
||||||
@ -63,12 +64,31 @@ end;
|
|||||||
{ TAboutForm }
|
{ TAboutForm }
|
||||||
|
|
||||||
constructor TAboutForm.Create(AOwner: TComponent);
|
constructor TAboutForm.Create(AOwner: TComponent);
|
||||||
|
{The compiler generated date string is always of the form y/m/d.
|
||||||
|
This function gives it a string respresentation according to the
|
||||||
|
shortdateformat}
|
||||||
|
function GetLocalizedBuildDate(): string;
|
||||||
|
var
|
||||||
|
BuildDate: string;
|
||||||
|
SlashPos1, SlashPos2: integer;
|
||||||
|
Date: TDate;
|
||||||
|
begin
|
||||||
|
BuildDate := {$I %date%};
|
||||||
|
SlashPos1 := Pos('/',BuildDate);
|
||||||
|
SlashPos2 := SlashPos1 +
|
||||||
|
Pos('/', Copy(BuildDate, SlashPos1+1, Length(BuildDate)-SlashPos1));
|
||||||
|
Date := EncodeDate(StrToInt(Copy(BuildDate,1,SlashPos1-1)),
|
||||||
|
StrToInt(Copy(BuildDate,SlashPos1+1,SlashPos2-SlashPos1-1)),
|
||||||
|
StrToInt(Copy(BuildDate,SlashPos2+1,Length(BuildDate)-SlashPos2)));
|
||||||
|
Result := DateTimeToStr(Date);
|
||||||
|
end;
|
||||||
begin
|
begin
|
||||||
inherited Create(AOwner);
|
inherited Create(AOwner);
|
||||||
|
|
||||||
FPixmap := TPixmap.Create;
|
FPixmap := TPixmap.Create;
|
||||||
FPixmap.LoadFromLazarusResource('lazarus_about_logo');
|
FPixmap.LoadFromLazarusResource('lazarus_about_logo');
|
||||||
Label1.Caption := lisVersion+' #: '+lisLazarusVersionString;
|
Label1.Caption := lisVersion+' #: '+lisLazarusVersionString;
|
||||||
|
Label2.Caption := lisDate+': '+GetLocalizedBuildDate;
|
||||||
|
|
||||||
Memo1.Lines.Text:=Format(lisAboutLazarusMsg,[LineEnding,LineEnding,LineEnding]);
|
Memo1.Lines.Text:=Format(lisAboutLazarusMsg,[LineEnding,LineEnding,LineEnding]);
|
||||||
Button1.Caption:=lisClose;
|
Button1.Caption:=lisClose;
|
||||||
@ -99,7 +119,7 @@ procedure TAboutForm.Paint;
|
|||||||
begin
|
begin
|
||||||
inherited Paint;
|
inherited Paint;
|
||||||
if FPixmap <>nil
|
if FPixmap <>nil
|
||||||
then Canvas.Copyrect(Bounds(12, 36, Width, Height)
|
then Canvas.Copyrect(Bounds(12, 44, Width, Height)
|
||||||
,FPixmap.Canvas, Rect(0,0, Width, Height));
|
,FPixmap.Canvas, Rect(0,0, Width, Height));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -476,6 +476,7 @@ resourcestring
|
|||||||
lisPlzCheckTheCompilerName = 'Please check the compiler name';
|
lisPlzCheckTheCompilerName = 'Please check the compiler name';
|
||||||
lisAboutLazarus = 'About Lazarus';
|
lisAboutLazarus = 'About Lazarus';
|
||||||
lisVersion = 'Version';
|
lisVersion = 'Version';
|
||||||
|
lisDate = 'Date';
|
||||||
lisClose = 'Close';
|
lisClose = 'Close';
|
||||||
lisAboutLazarusMsg =
|
lisAboutLazarusMsg =
|
||||||
'License: GPL/LGPL'
|
'License: GPL/LGPL'
|
||||||
|
@ -371,6 +371,8 @@ type
|
|||||||
TIcon = class; // ico
|
TIcon = class; // ico
|
||||||
TPortableNetworkGraphic = class; // png
|
TPortableNetworkGraphic = class; // png
|
||||||
{$IFDEF UseSimpleJpeg}
|
{$IFDEF UseSimpleJpeg}
|
||||||
|
// MG: will be added to the LCL, when fpc 2.0 is released
|
||||||
|
// but then with the advanced features of the existing package
|
||||||
TJpegImage = class; // jpg
|
TJpegImage = class; // jpg
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
@ -1699,6 +1701,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.138 2004/05/23 21:30:10 mattias
|
||||||
|
added build date to About box from vincent
|
||||||
|
|
||||||
Revision 1.137 2004/05/07 08:07:57 mattias
|
Revision 1.137 2004/05/07 08:07:57 mattias
|
||||||
ifdefd UseSimpleJpeg
|
ifdefd UseSimpleJpeg
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user