source: ProjectTemplates/FileMenuProject/UProject.pas

Last change on this file was 507, checked in by chronos, 7 years ago
  • Modified: Update Common package.
  • Added: Support for color theme.
File size: 790 bytes
Line 
1unit UProject;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, UDataFile;
9
10type
11
12 { TProject }
13
14 TProject = class(TDataFile)
15 private
16 public
17 constructor Create; override;
18 function GetFileExt: string; override;
19 function GetFileDialogFilter: string; override;
20 end;
21
22
23implementation
24
25resourcestring
26 SProjectName = 'New project';
27 SProjectFiles = 'Project files';
28
29
30{ TProject }
31
32constructor TProject.Create;
33begin
34 inherited Create;
35 FileName := SProjectName + GetFileExt;
36end;
37
38function TProject.GetFileExt: string;
39begin
40 Result := '.prj';
41end;
42
43function TProject.GetFileDialogFilter: string;
44begin
45 Result := SProjectFiles + ' (' + GetFileExt + ')|*' + GetFileExt + '|' +
46 SAllFiles + '|*.*';
47end;
48
49end.
50
Note: See TracBrowser for help on using the repository browser.