Subversion Repositories svnkaklik

Rev

Blame | Last modification | View Log | Download

// ******************************************************************************
//            This source has been created by Roman Schulz, 2002.
//          Visit my web-site at http://gds.oceany.cz for more info
// ******************************************************************************


unit SaveDialog;

interface

uses
  SysUtils, Dialogs, Forms, Controls, Classes, StdCtrls;

type
  TForm2 = class(TForm)
    Edit1: TEdit;
    Button1: TButton;
    Button2: TButton;
    Label1: TLabel;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
  private
    Destination: string;
  end;

var
  Form2: TForm2;

implementation

uses Downloader;

{$R *.DFM}



//setup
procedure TForm2.FormCreate(Sender: TObject);
begin
  Destination := Form1.destination;
  Edit1.text := Form1.Destination;
end;

//OK
procedure TForm2.Button1Click(Sender: TObject);
begin
  Form1.Destination := Edit1.Text;
  Form1.enabled := true;
  Form2.visible := false;
end;

//Reset
procedure TForm2.Button2Click(Sender: TObject);
begin
  Form1.Destination := Destination;
  Form1.enabled := true;
  Form2.visible := false;
end;

//Default
procedure TForm2.Button3Click(Sender: TObject);
begin
  Form1.Destination := ExtractFilePath(Application.ExeName);
  Edit1.text := ExtractFilePath(Application.ExeName);
end;



end.

// ******************************************************************************
//            This source has been created by Roman Schulz, 2002.
//          Visit my web-site at http://gds.oceany.cz for more info
// ******************************************************************************