diff --git a/applications/lazstats/README.txt b/applications/lazstats/README.txt index 2348891e1..d4e266b9e 100644 --- a/applications/lazstats/README.txt +++ b/applications/lazstats/README.txt @@ -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 in any manner, you should insure yourself that the routines you use are 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 . You can also * + * obtain it by writing to the Free Software Foundation, * + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * * + *************************************************************************** diff --git a/applications/lazstats/source/forms/mainunit.lfm b/applications/lazstats/source/forms/mainunit.lfm index 80bcdf79c..51bc03641 100644 --- a/applications/lazstats/source/forms/mainunit.lfm +++ b/applications/lazstats/source/forms/mainunit.lfm @@ -1017,6 +1017,10 @@ object OS3MainFrm: TOS3MainFrm Caption = 'About...' OnClick = AboutClick end + object LicenseMenu: TMenuItem + Caption = 'License...' + OnClick = LicenseMenuClick + end object MenuItem46: TMenuItem Caption = '-' end diff --git a/applications/lazstats/source/forms/mainunit.pas b/applications/lazstats/source/forms/mainunit.pas index e911d7e12..096fefd34 100644 --- a/applications/lazstats/source/forms/mainunit.pas +++ b/applications/lazstats/source/forms/mainunit.pas @@ -96,6 +96,7 @@ type MenuItem44: TMenuItem; MenuItem45: TMenuItem; MenuItem46: TMenuItem; + LicenseMenu: TMenuItem; MenuItem48: TMenuItem; MenuItem49: TMenuItem; SimpChiSqr: TMenuItem; @@ -300,6 +301,7 @@ type procedure JPEGViewClick(Sender: TObject); procedure KSTestClick(Sender: TObject); procedure LatinSquaresClick(Sender: TObject); + procedure LicenseMenuClick(Sender: TObject); procedure lifetableClick(Sender: TObject); procedure LSMRitemClick(Sender: TObject); procedure MatManMnuClick(Sender: TObject); @@ -1712,6 +1714,11 @@ begin LatinSqrsFrm.ShowModal; end; +procedure TOS3MainFrm.LicenseMenuClick(Sender: TObject); +begin + ShowLicense(false); +end; + // Menu "Analysis" > "Nonparametric" > "Life table" procedure TOS3MainFrm.lifetableClick(Sender: TObject); begin diff --git a/applications/lazstats/source/forms/misc/licenseunit.lfm b/applications/lazstats/source/forms/misc/licenseunit.lfm index 1c504581e..01cc086a7 100644 --- a/applications/lazstats/source/forms/misc/licenseunit.lfm +++ b/applications/lazstats/source/forms/misc/licenseunit.lfm @@ -49,7 +49,6 @@ object LicenseFrm: TLicenseFrm '' 'Use at your own risk. Compare results to other statistics programs' 'or text book examples for each procedure.' - 'Click on Accept or Reject below.' ) ParentFont = False TabOrder = 0 @@ -67,10 +66,12 @@ object LicenseFrm: TLicenseFrm ClientWidth = 621 TabOrder = 1 object AcceptBtn: TButton + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter AnchorSideRight.Control = Bevel2 Left = 239 Height = 25 - Top = 0 + Top = 1 Width = 63 Anchors = [akTop, akRight] AutoSize = True @@ -81,6 +82,8 @@ object LicenseFrm: TLicenseFrm object RejectBtn: TButton AnchorSideLeft.Control = Bevel2 AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Panel1 + AnchorSideTop.Side = asrCenter AnchorSideRight.Control = Panel1 AnchorSideRight.Side = asrBottom Left = 318 @@ -97,10 +100,27 @@ object LicenseFrm: TLicenseFrm AnchorSideLeft.Side = asrCenter Left = 302 Height = 19 - Top = 4 + Top = 0 Width = 16 Shape = bsSpacer 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 object Bevel1: TBevel AnchorSideLeft.Control = Owner diff --git a/applications/lazstats/source/forms/misc/licenseunit.pas b/applications/lazstats/source/forms/misc/licenseunit.pas index 96808b95c..3c046a4e2 100644 --- a/applications/lazstats/source/forms/misc/licenseunit.pas +++ b/applications/lazstats/source/forms/misc/licenseunit.pas @@ -16,6 +16,7 @@ type AcceptBtn: TButton; Bevel1: TBevel; Bevel2: TBevel; + OKBtn: TButton; RejectBtn: TButton; Memo1: TMemo; Panel1: TPanel; @@ -29,14 +30,27 @@ var LicenseFrm: TLicenseFrm; function AcceptLicenseForm: Boolean; +function ShowLicense(FirstTime: Boolean): Boolean; implementation function AcceptLicenseForm: Boolean; +begin + Result := ShowLicense(true); +end; + +function ShowLicense(FirstTime: Boolean): Boolean; begin with TLicenseFrm.Create(nil) do 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); finally Free;