source: tags/1.2.0/UProject.pas

Last change on this file was 135, checked in by chronos, 3 years ago
  • Modified: Code cleanup.
  • Modified: More translated strings.
File size: 1.0 KB
Line 
1unit UProject;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, fgl;
9
10type
11 TProjectItem = class
12 Name: string;
13 end;
14
15 TProjectItems = class(TFPGObjectList<TProjectItem>)
16 end;
17
18 TProjectFile = class(TProjectItem)
19 end;
20
21 TProjectDirectory = class(TProjectItem)
22 end;
23
24 { TProject }
25
26 TProject = class
27 private
28 FOpenned: Boolean;
29 procedure SetOpenned(AValue: Boolean);
30 public
31 Items: TProjectItems;
32 Modified: Boolean;
33 FileName: string;
34 constructor Create;
35 destructor Destroy; override;
36 property Openned: Boolean read FOpenned write SetOpenned;
37 end;
38
39const
40 LazFuckProjectExt = '.lfp';
41
42
43implementation
44
45{ TProject }
46
47procedure TProject.SetOpenned(AValue: Boolean);
48begin
49 if FOpenned = AValue then Exit;
50 FOpenned := AValue;
51 if AValue then begin
52 Modified := False;
53 end else begin
54 FileName := '';
55 end;
56end;
57
58constructor TProject.Create;
59begin
60 Items := TProjectItems.Create;
61end;
62
63destructor TProject.Destroy;
64begin
65 FreeAndNil(Items);
66 inherited;
67end;
68
69end.
70
Note: See TracBrowser for help on using the repository browser.