unit StartbildschirmUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls, jpeg, ExtCtrls, LMDControl, LMDBaseControl,
LMDBaseGraphicControl, LMDBaseLabel, LMDCustomLabel, LMDCustomLabelFill,
LMDLabelFill, LMDCustomSimpleLabel, LMDSimpleLabel;
type
TStartbildschirm =
class(TForm)
StartTimer: TTimer;
Image1: TImage;
Label1: TLabel;
Label2: TLabel;
LMDSimpleLabel1: TLMDSimpleLabel;
Memo1: TMemo;
ProgressBar1: TProgressBar;
Timer1: TTimer;
LMDSimpleLabel2: TLMDSimpleLabel;
LMDSimpleLabel3: TLMDSimpleLabel;
LMDSimpleLabel4: TLMDSimpleLabel;
Label3: TLabel;
Label4: TLabel;
Memo2: TMemo;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
procedure StartTimerTimer(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Startbildschirm: TStartbildschirm;
implementation
uses Inifiles, BrainTrainerStartUnit, Registry, InfoUnit, BestenlisteUnit, AnfaengerUnit, MittelUnit, ProfiUnit, GenieUnit,EndeUnit,
RegSchluesselEingabeUnit, CommCtrl, OptionsUnit;
{$R *.dfm}
procedure TStartbildschirm.StartTimerTimer(Sender: TObject);
begin
Start.show;
Startbildschirm.Visible := false;
if Start.Visible = true
then
begin
Startbildschirm.StartTimer.Enabled := false ;
end;
end;
procedure TStartbildschirm.FormShow(Sender: TObject);
begin
if FileExists('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\RegKey.txt')
then
begin
Memo1.Lines.LoadFromFile('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\RegKey.txt');
end;
end;
procedure TStartbildschirm.FormCreate(Sender: TObject);
var regist: TRegistry;
i: integer;
s:
string;
datum1, datum2, datum3: TDate;
ini : TInifile;
begin
{
if FileExists('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\FVsRegKey.rep') then
begin
startbildschirm.Memo1.Lines.LoadFromFile('C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\FVsRegKey.rep');
Startbildschirm.LMDSimpleLabel1.visible := false;
Startbildschirm.LMDSimpleLabel2.Visible := false;
Startbildschirm.LMDSimpleLabel3.Visible := false;
Startbildschirm.LMDSimpleLabel4.Visible := false;
end;
}
regist:=TRegistry.Create;
try
regist.RootKey:=HKEY_LOCAL_MACHINE;
//voreingestellt ist HKEY_CURRENT_USER
regist.OpenKey('
SOFTWARE\E.T.-IT Software Corporation\BrainTrainer\2.0',true);
regist.WriteString('
Product', '
BrainTrainer');
regist.WriteString('
Version', '
2.0');
regist.WriteString('
Seriennummer', '
PTIN-ZVUW-MKOH-XZ5D');
if LMDSimpleLabel1.Visible = true
then
begin
regist.WriteString('
', '
Unregistriert');
end else
begin
regist.WriteString('
', '
Registriert');
end;
finally
regist.Free;
end;
if FileExists('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\language.ini')
then
try
Ini:=TIniFile.Create('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\language.ini');
label7.Caption:=Ini.ReadString('
favoritelanguage','
language','
Wert');
finally
Ini.Free;
end;
startbildschirm.label5.Caption := datetostr(now);
if fileexists('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\regdate.rep')
then
begin
startbildschirm.memo2.Lines.LoadFromFile('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\regdate.rep');
startbildschirm.label4.Caption := startbildschirm.memo2.Text;
datum1:=StrToDate(label4.Caption);
datum2:=now;
{ datum3:=label3.caption;}
//Differenz zwischen datum1 und datum2 in Tagen
datum3:=datum2-datum1;
label3.Caption := datetostr(datum3);
SendMessage(Startbildschirm.ProgressBar1.Handle, PBM_SETBARCOLOR, 0,cllime);
if FileExists('
C:\Program Files\E.T.-IT Software Corporation\BrainTrainer 2.0\Config.reg')
then
begin
Options.visible:=false;
end else
Options.visible:=true;
end;
end;
procedure TStartbildschirm.Timer1Timer(Sender: TObject);
begin
ProgressBar1.StepIt;
end;
end.