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 | |
---|
1 | unit UProject;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, fgl;
|
---|
9 |
|
---|
10 | type
|
---|
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 |
|
---|
39 | const
|
---|
40 | LazFuckProjectExt = '.lfp';
|
---|
41 |
|
---|
42 |
|
---|
43 | implementation
|
---|
44 |
|
---|
45 | { TProject }
|
---|
46 |
|
---|
47 | procedure TProject.SetOpenned(AValue: Boolean);
|
---|
48 | begin
|
---|
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;
|
---|
56 | end;
|
---|
57 |
|
---|
58 | constructor TProject.Create;
|
---|
59 | begin
|
---|
60 | Items := TProjectItems.Create;
|
---|
61 | end;
|
---|
62 |
|
---|
63 | destructor TProject.Destroy;
|
---|
64 | begin
|
---|
65 | FreeAndNil(Items);
|
---|
66 | inherited;
|
---|
67 | end;
|
---|
68 |
|
---|
69 | end.
|
---|
70 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.