| 1 |
|
unit Extractor; |
| 2 |
+ |
|
| 3 |
|
interface |
| 4 |
+ |
|
| 5 |
|
uses |
| 6 |
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
| 7 |
< |
Dialogs, Template, StdCtrls, ExtCtrls, ComCtrls, Menus, Buttons, StrUtils; |
| 7 |
> |
Dialogs, _TemplateFileList, Menus, StdCtrls, ExtCtrls, Buttons, ComCtrls; |
| 8 |
|
|
| 9 |
|
type |
| 10 |
< |
TForm_Extractor = class(TForm_ToolTemplate) |
| 10 |
> |
TForm_Extractor = class(TForm_TemplateFileList) |
| 11 |
|
group_extract: TGroupBox; |
| 12 |
+ |
label_export_sel: TLabel; |
| 13 |
+ |
label_path: TLabel; |
| 14 |
|
check_dat: TCheckBox; |
| 15 |
|
check_raw: TCheckBox; |
| 16 |
|
check_convert: TCheckBox; |
| 17 |
|
radio_selected: TRadioButton; |
| 14 |
– |
label_export_sel: TLabel; |
| 18 |
|
radio_all: TRadioButton; |
| 16 |
– |
label_path: TLabel; |
| 19 |
|
edit_path: TEdit; |
| 20 |
|
btn_path: TButton; |
| 21 |
|
btn_export: TButton; |
| 24 |
|
lbl_estimated: TLabel; |
| 25 |
|
progress: TProgressBar; |
| 26 |
|
btn_abort: TButton; |
| 25 |
– |
procedure FormCreate(Sender: TObject); |
| 27 |
|
procedure btn_abortClick(Sender: TObject); |
| 28 |
< |
procedure btn_pathClick(Sender: TObject); |
| 28 |
> |
procedure FormCreate(Sender: TObject); |
| 29 |
|
procedure btn_exportClick(Sender: TObject); |
| 30 |
+ |
procedure btn_pathClick(Sender: TObject); |
| 31 |
|
private |
| 32 |
|
public |
| 33 |
|
end; |
| 34 |
|
|
| 33 |
– |
var |
| 34 |
– |
Form_Extractor: TForm_Extractor; |
| 35 |
|
|
| 36 |
|
implementation |
| 37 |
|
{$R *.dfm} |
| 38 |
< |
uses Main, Functions, Data, ConnectionManager, FolderBrowser, Exporters; |
| 38 |
> |
uses |
| 39 |
> |
Data, FolderBrowser, Exporters, _TemplateFile, ConnectionManager, Functions, |
| 40 |
> |
StrUtils; |
| 41 |
|
|
| 42 |
|
|
| 41 |
– |
procedure TForm_Extractor.FormCreate(Sender: TObject); |
| 42 |
– |
begin |
| 43 |
– |
inherited; |
| 44 |
– |
Self.AllowMultiSelect := True; |
| 45 |
– |
edit_path.Text := AppSettings.ExtractPath; |
| 46 |
– |
end; |
| 43 |
|
|
| 44 |
|
procedure TForm_Extractor.btn_abortClick(Sender: TObject); |
| 45 |
|
begin |
| 46 |
|
ShowMessage('X'); |
| 47 |
|
end; |
| 48 |
|
|
| 53 |
– |
procedure TForm_Extractor.btn_pathClick(Sender: TObject); |
| 54 |
– |
var |
| 55 |
– |
fb: TFolderBrowser; |
| 56 |
– |
begin |
| 57 |
– |
inherited; |
| 58 |
– |
|
| 59 |
– |
fb := TFolderBrowser.Create(Handle, 'Please select a folder where you want ' + |
| 60 |
– |
'the files to be stored...', edit_path.Text, False, True); |
| 61 |
– |
if fb.Execute then |
| 62 |
– |
begin |
| 63 |
– |
edit_path.Text := fb.SelectedItem; |
| 64 |
– |
AppSettings.ExtractPath := edit_path.Text; |
| 65 |
– |
end; |
| 66 |
– |
fb.Free; |
| 67 |
– |
end; |
| 68 |
– |
|
| 49 |
|
procedure TForm_Extractor.btn_exportClick(Sender: TObject); |
| 50 |
|
var |
| 51 |
|
begintime: Double; |
| 108 |
|
group_progress.Visible := False; |
| 109 |
|
end; |
| 110 |
|
|
| 111 |
+ |
procedure TForm_Extractor.btn_pathClick(Sender: TObject); |
| 112 |
+ |
var |
| 113 |
+ |
fb: TFolderBrowser; |
| 114 |
+ |
begin |
| 115 |
+ |
inherited; |
| 116 |
+ |
|
| 117 |
+ |
fb := TFolderBrowser.Create(Handle, 'Please select a folder where you want ' + |
| 118 |
+ |
'the files to be stored...', edit_path.Text, False, True); |
| 119 |
+ |
if fb.Execute then |
| 120 |
+ |
begin |
| 121 |
+ |
edit_path.Text := fb.SelectedItem; |
| 122 |
+ |
AppSettings.ExtractPath := edit_path.Text; |
| 123 |
+ |
end; |
| 124 |
+ |
fb.Free; |
| 125 |
+ |
end; |
| 126 |
+ |
|
| 127 |
+ |
procedure TForm_Extractor.FormCreate(Sender: TObject); |
| 128 |
+ |
begin |
| 129 |
+ |
inherited; |
| 130 |
+ |
Self.AllowMultiSelect := True; |
| 131 |
+ |
edit_path.Text := AppSettings.ExtractPath; |
| 132 |
+ |
end; |
| 133 |
|
|
| 134 |
|
begin |
| 135 |
|
AddToolListEntry('extractor', 'Extractor', ''); |
| 136 |
< |
end. |
| 136 |
> |
end. |
| 137 |
> |
|