-
Notifications
You must be signed in to change notification settings - Fork 13
/
SCAboutForm.pas
134 lines (107 loc) · 3.54 KB
/
SCAboutForm.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
124
125
126
127
128
129
130
131
132
133
134
{
This file is part of SuperCopier.
SuperCopier 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.
SuperCopier 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 SCAboutForm;
{$MODE Delphi}
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ShellApi,SCLocEngine,lclintf;
const
COSTAB_LENGTH=2048;
SC_ULTIMATE=false;
type
{ TAboutForm }
TAboutForm = class(TForm)
Image1: TImage;
Label1: TLabel;
llName: TLabel;
llStaffTitle: TLabel;
llStaff1: TLabel;
llURL: TLabel;
btOk: TButton;
llThanksTitle: TLabel;
llThanks1: TLabel;
llStaff2: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure imLogoClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure btOkClick(Sender: TObject);
procedure Label1Click(Sender: TObject);
procedure llURLClick(Sender: TObject);
private
{ Dйclarations privйes }
public
{ Dйclarations publiques }
//LogoBmp:TBitmap;
//procedure DrawLogo(Sender:TObject;var Done:Boolean);
end;
var
AboutForm: TAboutForm;
//poNoConsole
// donnйes pour l'effet
//CosTab:array[0..COSTAB_LENGTH-1] of Byte;
implementation
{$R *.lfm}
procedure TAboutForm.FormCreate(Sender: TObject);
var i:integer;
IniFileName:WideString;
begin
LocEngine.TranslateForm(Self);
//imLogo.Picture.Bitmap.PixelFormat:=pf32bit;
// copie de l'image dans une autre
//LogoBmp:=TBitmap.Create;
//LogoBmp.Width:=256;
//LogoBmp.Height:=256;
//LogoBmp.Canvas.Draw(0,0,imLogo.Picture.Bitmap);
//LogoBmp.PixelFormat:=pf32bit;
// on prйcalcule une petite table de cosinus
//for i:=0 to COSTAB_LENGTH-1 do CosTab[i]:=Round((Cos(i*2*Pi/COSTAB_LENGTH)+1)*255/2);
Label1.Caption:=StringReplace(Label1.Caption,'64','32',[rfReplaceAll]);
{$IFDEF cpux86_64}
Label1.Caption:=StringReplace(Label1.Caption,'32','64',[rfReplaceAll]);
{$ENDIF}
{$IFDEF WIN64}
Label1.Caption:=StringReplace(Label1.Caption,'32','64',[rfReplaceAll]);
{$ENDIF}
IniFileName:=ChangeFileExt(Application.ExeName,'.ini');
if FileExists(IniFileName) then Label1.Caption:=StringReplace(Label1.Caption,'Bits','Bits portable',[rfReplaceAll]);
Label1.Caption:=StringReplace(Label1.Caption,'Version: Ultimate ','Version: ',[rfReplaceAll]);
if SC_ULTIMATE then Label1.Caption:=StringReplace(Label1.Caption,'Version: ','Version: Ultimate ',[rfReplaceAll]);
end;
procedure TAboutForm.FormCloseQuery(Sender: TObject;
var CanClose: Boolean);
begin
Release;
AboutForm:=nil;
end;
procedure TAboutForm.FormDestroy(Sender: TObject);
begin
Application.OnIdle:=nil;
// LogoBmp.Free;
end;
procedure TAboutForm.imLogoClick(Sender: TObject);
begin
// Application.OnIdle:=DrawLogo;
end;
procedure TAboutForm.btOkClick(Sender: TObject);
begin
Close;
end;
procedure TAboutForm.Label1Click(Sender: TObject);
begin
end;
procedure TAboutForm.llURLClick(Sender: TObject);
begin
OpenDocument(PChar(String(llURL.Caption))); { *Converted from ShellExecute* }
end;
end.