-
Notifications
You must be signed in to change notification settings - Fork 2
/
copyright.pas
123 lines (103 loc) · 3.21 KB
/
copyright.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
// ***********************************************************************
// ***********************************************************************
// WordStatix 2.x
// Author and copyright: Massimo Nardello, Modena (Italy) 2016 - 2020.
// Free software released under GPL licence version 3 or later.
// This program 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 3 of the License, or
// (at your option) any later version. You can read the version 3
// of the Licence in http://www.gnu.org/licenses/gpl-3.0.txt
// or in the file Licence.txt included in the files of the
// source code of this software.
// This program 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.
// ***********************************************************************
// ***********************************************************************
unit Copyright;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
ExtCtrls, LCLIntf;
type
{ TfmCopyright }
TfmCopyright = class(TForm)
bnCopyright: TButton;
imImage: TImage;
lbCopyrightSubTitle: TLabel;
lbCopyrightAuthor1: TLabel;
lbCopyrightAuthor2: TLabel;
lbCopyrightName: TLabel;
lbSite: TLabel;
meCopyrightText: TMemo;
tmAlarmForm: TTimer;
procedure bnCopyrightClick(Sender: TObject);
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
procedure FormCreate(Sender: TObject);
procedure FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState);
procedure FormShow(Sender: TObject);
procedure lbSiteClick(Sender: TObject);
procedure tmAlarmFormTimer(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
fmCopyright: TfmCopyright;
implementation
{$R *.lfm}
{ TfmCopyright }
procedure TfmCopyright.FormClose(Sender: TObject; var CloseAction: TCloseAction);
begin
// Stop the timer anyway
tmAlarmForm.Enabled := False;
end;
procedure TfmCopyright.FormCreate(Sender: TObject);
begin
// Set color
{$ifdef Linux}
fmCopyright.Color := clWhite;
{$endif}
{$ifdef Windows}
fmCopyright.Color := clWhite;
{$endif}
end;
procedure TfmCopyright.bnCopyrightClick(Sender: TObject);
begin
// Quit
Close;
end;
procedure TfmCopyright.FormKeyDown(Sender: TObject; var Key: word; Shift: TShiftState);
begin
// Quit
if key = 27 then
Close;
end;
procedure TfmCopyright.FormShow(Sender: TObject);
begin
// Start fading
fmCopyright.AlphaBlendValue := 0;
tmAlarmForm.Enabled := True;
end;
procedure TfmCopyright.lbSiteClick(Sender: TObject);
begin
// Open the website
OpenURL('http://sites.google.com/site/wordstatix/');
end;
procedure TfmCopyright.tmAlarmFormTimer(Sender: TObject);
begin
// Show the form fading
if fmCopyright.AlphaBlendValue < 255 then
begin
fmCopyright.AlphaBlendValue := fmCopyright.AlphaBlendValue + 1;
end
else
begin
tmAlarmForm.Enabled := False;
end;
end;
end.