source: trunk/IDE/Forms/FormTargetCode.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.0 KB
Line 
1unit FormTargetCode;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SynEdit,
7 SynHighlighterMulti, SynHighlighterVB, SynHighlighterPas, SynHighlighterCpp,
8 SynHighlighterXML, Project;
9
10type
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
28implementation
29
30{$R *.lfm}
31
32uses
33 Core;
34
35procedure TFormTargetCode.SetProjectFile(AValue: TProjectFile);
36begin
37 if FProjectFile = AValue then Exit;
38 FProjectFile := AValue;
39 if Assigned(AValue) then
40 SynEdit1.Lines.Assign(FProjectFile.Source)
41 else SynEdit1.ClearAll;
42end;
43
44procedure TFormTargetCode.UpdateInterface;
45begin
46 SynEdit1.Enabled := Assigned(Core.Core.Project);
47 if not Assigned(Core.Core.Project) then SynEdit1.ClearAll;
48end;
49
50end.
51
Note: See TracBrowser for help on using the repository browser.