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:
parent
68121d48e9
commit
db032e3d1f
@ -75,7 +75,7 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="14">
|
<Units Count="15">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="lazedit.lpr"/>
|
<Filename Value="lazedit.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -158,6 +158,13 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="lazedit_translations"/>
|
<UnitName Value="lazedit_translations"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
|
<Unit14>
|
||||||
|
<Filename Value="lazedit_about.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<ComponentName Value="formAbout"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
|
<UnitName Value="lazedit_about"/>
|
||||||
|
</Unit14>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@ -11,7 +11,7 @@ uses
|
|||||||
lazedit_translations,
|
lazedit_translations,
|
||||||
EditorPageControl,
|
EditorPageControl,
|
||||||
HtmlCode,
|
HtmlCode,
|
||||||
lazedit_constants;
|
lazedit_constants, lazedit_about;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
@ -33,7 +33,7 @@ begin
|
|||||||
else
|
else
|
||||||
LazEditMainForm.TryFileOpen(ParamStr(1), False);
|
LazEditMainForm.TryFileOpen(ParamStr(1), False);
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Application.CreateForm(TformAbout, formAbout);
|
||||||
Application.Run;
|
Application.Run;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
40
applications/lazedit/lazedit_about.lfm
Normal file
40
applications/lazedit/lazedit_about.lfm
Normal 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
|
41
applications/lazedit/lazedit_about.pas
Normal file
41
applications/lazedit/lazedit_about.pas
Normal 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.
|
||||||
|
|
@ -42,7 +42,7 @@ interface
|
|||||||
const
|
const
|
||||||
AppName = 'LazEdit';
|
AppName = 'LazEdit';
|
||||||
AboutTitle = 'Over ' + AppName;
|
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';
|
CopyLeftStatement = 'Copyright (c) 2011, 2012 by Bart Broersma, FlyingSheep Inc. and Felipe Monteiro de Carvalho';
|
||||||
MetaGeneratorName = AppName + #32 + AppVersion;
|
MetaGeneratorName = AppName + #32 + AppVersion;
|
||||||
AuthorWebName = 'Bart & Mariska''s Webstek';
|
AuthorWebName = 'Bart & Mariska''s Webstek';
|
||||||
|
@ -110,10 +110,8 @@ object LazEditMainForm: TLazEditMainForm
|
|||||||
end
|
end
|
||||||
object InfoBtn: TToolButton
|
object InfoBtn: TToolButton
|
||||||
Left = 215
|
Left = 215
|
||||||
Hint = 'Info'
|
|
||||||
Top = 2
|
Top = 2
|
||||||
Caption = 'InfoBtn'
|
Action = acAbout
|
||||||
ImageIndex = 8
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object HtmlToolbar: TToolBar
|
object HtmlToolbar: TToolBar
|
||||||
|
@ -47,8 +47,7 @@ uses
|
|||||||
SynEdit, SynEditTypes,
|
SynEdit, SynEditTypes,
|
||||||
EditorPageControl,
|
EditorPageControl,
|
||||||
EPlus_Commons, lazedit_config, HtmlCode, HtmlDialogs, lazedit_constants,
|
EPlus_Commons, lazedit_config, HtmlCode, HtmlDialogs, lazedit_constants,
|
||||||
lazedit_translations{
|
lazedit_translations, lazedit_about;
|
||||||
MyFileUtils, Fcl_Misc, MruLists, MyGetOpt, ExtAbout, NlAutoTranslation};
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -416,8 +415,6 @@ type
|
|||||||
procedure mnuViewFontSizeUpClick(Sender: TObject);
|
procedure mnuViewFontSizeUpClick(Sender: TObject);
|
||||||
procedure mnuSetHighlighterClick(Sender: TObject);
|
procedure mnuSetHighlighterClick(Sender: TObject);
|
||||||
|
|
||||||
procedure AboutEPlus;
|
|
||||||
|
|
||||||
procedure DoFind(Sender: TObject); //callback for FindDialog
|
procedure DoFind(Sender: TObject); //callback for FindDialog
|
||||||
procedure DoReplace(Sender: TObject); //callback for ReplaceDialog
|
procedure DoReplace(Sender: TObject); //callback for ReplaceDialog
|
||||||
|
|
||||||
@ -880,7 +877,7 @@ end;
|
|||||||
|
|
||||||
procedure TLazEditMainForm.acAboutExecute(Sender: TObject);
|
procedure TLazEditMainForm.acAboutExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
AboutEplus;
|
formAbout.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazEditMainForm.acEditFindNextExecute(Sender: TObject);
|
procedure TLazEditMainForm.acEditFindNextExecute(Sender: TObject);
|
||||||
@ -2550,32 +2547,5 @@ begin
|
|||||||
end;
|
end;
|
||||||
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.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user