|
Last change
on this file was 167, checked in by chronos, 14 months ago |
- Modified: Used scrollbox in target options form.
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 1 | unit FormTargetOptions;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
|
|---|
| 7 | Target, FormEx;
|
|---|
| 8 |
|
|---|
| 9 | type
|
|---|
| 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 |
|
|---|
| 32 | implementation
|
|---|
| 33 |
|
|---|
| 34 | {$R *.lfm}
|
|---|
| 35 |
|
|---|
| 36 | { TFormTargetOptions }
|
|---|
| 37 |
|
|---|
| 38 | procedure TFormTargetOptions.ButtonCompilerClick(Sender: TObject);
|
|---|
| 39 | begin
|
|---|
| 40 | OpenDialog1.FileName := Edit1.Text;
|
|---|
| 41 | if OpenDialog1.Execute then Edit1.Text := OpenDialog1.FileName;
|
|---|
| 42 | end;
|
|---|
| 43 |
|
|---|
| 44 | procedure TFormTargetOptions.ButtonExecuteClick(Sender: TObject);
|
|---|
| 45 | begin
|
|---|
| 46 | OpenDialog1.FileName := Edit2.Text;
|
|---|
| 47 | if OpenDialog1.Execute then Edit2.Text := OpenDialog1.FileName;
|
|---|
| 48 | end;
|
|---|
| 49 |
|
|---|
| 50 | procedure TFormTargetOptions.LoadControls(Target: TTarget);
|
|---|
| 51 | begin
|
|---|
| 52 | Edit1.Text := Target.CompilerPath;
|
|---|
| 53 | Edit2.Text := Target.ExecutorPath;
|
|---|
| 54 | end;
|
|---|
| 55 |
|
|---|
| 56 | procedure TFormTargetOptions.SaveControls(Target: TTarget);
|
|---|
| 57 | begin
|
|---|
| 58 | Target.CompilerPath := Edit1.Text;
|
|---|
| 59 | Target.ExecutorPath := Edit2.Text;
|
|---|
| 60 | end;
|
|---|
| 61 |
|
|---|
| 62 | end.
|
|---|
| 63 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.