unit Unit4;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, shellapi, Menus, jpeg, IniFiles, ExtCtrls;
type
TForm4 =
class(TForm)
Button1: TButton;
Edit1: TEdit;
Label1: TLabel;
Label2: TLabel;
Edit2: TEdit;
MainMenu1: TMainMenu;
Programmbeenden1: TMenuItem;
Info1: TMenuItem;
Label3: TLabel;
CheckBox3: TCheckBox;
Label4: TLabel;
CheckBox1: TCheckBox;
CheckBox4: TCheckBox;
CheckBox6: TCheckBox;
CheckBox7: TCheckBox;
CheckBox8: TCheckBox;
Button2: TButton;
Button3: TButton;
CheckBox9: TCheckBox;
Button4: TButton;
procedure Button1Click(Sender: TObject);
procedure Programmbeenden1Click(Sender: TObject);
procedure Info1Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure CheckBox7Click(Sender: TObject);
procedure CheckBox4Click(Sender: TObject);
procedure CheckBox9Click(Sender: TObject);
procedure CheckBox6Click(Sender: TObject);
procedure CheckBox8Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form4: TForm4;
adresse :
string;
ordner :
string;
implementation
uses Unit1;
{$R *.dfm}
// -----------------------------------------------------------------------------
// Button zum Starten und ändern der Realmlist
// -----------------------------------------------------------------------------
procedure TForm4.Button1Click(Sender: TObject);
var
myFile : TextFile;
text :
string;
adresse :
string;
ordner :
string;
begin
ordner := Edit2.text;
// Pfad zum Ordner wo die wow.exe liegt!
adresse := Edit1.text;
// Adresse des Servers der in Realmlist geändert werden soll
AssignFile(myFile, ordner+'
\realmlist.wtf');
ReWrite(myFile);
WriteLn(myFile, '
set realmlist ', adresse);
WriteLn(myFile, '
set patchlist 127.0.0.1');
WriteLn(myFile);
CloseFile(myFile);
ShellExecute(
Handle,
nil, PChar( Edit2.Text+'
\Rechner.exe'),
nil,
nil, SW_SHOW);
end;
// -----------------------------------------------------------------------------
// Button zum speichern in die .ini datei
// -----------------------------------------------------------------------------
procedure TForm4.Button2Click(Sender: TObject);
var ini: TIniFile;
adresse :
string;
ordner :
string;
begin
ordner := Edit2.text;
// Pfad zum Ordner wo die WoW.exe liegt!
adresse := Edit1.text;
// Adresse des Servers der in Realmlist geändert werden soll
ini:=TIniFile.create(ExtractFilePath(ParamStr(0))+
'
Launcher.ini');
if Checkbox1.Checked
then
begin
ini.WriteString('
CheckboxInhalt','
Checkbox1.Text ', ordner);
end;
end;
// ---------------------------------------------------------------------------//
// Button zum laden der Einstellungen der Checkboxen aus der .ini //
// ---------------------------------------------------------------------------//
procedure TForm4.Button4Click(Sender: TObject);
var ini: TIniFile;
begin
ini:=TIniFile.Create('
Launcher.ini');
try
Checkbox1.Caption := ini.ReadString('
CheckboxInhalt','
Checkbox1.Text ', '
');
finally
ini.free;
end;
end;
// ---------------------------------------------------------------------------//
// ---------------------------------------------------------------------------//
// ---------------------------------------------------------------------------//