lazedit: Adds a about box

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2299 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
sekelsenmat 2012-02-16 11:27:35 +00:00
parent 68121d48e9
commit db032e3d1f
7 changed files with 95 additions and 39 deletions

View File

@ -75,7 +75,7 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
<Units Count="14">
<Units Count="15">
<Unit0>
<Filename Value="lazedit.lpr"/>
<IsPartOfProject Value="True"/>
@ -158,6 +158,13 @@
<IsPartOfProject Value="True"/>
<UnitName Value="lazedit_translations"/>
</Unit13>
<Unit14>
<Filename Value="lazedit_about.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="formAbout"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="lazedit_about"/>
</Unit14>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -11,7 +11,7 @@ uses
lazedit_translations,
EditorPageControl,
HtmlCode,
lazedit_constants;
lazedit_constants, lazedit_about;
{$R *.res}
@ -33,7 +33,7 @@ begin
else
LazEditMainForm.TryFileOpen(ParamStr(1), False);
{$endif}
Application.CreateForm(TformAbout, formAbout);
Application.Run;
end.

View File

@ -0,0 +1,40 @@
object formAbout: TformAbout
Left = 478
Height = 137
Top = 326
Width = 320
Caption = 'About LazEdit'
ClientHeight = 137
ClientWidth = 320
OnCreate = FormCreate
LCLVersion = '0.9.31'
object Button1: TButton
Left = 120
Height = 25
Top = 96
Width = 75
Caption = 'Close'
ModalResult = 1
TabOrder = 0
end
object labelCopyright: TLabel
Left = 8
Height = 14
Top = 56
Width = 70
Caption = 'labelCopyright'
ParentColor = False
end
object Label1: TLabel
Left = 0
Height = 34
Top = 8
Width = 320
Alignment = taCenter
AutoSize = False
Caption = 'LazEdit'
Font.Height = -27
ParentColor = False
ParentFont = False
end
end

View File

@ -0,0 +1,41 @@
unit lazedit_about;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
lazedit_constants;
type
{ TformAbout }
TformAbout = class(TForm)
Button1: TButton;
Label1: TLabel;
labelCopyright: TLabel;
procedure FormCreate(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
formAbout: TformAbout;
implementation
{$R *.lfm}
{ TformAbout }
procedure TformAbout.FormCreate(Sender: TObject);
begin
labelCopyright.Caption := CopyLeftStatement;
end;
end.

View File

@ -42,7 +42,7 @@ interface
const
AppName = 'LazEdit';
AboutTitle = 'Over ' + AppName;
AppVersion = 'Version 1.1';
AppVersion = 'Version 1.9';
CopyLeftStatement = 'Copyright (c) 2011, 2012 by Bart Broersma, FlyingSheep Inc. and Felipe Monteiro de Carvalho';
MetaGeneratorName = AppName + #32 + AppVersion;
AuthorWebName = 'Bart & Mariska''s Webstek';

View File

@ -110,10 +110,8 @@ object LazEditMainForm: TLazEditMainForm
end
object InfoBtn: TToolButton
Left = 215
Hint = 'Info'
Top = 2
Caption = 'InfoBtn'
ImageIndex = 8
Action = acAbout
end
end
object HtmlToolbar: TToolBar

View File

@ -47,8 +47,7 @@ uses
SynEdit, SynEditTypes,
EditorPageControl,
EPlus_Commons, lazedit_config, HtmlCode, HtmlDialogs, lazedit_constants,
lazedit_translations{
MyFileUtils, Fcl_Misc, MruLists, MyGetOpt, ExtAbout, NlAutoTranslation};
lazedit_translations, lazedit_about;
type
@ -416,8 +415,6 @@ type
procedure mnuViewFontSizeUpClick(Sender: TObject);
procedure mnuSetHighlighterClick(Sender: TObject);
procedure AboutEPlus;
procedure DoFind(Sender: TObject); //callback for FindDialog
procedure DoReplace(Sender: TObject); //callback for ReplaceDialog
@ -880,7 +877,7 @@ end;
procedure TLazEditMainForm.acAboutExecute(Sender: TObject);
begin
AboutEplus;
formAbout.ShowModal;
end;
procedure TLazEditMainForm.acEditFindNextExecute(Sender: TObject);
@ -2550,32 +2547,5 @@ begin
end;
end;
{ ************************** [ About ] *********************** }
procedure TLazEditMainForm.AboutEPlus;
{var
Dlg: TExtAboutDlg;}
begin
{ Dlg := TExtAboutDlg.Create;
try
Dlg.Caption := AboutTitle;
Dlg.ProductName := AppName;
Dlg.Version := AppVersion;
Dlg.CopyrightStatement := CopyLeftStatement;
Dlg.WebsiteCaption := AuthorWebName;
Dlg.WebsiteURL := AuthorWebUrl;
Dlg.LicenseText := LicenseText;
Dlg.LicenseWebsiteCaption := LicenseName;
Dlg.LicenseWebsiteURL := LicenseUrl;
Dlg.Top := Top + 20;
Dlg.Left := Left + 20;
Dlg.Execute;
finally
Dlg.Free;
end;}
end;
end.