Subversion Repositories autosfx

Rev

Blame | Last modification | View Log | RSS feed

  1. unit extrunit;
  2. (************************************************************************
  3.  Copyright (C) 2009, 2010  by Russell J. Peters, Roger Aelbrecht,
  4.       Eric W. Engler and Chris Vleghert.
  5.  
  6.    This file is part of TZipMaster Version 1.9.
  7.  
  8.     TZipMaster is free software: you can redistribute it and/or modify
  9.     it under the terms of the GNU Lesser General Public License as published by
  10.     the Free Software Foundation, either version 3 of the License, or
  11.     (at your option) any later version.
  12.  
  13.     TZipMaster is distributed in the hope that it will be useful,
  14.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.     GNU Lesser General Public License for more details.
  17.  
  18.     You should have received a copy of the GNU Lesser General Public License
  19.     along with TZipMaster.  If not, see <http://www.gnu.org/licenses/>.
  20.  
  21.     contact: problems@delphizip.org (include ZipMaster in the subject).
  22.     updates: http://www.delphizip.org
  23.     DelphiZip maillist subscribe at http://www.freelists.org/list/delphizip
  24. ************************************************************************)
  25.  
  26.  
  27. {$INCLUDE ZipVers19.inc}
  28. {$IFDEF VERD6up}
  29.         {$WARN UNIT_PLATFORM OFF}
  30.         {$WARN SYMBOL_PLATFORM OFF}
  31. {$endif}
  32.  
  33. interface
  34.  
  35. uses
  36.   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  37.   StdCtrls, ExtCtrls, FileCtrl;
  38.  
  39. type
  40.   TExtract = class(TForm)
  41.     Panel1: TPanel;
  42.     Panel2: TPanel;
  43.     OKBut: TButton;
  44.     CancelBut: TButton;
  45.     DirectoryListBox1: TDirectoryListBox;
  46.     RadioGroup1: TRadioGroup;
  47.     RadioGroup2: TRadioGroup;
  48.     Panel3: TPanel;
  49.     DriveComboBox1: TDriveComboBox;
  50.     procedure OKButClick(Sender: TObject);
  51.     procedure CancelButClick(Sender: TObject);
  52.     procedure FormCreate(Sender: TObject);
  53.   private
  54.     { Private declarations }
  55.   public
  56.     { Public declarations }
  57.   end;
  58.  
  59. var
  60.   Extract: TExtract;
  61.  
  62. implementation
  63.  
  64. uses Unit1;
  65.  
  66. {$R *.DFM}
  67.  
  68. procedure TExtract.OKButClick(Sender: TObject);
  69. begin
  70.    Form1.ExtractDir:=DirectoryListBox1.Directory;
  71.    if RadioGroup1.ItemIndex = 0 then
  72.       Form1.ExpandDirs:=False
  73.    else
  74.       Form1.ExpandDirs:=True;
  75.    if RadioGroup2.ItemIndex = 0 then
  76.       Form1.Overwrite:=False
  77.    else
  78.       Form1.Overwrite:=True;
  79.    Close;
  80. end;
  81.  
  82. procedure TExtract.CancelButClick(Sender: TObject);
  83. begin
  84.    Form1.ExtractDir:='';
  85.    Close;
  86. end;
  87.  
  88. procedure TExtract.FormCreate(Sender: TObject);
  89. begin
  90.    RadioGroup1.ItemIndex := 0;  // dflt: do not expand dirs
  91.    RadioGroup2.ItemIndex := 1;  // dflt: overwrite existing files
  92. end;
  93.  
  94. end.
  95.