You've already forked lazarus-ccr
LazStats: Add licenses form to menu. Add license text to README.txt.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7350 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -24,3 +24,23 @@ William Miller writes in file "html/introduction.pdf":
|
|||||||
to give me credit if you use these resources. Because I do not warrant them
|
to give me credit if you use these resources. Because I do not warrant them
|
||||||
in any manner, you should insure yourself that the routines you use are
|
in any manner, you should insure yourself that the routines you use are
|
||||||
adequate for your purposes."
|
adequate for your purposes."
|
||||||
|
|
||||||
|
License displayed by program:
|
||||||
|
***************************************************************************
|
||||||
|
* *
|
||||||
|
* This source is free software; you can redistribute it and/or modify *
|
||||||
|
* it under the terms of the GNU General Public License as published by *
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or *
|
||||||
|
* (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This code is distributed in the hope that it will be useful, but *
|
||||||
|
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||||
|
* General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* A copy of the GNU General Public License is available on the World *
|
||||||
|
* Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
|
||||||
|
* obtain it by writing to the Free Software Foundation, *
|
||||||
|
* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
||||||
|
* *
|
||||||
|
***************************************************************************
|
||||||
|
@ -1017,6 +1017,10 @@ object OS3MainFrm: TOS3MainFrm
|
|||||||
Caption = 'About...'
|
Caption = 'About...'
|
||||||
OnClick = AboutClick
|
OnClick = AboutClick
|
||||||
end
|
end
|
||||||
|
object LicenseMenu: TMenuItem
|
||||||
|
Caption = 'License...'
|
||||||
|
OnClick = LicenseMenuClick
|
||||||
|
end
|
||||||
object MenuItem46: TMenuItem
|
object MenuItem46: TMenuItem
|
||||||
Caption = '-'
|
Caption = '-'
|
||||||
end
|
end
|
||||||
|
@ -96,6 +96,7 @@ type
|
|||||||
MenuItem44: TMenuItem;
|
MenuItem44: TMenuItem;
|
||||||
MenuItem45: TMenuItem;
|
MenuItem45: TMenuItem;
|
||||||
MenuItem46: TMenuItem;
|
MenuItem46: TMenuItem;
|
||||||
|
LicenseMenu: TMenuItem;
|
||||||
MenuItem48: TMenuItem;
|
MenuItem48: TMenuItem;
|
||||||
MenuItem49: TMenuItem;
|
MenuItem49: TMenuItem;
|
||||||
SimpChiSqr: TMenuItem;
|
SimpChiSqr: TMenuItem;
|
||||||
@ -300,6 +301,7 @@ type
|
|||||||
procedure JPEGViewClick(Sender: TObject);
|
procedure JPEGViewClick(Sender: TObject);
|
||||||
procedure KSTestClick(Sender: TObject);
|
procedure KSTestClick(Sender: TObject);
|
||||||
procedure LatinSquaresClick(Sender: TObject);
|
procedure LatinSquaresClick(Sender: TObject);
|
||||||
|
procedure LicenseMenuClick(Sender: TObject);
|
||||||
procedure lifetableClick(Sender: TObject);
|
procedure lifetableClick(Sender: TObject);
|
||||||
procedure LSMRitemClick(Sender: TObject);
|
procedure LSMRitemClick(Sender: TObject);
|
||||||
procedure MatManMnuClick(Sender: TObject);
|
procedure MatManMnuClick(Sender: TObject);
|
||||||
@ -1712,6 +1714,11 @@ begin
|
|||||||
LatinSqrsFrm.ShowModal;
|
LatinSqrsFrm.ShowModal;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TOS3MainFrm.LicenseMenuClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
ShowLicense(false);
|
||||||
|
end;
|
||||||
|
|
||||||
// Menu "Analysis" > "Nonparametric" > "Life table"
|
// Menu "Analysis" > "Nonparametric" > "Life table"
|
||||||
procedure TOS3MainFrm.lifetableClick(Sender: TObject);
|
procedure TOS3MainFrm.lifetableClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
@ -49,7 +49,6 @@ object LicenseFrm: TLicenseFrm
|
|||||||
''
|
''
|
||||||
'Use at your own risk. Compare results to other statistics programs'
|
'Use at your own risk. Compare results to other statistics programs'
|
||||||
'or text book examples for each procedure.'
|
'or text book examples for each procedure.'
|
||||||
'Click on Accept or Reject below.'
|
|
||||||
)
|
)
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -67,10 +66,12 @@ object LicenseFrm: TLicenseFrm
|
|||||||
ClientWidth = 621
|
ClientWidth = 621
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object AcceptBtn: TButton
|
object AcceptBtn: TButton
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = Bevel2
|
AnchorSideRight.Control = Bevel2
|
||||||
Left = 239
|
Left = 239
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 0
|
Top = 1
|
||||||
Width = 63
|
Width = 63
|
||||||
Anchors = [akTop, akRight]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -81,6 +82,8 @@ object LicenseFrm: TLicenseFrm
|
|||||||
object RejectBtn: TButton
|
object RejectBtn: TButton
|
||||||
AnchorSideLeft.Control = Bevel2
|
AnchorSideLeft.Control = Bevel2
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = Panel1
|
AnchorSideRight.Control = Panel1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 318
|
Left = 318
|
||||||
@ -97,10 +100,27 @@ object LicenseFrm: TLicenseFrm
|
|||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
Left = 302
|
Left = 302
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 4
|
Top = 0
|
||||||
Width = 16
|
Width = 16
|
||||||
Shape = bsSpacer
|
Shape = bsSpacer
|
||||||
end
|
end
|
||||||
|
object OKBtn: TButton
|
||||||
|
AnchorSideLeft.Control = Panel1
|
||||||
|
AnchorSideLeft.Side = asrCenter
|
||||||
|
AnchorSideTop.Control = Panel1
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
Left = 289
|
||||||
|
Height = 25
|
||||||
|
Top = 1
|
||||||
|
Width = 42
|
||||||
|
AutoSize = True
|
||||||
|
Cancel = True
|
||||||
|
Caption = 'OK'
|
||||||
|
Default = True
|
||||||
|
ModalResult = 1
|
||||||
|
TabOrder = 2
|
||||||
|
Visible = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object Bevel1: TBevel
|
object Bevel1: TBevel
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
|
@ -16,6 +16,7 @@ type
|
|||||||
AcceptBtn: TButton;
|
AcceptBtn: TButton;
|
||||||
Bevel1: TBevel;
|
Bevel1: TBevel;
|
||||||
Bevel2: TBevel;
|
Bevel2: TBevel;
|
||||||
|
OKBtn: TButton;
|
||||||
RejectBtn: TButton;
|
RejectBtn: TButton;
|
||||||
Memo1: TMemo;
|
Memo1: TMemo;
|
||||||
Panel1: TPanel;
|
Panel1: TPanel;
|
||||||
@ -29,14 +30,27 @@ var
|
|||||||
LicenseFrm: TLicenseFrm;
|
LicenseFrm: TLicenseFrm;
|
||||||
|
|
||||||
function AcceptLicenseForm: Boolean;
|
function AcceptLicenseForm: Boolean;
|
||||||
|
function ShowLicense(FirstTime: Boolean): Boolean;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
function AcceptLicenseForm: Boolean;
|
function AcceptLicenseForm: Boolean;
|
||||||
|
begin
|
||||||
|
Result := ShowLicense(true);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function ShowLicense(FirstTime: Boolean): Boolean;
|
||||||
begin
|
begin
|
||||||
with TLicenseFrm.Create(nil) do
|
with TLicenseFrm.Create(nil) do
|
||||||
try
|
try
|
||||||
|
OKBtn.Visible := not FirstTime;
|
||||||
|
AcceptBtn.Visible := FirstTime;
|
||||||
|
RejectBtn.Visible := FirstTime;
|
||||||
|
Bevel2.Visible := FirstTime;
|
||||||
|
if FirstTime then
|
||||||
|
Memo1.Lines.Add('Click on Accept or Reject below.');
|
||||||
|
|
||||||
Result := (ShowModal = mrOK);
|
Result := (ShowModal = mrOK);
|
||||||
finally
|
finally
|
||||||
Free;
|
Free;
|
||||||
|
Reference in New Issue
Block a user