procedure TForm1.ListView1Click(Sender: TObject);
begin
if (listview1.Items.Count <> 0)
and (listview1.Selected <>
nil)
then
begin
vle1.Strings.Clear;
vle1.Strings.BeginUpdate;
vle1.TopRow:=vle1.InsertRow('
Config-Name',listview1.Selected.Caption,true);
vle1.InsertRow('
Datasource-Name',listview1.Selected.SubItems[0],true);
vle1.InsertRow('
Service-URL',listview1.Selected.SubItems[1],true);
vle1.InsertRow('
LFS-Cache-Path',listview1.Selected.SubItems[2],true);
vle1.InsertRow('
LFS-Config-Name',listview1.Selected.SubItems[3],true);
vle1.Strings.EndUpdate;
vle2.Strings.Clear;
vle2.Strings.BeginUpdate;
if listview1.Selected.SubItems[4]<>'
'
then
begin
vle2.TopRow:=vle1.InsertRow('
Datasource-Name',listview1.Selected.SubItems[4],true);
end
else begin
showmessage('
The Configuration ' +listview1.Selected.Caption + '
is corrupt!');
end;
vle2.InsertRow('
Database-Type',listview1.Selected.SubItems[5],true);
vle2.InsertRow('
Database-URL',listview1.Selected.SubItems[6],true);
vle2.InsertRow('
Database-Driver',listview1.Selected.SubItems[7],true);
vle2.InsertRow('
LFS-Config-Name',listview1.Selected.SubItems[8],true);
vle2.InsertRow('
LFS-Cache-Path',listview1.Selected.SubItems[9],true);
try
vle2.InsertRow('
DB-User',listview1.Selected.SubItems[10],true);
except
begin
vle2.DeleteRow(6);
vle2.InsertRow('
DB-User','
',true);
end;
end;
try
vle2.InsertRow('
DB-Password',listview1.Selected.SubItems[11],true);
except
begin
vle2.DeleteRow(7);
vle2.InsertRow('
DB-Password','
',true);
end;
end;
try
vle2.InsertRow('
LFS-User',listview1.Selected.SubItems[12],true);
except
begin
vle2.DeleteRow(8);
vle2.InsertRow('
LFS-User','
',true);
end;
end;
try
vle2.InsertRow('
LFS-Password',listview1.Selected.SubItems[13],true);
except
begin
vle2.DeleteRow(9);
vle2.InsertRow('
LFS-Password','
',true);
end;
end;
vle2.Strings.EndUpdate;
end
else exit;
end;