Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
6 kaklik 1
// ******************************************************************************
2
//            This source has been created by Roman Schulz, 2002.
3
//          Visit my web-site at http://gds.oceany.cz for more info
4
// ******************************************************************************
5
 
6
 
7
unit SaveDialog;
8
 
9
interface
10
 
11
uses
12
  SysUtils, Dialogs, Forms, Controls, Classes, StdCtrls;
13
 
14
type
15
  TForm2 = class(TForm)
16
    Edit1: TEdit;
17
    Button1: TButton;
18
    Button2: TButton;
19
    Label1: TLabel;
20
    Button3: TButton;
21
    procedure Button1Click(Sender: TObject);
22
    procedure FormCreate(Sender: TObject);
23
    procedure Button2Click(Sender: TObject);
24
    procedure Button3Click(Sender: TObject);
25
  private
26
    Destination: string;
27
  end;
28
 
29
var
30
  Form2: TForm2;
31
 
32
implementation
33
 
34
uses Downloader;
35
 
36
{$R *.DFM}
37
 
38
 
39
 
40
//setup
41
procedure TForm2.FormCreate(Sender: TObject);
42
begin
43
  Destination := Form1.destination;
44
  Edit1.text := Form1.Destination;
45
end;
46
 
47
//OK
48
procedure TForm2.Button1Click(Sender: TObject);
49
begin
50
  Form1.Destination := Edit1.Text;
51
  Form1.enabled := true;
52
  Form2.visible := false;
53
end;
54
 
55
//Reset
56
procedure TForm2.Button2Click(Sender: TObject);
57
begin
58
  Form1.Destination := Destination;
59
  Form1.enabled := true;
60
  Form2.visible := false;
61
end;
62
 
63
//Default
64
procedure TForm2.Button3Click(Sender: TObject);
65
begin
66
  Form1.Destination := ExtractFilePath(Application.ExeName);
67
  Edit1.text := ExtractFilePath(Application.ExeName);
68
end;
69
 
70
 
71
 
72
end.
73
 
74
// ******************************************************************************
75
//            This source has been created by Roman Schulz, 2002.
76
//          Visit my web-site at http://gds.oceany.cz for more info
77
// ******************************************************************************