unit UFragmente;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, XPMan, StdCtrls, ComCtrls, ExtCtrls;
type
TForm2 =
class(TForm)
PErrors: TPanel;
Panel3: TPanel;
Panel2: TPanel;
Label1: TLabel;
BUpdate: TButton;
Label2: TLabel;
LVFragment: TListView;
PBFortschritt: TProgressBar;
LAct: TLabel;
BAddFragment: TButton;
GBFragment: TGroupBox;
LTitle: TLabel;
MDesc: TMemo;
CheckBox1: TCheckBox;
Label5: TLabel;
ODFragment: TOpenDialog;
ODDatabase: TOpenDialog;
procedure BAddFragmentClick(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.BAddFragmentClick(Sender: TObject);
var Fragment : TStringList;
begin
if ODFragment.Execute
then begin
with LVFragment.Items.Add
do begin
Caption := '
Ja';
Fragment.Create;
try
Fragment.LoadFromFile(ODFragment.FileName);
SubItems.Add(Fragment[0]);
if Fragment.Count = 3
then
SubItems.Add(IntToStr(Length(Fragment[1] + Fragment[2])))
else
SubItems.Add(IntToStr(Length(Fragment[1])));
finally
Fragment.Free;
end;
end;
end;
end;
end.