Changeset 48 for trunk/IDE/Forms/UFormMain.pas
- Timestamp:
- Mar 4, 2012, 4:28:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormMain.pas
r47 r48 141 141 private 142 142 LastOpenedFiles: TLastOpenedList; 143 procedure ProjectTemplatesInit; 143 144 procedure CompilerDebugLog(Text: string); 144 145 procedure MenuItemTargetClick(Sender: TObject); … … 153 154 LogParsing: Boolean; 154 155 Project: TProject; 156 ProjectTemplates: TProjectTemplateList; 155 157 TargetProject: TProject; 156 158 Compiler: TCustomCompiler; … … 169 171 uses 170 172 UFormMessages, UFormSourceCode, UFormProject, UCommon, UFormAbout, UFormOptions, 171 UFormTargets, UTarget, UAnalyzer, UProducer, UExecutor; 173 UFormTargets, UTarget, UAnalyzer, UProducer, UExecutor, UFormProjectNew, 174 UProjectTemplates; 172 175 173 176 resourcestring … … 239 242 Compiler.Compile; 240 243 end; 241 //FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected);244 FormProject.TreeViewProjectChange(Self, FormProject.TreeViewProject.Selected); 242 245 FormMessages.Reload; 243 246 end; … … 483 486 Compiler := TCustomCompiler.Create; 484 487 Project := TProject.Create; 488 ProjectTemplates := TProjectTemplateList.Create; 485 489 TargetProject := TProject.Create; 486 490 LastOpenedFiles := TLastOpenedList.Create; … … 491 495 procedure TFormMain.FormDestroy(Sender: TObject); 492 496 begin 497 ProjectTemplates.Free; 493 498 LastOpenedFiles.Free; 494 499 TargetProject.Free; … … 497 502 end; 498 503 504 procedure TFormMain.ProjectTemplatesInit; 505 begin 506 ProjectTemplates.AddTemplate(TProjectTemplateConsoleApp.Create); 507 ProjectTemplates.AddTemplate(TProjectTemplateGUIApp.Create); 508 ProjectTemplates.AddTemplate(TProjectTemplatePackage.Create); 509 ProjectTemplates.AddTemplate(TProjectTemplateUnit.Create); 510 end; 511 499 512 procedure TFormMain.CompilerDebugLog(Text: string); 500 513 begin … … 514 527 LoadFromRegistry(RegistryRootKey, ApplicationInfo.RegistryKey); 515 528 DockInit; 529 ProjectTemplatesInit; 516 530 517 531 if ReopenLastOpenedFile and (LastOpenedFiles.Count > 0) then begin … … 560 574 NewFile: TProjectFile; 561 575 begin 562 AProjectClose.Execute;563 Project.Active := True;564 Project.FileName := SNewProject;565 Project.Files.AddFile('Unit1.pas');576 if FormProjectNew.ShowModal = mrOk then begin 577 if Assigned(FormProjectNew.ListView1.Selected) then 578 TProjectTemplate(FormProjectNew.ListView1.Selected.Data).InitProject(Project); 579 end; 566 580 UpdateInterface; 567 581 end;
Note:
See TracChangeset
for help on using the changeset viewer.