unit Starter;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ImgList, ExtCtrls, ComCtrls, StdCtrls, ShellAPI, jpeg, IniFiles;
type
THaupt =
class(TForm)
Image1: TImage;
rbgerman: TRadioButton;
Image3: TImage;
rbenglish: TRadioButton;
Image4: TImage;
rbspanish: TRadioButton;
Image5: TImage;
rbjapanese: TRadioButton;
Image6: TImage;
rbrussian: TRadioButton;
bttclose: TButton;
bttcontinue: TButton;
Image2: TImage;
procedure Image2DblClick(Sender: TObject);
procedure rbrussianClick(Sender: TObject);
procedure rbjapaneseClick(Sender: TObject);
procedure rbspanishClick(Sender: TObject);
procedure rbenglishClick(Sender: TObject);
procedure rbgermanClick(Sender: TObject);
procedure bttcloseClick(Sender: TObject);
procedure bttcontinueClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Haupt: THaupt;
pfads, pfadj, pfadg, pfade, pfadr:
String;
implementation
uses PassWord;
{$R *.dfm}
procedure THaupt.bttcloseClick(Sender: TObject);
begin
application.Terminate;
end;
procedure THaupt.bttcontinueClick(Sender: TObject);
var ini: TIniFile;
iSuccess: Integer;
begin
ini := TIniFile.Create(ExtractFilePath(ParamStr(0))+ '
Einstellungen.ini');
pfads := ExtractFilePath(ParamStr(0)) + ini.ReadString('
Pfad','
Spanisch','
Nichts eingetragen');
pfade := ExtractFilePath(ParamStr(0)) + ini.ReadString('
Pfad','
Englisch','
Nichts eingetragen');
pfadr := ExtractFilePath(ParamStr(0)) + ini.ReadString('
Pfad','
Russisch','
Nichts eingetragen');
pfadg := ExtractFilePath(ParamStr(0)) + ini.ReadString('
Pfad','
Deutsch','
Nichts eingetragen');
pfadj := ExtractFilePath(ParamStr(0)) + ini.ReadString('
Pfad','
Japanisch','
Nichts eingetragen');
ini.free;
if rbspanish.Checked = true
then
begin iSuccess := ShellExecute(
Handle, '
open', PChar(pfads),
nil,
nil, SW_NORMAL);
if
iSuccess < 34
then
MessageBox(
Handle,PChar(SysErrorMessage(iSuccess)),'
Fehler',MB_OK
or MB_ICONERROR)
else
application.Terminate
end
else
if rbenglish.Checked = true
then
begin iSuccess := ShellExecute(
Handle, '
open', PChar(pfade),
nil,
nil, SW_NORMAL);
if
iSuccess < 34
then
MessageBox(
Handle,PChar(SysErrorMessage(iSuccess)),'
Fehler',MB_OK
or MB_ICONERROR)
else
application.Terminate
end
else
if rbgerman.Checked = true
then
begin iSuccess := ShellExecute(
Handle, '
open', PChar(pfadg),
nil,
nil, SW_NORMAL);
if
iSuccess < 34
then
MessageBox(
Handle,PChar(SysErrorMessage(iSuccess)),'
Fehler',MB_OK
or MB_ICONERROR)
else
Application.Terminate
end
else
if rbjapanese.Checked = true
then
begin iSuccess := ShellExecute(
Handle, '
open', PChar(pfadj),
nil,
nil, SW_NORMAL);
if
iSuccess < 34
then
MessageBox(
Handle,PChar(SysErrorMessage(iSuccess)),'
Fehler',MB_OK
or MB_ICONERROR)
else
application.Terminate
end
else
if rbrussian.Checked = true
then
begin iSuccess := ShellExecute(
Handle, '
open', PChar(pfadr),
nil,
nil, SW_NORMAL);
if
iSuccess < 34
then
MessageBox(
Handle,PChar(SysErrorMessage(iSuccess)),'
Fehler',MB_OK
or MB_ICONERROR)
else
application.Terminate
end
end;
procedure THaupt.rbgermanClick(Sender: TObject);
begin
bttcontinue.Enabled := true;
bttcontinue.Caption := '
Weiter';
bttclose.Caption := '
Schließen';
end;
procedure THaupt.rbenglishClick(Sender: TObject);
begin
bttcontinue.Enabled := true;
bttcontinue.Caption := '
Continue';
bttclose.Caption := '
Close';
end;
procedure THaupt.rbspanishClick(Sender: TObject);
begin
bttcontinue.Enabled := true;
bttcontinue.Caption := '
Ulterior';
bttclose.Caption := '
Concluir';
end;
procedure THaupt.rbjapaneseClick(Sender: TObject);
begin
bttcontinue.Enabled := true;
end;
procedure THaupt.rbrussianClick(Sender: TObject);
begin
bttcontinue.Enabled := true;
end;
procedure THaupt.Image2DblClick(Sender: TObject);
begin
PasswordDlg.showmodal;
end;
end.