unit mainform;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, jpeg, ExtCtrls;
type
TForm1 =
class(TForm)
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
Btn_setrealmlist: TButton;
Image1: TImage;
btn_srartwowundenderlc: TButton;
procedure INI_Read;
procedure Btn_setrealmlistClick(Sender: TObject);
procedure btn_srartwowundenderlcClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
server1path:
string;
implementation
uses Math, IniFiles;
{$R *.dfm}
procedure TForm1.INI_Read;
var
Ini: TIniFile;
begin
Ini:=TIniFile.Create('
serverlist.ini');
RadioButton1.Caption:=Ini.ReadString('
Server1','
name','
keine Angabe');
server1path:=Ini.ReadString('
Server1','
path','
keine Angabe');
RadioButton1.Visible:=Ini.ReadBool('
Server1','
show',True);
Ini.Free;
end;
procedure TForm1.Btn_setrealmlistClick(Sender: TObject);
var
datei: Textfile;
begin
if (RadioButton1.Checked = false)
and
(RadioButton2.Checked = false)
and
(RadioButton3.Checked = false)
and
(RadioButton4.Checked = false)
then
showmessage('
Bitte wähle einen Server')
else
begin
if RadioButton1.Checked = true
then
begin
assignfile(datei, '
realmlist.wtf');
rewrite(datei);
writeln(datei, server1path);
closefile(datei);
end;
if RadioButton2.Checked = true
then
begin
assignfile(datei, '
realmlist.wtf');
rewrite(datei);
writeln(datei, '
set realmlist jeff2.no-ip.info');
closefile(datei);
end;
If RadioButton3.Checked = true
then
begin
assignfile(datei, '
realmlist.wtf');
rewrite(datei);
writeln(datei, '
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
closefile(datei);
end;
if RadioButton4.Checked = true
then
begin
assignfile(datei, '
realmlist.wtf');
rewrite(datei);
writeln(datei, '
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy');
closefile(datei);
end;
end;
end;
procedure TForm1.btn_srartwowundenderlcClick(Sender: TObject);
begin
if FileExists('
wow.exe')= true
then
begin
WinExec('
wow.exe',sw_show);
end
else ShowMessage('
World of Warcraft konnte nicht gestarted werden! Bitte überprüfen sie, ob sich RealmlistChooser in ihrem World of Warcraft Installations-Ordner befindet.')
end;
end.