unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ZipMstr, StdCtrls;
type
TForm1 =
class(TForm)
ZipMaster1: TZipMaster;
Button3: TButton;
ListBox1: TListBox;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
ZipMaster1.MaxVolumeSize :=10000;
Zipmaster1.FSpecArgs.Clear;
Zipmaster1.ZipFileName:='
C:\test.zip';
Zipmaster1.FSpecArgs.Add('
C:\zipmaster.zip');
Zipmaster1.AddOptions := [];
Zipmaster1.AddOptions:= Zipmaster1.AddOptions + [AddDiskSpan];
Zipmaster1.Add;
end;
procedure TForm1.Button3Click(Sender: TObject);
var
IsOne:
String;
begin
ZipMaster1.MaxVolumeSize :=10000;
Zipmaster1.AddOptions := Zipmaster1.AddOptions + [AddDiskSpan];
{ we want diskspanning }
Zipmaster1.FSpecArgs.Clear;
Zipmaster1.FSpecArgs.Assign(Form1.ListBox1.Items);
{ specify filenames }
Zipmaster1.FSpecArgs.Add('
C:\zipmaster.zip');
Try
Zipmaster1.Add;
Except
ShowMessage('
Error in Add; Fatal DLL Exception in mainunit');
End;
If Zipmaster1.SuccessCnt = 1
Then
IsOne := '
was'
Else
IsOne := '
s were';
ShowMessage(IntToStr(Zipmaster1.SuccessCnt) + '
file' + IsOne + '
added');
end;
end.