unit start;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, ComCtrls,ShellAPI, jpeg, GIFImg, tlhelp32,
pngimage;
type
Tfrm_start =
class(TForm)
Image1: TImage;
Image2: TImage;
Image3: TImage;
Image4: TImage;
Image5: TImage;
bt_weiter: TImage;
bt_ende: TImage;
Image6: TImage;
Panel2: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
procedure FormCreate(Sender: TObject);
procedure bt_weiterMouseEnter(Sender: TObject);
procedure bt_weiterMouseLeave(Sender: TObject);
procedure bt_endeMouseEnter(Sender: TObject);
procedure bt_endeMouseLeave(Sender: TObject);
procedure bt_endeClick(Sender: TObject);
procedure bt_weiterClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
frm_start: Tfrm_start;
quelle :
string;
ziel :
string;
txt : textfile;
currentdir:
string;
bat :
string;
programme:
array [0 .. 30]
of string;
leerzeile : integer;
zeile:
string;
checkbox :
Array of TCheckBox;
left: integer;
top : integer;
j : integer;
filenames:
Array[0 .. 30]
of string;
ausgewählte_programme :
array[0..30]
of string;
implementation
uses progress;
{$R *.dfm}
procedure Tfrm_start.bt_weiterClick(Sender: TObject);
var
i: integer;
j : integer;
begin
for i := 0
to 29
do
begin
if checkbox[i].Checked = True
then ausgewählte_programme[j] := checkbox[i].Caption;
if ausgewählte_programme[j] <> '
'
then j := j +1;
end;
form1.Show;
end;
procedure Tfrm_start.FormCreate(Sender: TObject);
var
i: integer;
begin
// die checkboxen erstellen
SetLength(checkbox, 30);
left := 16;
top := 49;
for i := 0
to 29
do
begin
if i = 0
then else if i
mod 10 = 0
then left := left + 240;
checkbox[i]:= Tcheckbox.Create(panel2);
checkbox[i].parent := panel2;
checkbox[i].Visible := False;
checkbox[i].Left := left;
checkbox[i].Top :=top + j*23;
checkbox[i].width := 200;
j := j+1;
if j = 10
then j :=0 ;
if j = 0
then top := 49;
end;
// verfügbare Programme auslesen
i := 0;
currentdir := GetCurrentDir;
begin
j := 0;
AssignFile(txt,currentdir + '
\data.txt');
Reset(txt);
Readln(txt, zeile);
Readln(txt, zeile);
repeat
Readln(txt, zeile);
programme[i] := copy(zeile,15,length(zeile) - 15);
if programme[i] = '
'
then leerzeile := leerzeile + 1
else filenames[i] := programme[i] + '
.txt';
if programme[i] <> '
'
then checkbox[j].Caption := programme[i];
if programme[i] <> '
'
then checkbox[j].Visible := True ;
i:=i+1;
if checkbox[j].caption = '
'
then else j := j + 1;
until (leerzeile = 3);
CloseFile(txt);
end;
end;