Changeset 59 for trunk/IDE/UCore.pas
- Timestamp:
- Jul 17, 2012, 6:44:54 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/UCore.pas
r57 r59 13 13 14 14 TCustomCompiler = class(TCompiler) 15 SourceFiles: TSourceFileManager; 16 TargetFiles: TSourceFileManager; 15 17 procedure LoadFromRegistry(Root: HKEY; Key: string); 16 18 procedure SaveToRegistry(Root: HKEY; Key: string); 19 constructor Create; override; 20 destructor Destroy; override; 17 21 end; 18 22 … … 29 33 private 30 34 procedure ProjectChange(Sender: TObject); 35 function LoadSourceFile(FileName: string; var Content: string): Boolean; 36 function SaveSourceFile(FileName: string; const Content: string): Boolean; 31 37 public 32 38 ReopenLastOpenedFile: Boolean; … … 81 87 DeleteFile(DebugLog1.FileName); 82 88 Compiler := TCustomCompiler.Create; 89 //Compiler.OnLoadSource := LoadSourceFile; 90 //Compiler.OnSaveTarget := SaveSourceFile; 83 91 Project := TProject.Create; 84 92 ProjectTemplates := TProjectTemplateList.Create; … … 116 124 begin 117 125 FormMain.UpdateInterface; 126 end; 127 128 function TCore.LoadSourceFile(FileName: string; var Content: string): Boolean; 129 begin 130 131 end; 132 133 function TCore.SaveSourceFile(FileName: string; const Content: string): Boolean; 134 begin 135 118 136 end; 119 137 … … 205 223 end; 206 224 225 constructor TCustomCompiler.Create; 226 begin 227 inherited Create; 228 SourceFiles := TSourceFileManager.Create; 229 TargetFiles := TSourceFileManager.Create; 230 OnLoadSource := SourceFiles.GetFileContent; 231 OnSaveTarget := TargetFiles.SetFileContent; 232 end; 233 234 destructor TCustomCompiler.Destroy; 235 begin 236 TargetFiles.Free; 237 SourceFiles.Free; 238 inherited Destroy; 239 end; 240 207 241 208 242 end.
Note:
See TracChangeset
for help on using the changeset viewer.