source: trunk/Forms/FormTargetOptions.pas

Last change on this file was 167, checked in by chronos, 11 months ago
  • Modified: Used scrollbox in target options form.
File size: 1.3 KB
Line 
1unit FormTargetOptions;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
7 Target, FormEx;
8
9type
10
11 { TFormTargetOptions }
12
13 TFormTargetOptions = class(TFormEx)
14 ButtonCompiler: TButton;
15 ButtonExecute: TButton;
16 ButtonOk: TButton;
17 ButtonCancel: TButton;
18 Edit1: TEdit;
19 Edit2: TEdit;
20 Label1: TLabel;
21 Label2: TLabel;
22 OpenDialog1: TOpenDialog;
23 ScrollBox1: TScrollBox;
24 procedure ButtonCompilerClick(Sender: TObject);
25 procedure ButtonExecuteClick(Sender: TObject);
26 public
27 procedure LoadControls(Target: TTarget);
28 procedure SaveControls(Target: TTarget);
29 end;
30
31
32implementation
33
34{$R *.lfm}
35
36{ TFormTargetOptions }
37
38procedure TFormTargetOptions.ButtonCompilerClick(Sender: TObject);
39begin
40 OpenDialog1.FileName := Edit1.Text;
41 if OpenDialog1.Execute then Edit1.Text := OpenDialog1.FileName;
42end;
43
44procedure TFormTargetOptions.ButtonExecuteClick(Sender: TObject);
45begin
46 OpenDialog1.FileName := Edit2.Text;
47 if OpenDialog1.Execute then Edit2.Text := OpenDialog1.FileName;
48end;
49
50procedure TFormTargetOptions.LoadControls(Target: TTarget);
51begin
52 Edit1.Text := Target.CompilerPath;
53 Edit2.Text := Target.ExecutorPath;
54end;
55
56procedure TFormTargetOptions.SaveControls(Target: TTarget);
57begin
58 Target.CompilerPath := Edit1.Text;
59 Target.ExecutorPath := Edit2.Text;
60end;
61
62end.
63
Note: See TracBrowser for help on using the repository browser.