n := Length(
FTP) - 1;
if n = -1
then
exit;
FTP[n] := TFTP.Create;
i := Length(Accs) - 1;
If i = -1
then
exit;
Accs[i] := TTabSheet.Create(ParentCtrl);
Accs[i].PageControl := ParentCtrl;
ParentCtrl.ActivePage := Accs[i];
//Create everything else
FTP_DirectoryEdit := TEdit.Create(Accs[i]);
FTP_DirectoryEdit.Parent := Accs[i];
FTP_DirectoryEdit.
Name := '
FTP_DirectoryEdit';
FTP_DirectoryEdit.Height := 21;
FTP_DirectoryEdit.Align := alTop;
FTP_DirectoryEdit.BringToFront;
FTP_FolderTV := TTreeView.Create(Accs[i]);
FTP_FolderTV.Parent := Accs[i];
FTP_FolderTV.
Name := '
FTP_FolderTV';
FTP_FolderTV.Width := 270;
FTP_FolderTV.Left := 0;
FTP_FolderTV.Align := alLeft;
FTP_FolderTV.Images := TVImgList;
FTP_FolderTV.OnMouseUp := FTP_FolderTVMouseUp;
FTP_FolderTV.BringToFront;
Splitter := TSPlitter.Create(Accs[i]);
Splitter.Parent := Accs[i];
Splitter.
Name := '
Splitter';
Splitter.Left := FTP_FolderTV.Width;
Splitter.Align := alLeft;
Splitter.BringToFront;
FTP_FilesLV := TListView.Create(Accs[i]);
FTP_FilesLV.Parent := Accs[i];
FTP_FilesLV.
Name := '
FTP_FilesLV';
FTP_FilesLV.Align := alClient;
FTP_FilesLV.ViewStyle := vsReport;
li := FTP_FilesLV.Columns.Add;
li.Caption := '
Name';
li.AutoSize := True;
li := FTP_FilesLV.Columns.Add;
li.Caption := '
Typ';
li.AutoSize := True;
li := FTP_FilesLV.Columns.Add;
li.Caption := '
Größe';
li.AutoSize := True;
li := FTP_FilesLV.Columns.Add;
li.Caption := '
Geändert am';
li.AutoSize := True;
li := FTP_FilesLV.Columns.Add;
li.Caption := '
Rechte';
li.AutoSize := True;
FTP_FilesLV.OnDblClick := FTP_FilesLVDblClick;
FTP_FilesLV.PopupMenu := FTP_FilesLV_PopUp;
FTP_FilesLV.OnContextPopup := FTP_FilesLVContextPopup;
FTP_FilesLV.BringToFront;
FTP[n].Host := Accounts[n].Host;
FTP[n].Port := Accounts[n].Port;
FTP[n].LoginName := Accounts[n].User;
FTP[n].Password := Accounts[n].PW;
FTP[n].PassiveMode := Accounts[n].Passive;
FTP[n].Log := LogLv;
FTP[n].UseTV := True;
FTP[n].UseLV := True;
FTP[n].DirectoriesTV := TTreeView(PageControl2.ActivePage.Controls[2]);
FTP[n].FilesLV := TShellIconListView(PageControl2.ActivePage.Controls[3]);
FTP[n].Connect('
');
Accs[i].Caption := Accounts[n].
Name;