unit main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, IniFiles, ShellApi, StdCtrls, Menus;
type
TForm1 =
class(TForm)
GroupBox1: TGroupBox;
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
ComboBox2: TComboBox;
GroupBox2: TGroupBox;
GroupBox3: TGroupBox;
GroupBox4: TGroupBox;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
Button3: TButton;
Button4: TButton;
Button5: TButton;
Button6: TButton;
Label1: TLabel;
Button7: TButton;
Button8: TButton;
Button9: TButton;
Button10: TButton;
Button11: TButton;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
RadioButton4: TRadioButton;
RadioButton5: TRadioButton;
RadioButton6: TRadioButton;
procedure Button9Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
procedure ReadMainConfig;
procedure SaveMainConfig;
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
NIM : TNotifyIconData;
funzt:
String;
game:
String;
app:
String;
ExePath:
String;
ini: TIniFile;
startwithwin, onlyoneexe: Integer;
implementation
{$R *.dfm}
procedure TForm1ReadMainConfig;
begin
ExePath:=ExtractFilePath(ParamStr(0));
ini:=TInifile.Create(ExePath+'
\config.ini');
try
startwithwin:=ini.ReadInteger('
Options','
StartWithWin',2);
onlyoneexe:=ini.ReadInteger('
Options','
OnlyOneExe',2);
finally
ini.free;
end;
end;
procedure TForm1.SaveMainConfig;
var
gamestart, gamefinish: Integer;
gameprogramoption:
String;
begin
if CheckBox1.Checked=true
then startwithwin:=1
else startwithwin:=0;
if CheckBox2.Checked= true
then onlyoneexe:=1
else onlyoneexe:=0;
end;
procedure TForm1.Button9Click(Sender: TObject);
begin
close;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ReadMainConfig;
if startwithwin = 1
then
CheckBox1.Checked:= true;
if onlyoneexe = 1
then
CheckBox2.Checked:= true;
app:='
COD';
ShowMessage(app);
end;
end.