source: trunk/IDE/Forms/FormTargetOptions.pas

Last change on this file was 75, checked in by chronos, 6 months ago
  • Modified: Removed U prefix from unit names.
  • Modified: Updated Common package.
File size: 1.9 KB
Line 
1unit FormTargetOptions;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
7 Target;
8
9type
10
11 { TFormTargetOptions }
12
13 TFormTargetOptions = class(TForm)
14 Button1: TButton;
15 Button2: TButton;
16 ButtonProducerSelect: TButton;
17 ButtonExecutorSelect: TButton;
18 EditProducer: TEdit;
19 EditExecutor: TEdit;
20 Label1: TLabel;
21 Label2: TLabel;
22 Label3: TLabel;
23 LabelName: TLabel;
24 OpenDialog1: TOpenDialog;
25 procedure ButtonProducerSelectClick(Sender: TObject);
26 procedure ButtonExecutorSelectClick(Sender: TObject);
27 private
28 { private declarations }
29 public
30 procedure LoadControls(Target: TTarget);
31 procedure SaveControls(Target: TTarget);
32 end;
33
34
35implementation
36
37
38{$R *.lfm}
39
40{ TFormTargetOptions }
41
42procedure TFormTargetOptions.ButtonProducerSelectClick(Sender: TObject);
43begin
44 OpenDialog1.FileName := EditProducer.Text;
45 if OpenDialog1.Execute then
46 EditProducer.Text := OpenDialog1.FileName;
47end;
48
49procedure TFormTargetOptions.ButtonExecutorSelectClick(Sender: TObject);
50begin
51 OpenDialog1.FileName := EditExecutor.Text;
52 if OpenDialog1.Execute then
53 EditExecutor.Text := OpenDialog1.FileName;
54end;
55
56procedure TFormTargetOptions.LoadControls(Target: TTarget);
57begin
58 LabelName.Caption := Target.Name;
59 ButtonExecutorSelect.Enabled := Assigned(Target.Executor);
60 EditExecutor.Enabled := Assigned(Target.Executor);
61 if Assigned(Target.Executor) then
62 EditExecutor.Text := Target.Executor.ExecutorPath
63 else EditExecutor.Text := '';
64 ButtonProducerSelect.Enabled := Assigned(Target.Producer);
65 EditProducer.Enabled := Assigned(Target.Producer);
66 if Assigned(Target.Producer) then
67 EditProducer.Text := Target.Producer.CompilerPath
68 else EditProducer.Text := '';
69end;
70
71procedure TFormTargetOptions.SaveControls(Target: TTarget);
72begin
73 Target.Executor.ExecutorPath := EditExecutor.Text;
74 Target.Producer.CompilerPath := EditProducer.Text;
75end;
76
77end.
78
Note: See TracBrowser for help on using the repository browser.