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.0 KB
|
Line | |
---|
1 | unit FormTargetCode;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SynEdit,
|
---|
7 | SynHighlighterMulti, SynHighlighterVB, SynHighlighterPas, SynHighlighterCpp,
|
---|
8 | SynHighlighterXML, Project;
|
---|
9 |
|
---|
10 | type
|
---|
11 |
|
---|
12 | { TFormTargetCode }
|
---|
13 |
|
---|
14 | TFormTargetCode = class(TForm)
|
---|
15 | SynCppSyn1: TSynCppSyn;
|
---|
16 | SynEdit1: TSynEdit;
|
---|
17 | SynPasSyn1: TSynPasSyn;
|
---|
18 | SynXMLSyn1: TSynXMLSyn;
|
---|
19 | private
|
---|
20 | FProjectFile: TProjectFile;
|
---|
21 | procedure SetProjectFile(AValue: TProjectFile);
|
---|
22 | public
|
---|
23 | procedure UpdateInterface;
|
---|
24 | property ProjectFile: TProjectFile read FProjectFile write SetProjectFile;
|
---|
25 | end;
|
---|
26 |
|
---|
27 |
|
---|
28 | implementation
|
---|
29 |
|
---|
30 | {$R *.lfm}
|
---|
31 |
|
---|
32 | uses
|
---|
33 | Core;
|
---|
34 |
|
---|
35 | procedure TFormTargetCode.SetProjectFile(AValue: TProjectFile);
|
---|
36 | begin
|
---|
37 | if FProjectFile = AValue then Exit;
|
---|
38 | FProjectFile := AValue;
|
---|
39 | if Assigned(AValue) then
|
---|
40 | SynEdit1.Lines.Assign(FProjectFile.Source)
|
---|
41 | else SynEdit1.ClearAll;
|
---|
42 | end;
|
---|
43 |
|
---|
44 | procedure TFormTargetCode.UpdateInterface;
|
---|
45 | begin
|
---|
46 | SynEdit1.Enabled := Assigned(Core.Core.Project);
|
---|
47 | if not Assigned(Core.Core.Project) then SynEdit1.ClearAll;
|
---|
48 | end;
|
---|
49 |
|
---|
50 | end.
|
---|
51 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.