Changeset 55 for trunk/IDE/Forms
- Timestamp:
- Jul 13, 2012, 1:49:52 PM (12 years ago)
- Location:
- trunk/IDE/Forms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/UFormAbout.pas
r45 r55 31 31 implementation 32 32 33 uses 34 UCore; 35 33 36 resourcestring 34 37 SApplicationName = 'Application name'; … … 42 45 procedure TFormAbout.FormShow(Sender: TObject); 43 46 begin 44 with Memo1, Lines, ApplicationInfo do begin47 with Memo1, Lines, Core.ApplicationInfo do begin 45 48 BeginUpdate; 46 49 Clear; -
trunk/IDE/Forms/UFormMain.pas
r54 r55 7 7 uses 8 8 SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, 9 UCompiler,Registry, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas,9 Registry, ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, 10 10 UProject, FileUtil, Menus, ActnList, 11 UCoolTranslator, UFormTargetCode, UFormCodeTree, URegistry, ULastOpenedList, UApplicationInfo, 12 UDebugLog; 13 14 const 15 RegistryRootKey = HKEY_CURRENT_USER; 11 UFormTargetCode, UFormCodeTree, URegistry, UApplicationInfo; 16 12 17 13 type … … 164 160 uses 165 161 UCore, UFormMessages, UFormSourceCode, UFormProject, UCommon, UFormAbout, UFormOptions, 166 UFormTargets, UTarget, UAnalyzer, UProducer, UExecutor, UFormProjectNew, 167 UProjectTemplates, UFormTargetProject; 168 169 resourcestring 170 SNewProject = 'New project'; 162 UFormTargets, UTarget, UExecutor, UFormProjectNew, 163 UFormTargetProject; 171 164 172 165 { TFormMain } … … 441 434 Title: string; 442 435 begin 443 Title := ApplicationInfo.Name;436 Title := Core.ApplicationInfo.AppName; 444 437 if Assigned(Core.Project) then begin 445 438 if Core.Project.FileName <> '' then Title := Core.Project.FileName + ' - ' + Title; … … 452 445 begin 453 446 AProjectClose.Execute; 454 Core.SaveToRegistry( RegistryRootKey,ApplicationInfo.RegistryKey);447 Core.SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 455 448 end; 456 449 457 450 procedure TFormMain.FormCreate(Sender: TObject); 458 var459 I: Integer;460 451 begin 461 452 end; … … 472 463 473 464 procedure TFormMain.FormShow(Sender: TObject); 474 var 475 NewProjectFile: TProjectFile; 476 begin 477 Core.LoadFromRegistry(RegistryRootKey, ApplicationInfo.RegistryKey); 465 begin 466 Core.LoadFromRegistry(HKEY(Core.ApplicationInfo.RegistryRoot), Core.ApplicationInfo.RegistryKey); 478 467 DockInit; 479 468 Core.ProjectTemplatesInit; … … 517 506 procedure TFormMain.AHomepageExecute(Sender: TObject); 518 507 begin 519 OpenWebPage( ApplicationInfo.HomePage);508 OpenWebPage(Core.ApplicationInfo.HomePage); 520 509 end; 521 510 … … 526 515 527 516 procedure TFormMain.AProjectNewExecute(Sender: TObject); 528 var529 NewFile: TProjectFile;530 517 begin 531 518 if FormProjectNew.ShowModal = mrOk then begin -
trunk/IDE/Forms/UFormProject.lfm
r45 r55 7 7 ClientHeight = 253 8 8 ClientWidth = 331 9 LCLVersion = ' 0.9.31'9 LCLVersion = '1.1' 10 10 object TreeViewProject: TTreeView 11 11 Left = 0 … … 14 14 Width = 331 15 15 Align = alClient 16 DefaultItemHeight = 16 17 PopupMenu = PopupMenuFile 16 18 ReadOnly = True 17 19 TabOrder = 0 … … 19 21 Options = [tvoAutoItemHeight, tvoHideSelection, tvoKeepCollapsedNodes, tvoReadOnly, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] 20 22 end 23 object PopupMenuFile: TPopupMenu 24 Images = FormMain.ImageList1 25 left = 94 26 top = 38 27 object MenuItem4: TMenuItem 28 Action = AShow 29 end 30 object MenuItem1: TMenuItem 31 Action = AAdd 32 end 33 object MenuItem2: TMenuItem 34 Action = ADelete 35 end 36 object MenuItem3: TMenuItem 37 Action = ARename 38 end 39 end 40 object ActionList1: TActionList 41 left = 184 42 top = 40 43 object AAdd: TAction 44 Caption = 'Add' 45 OnExecute = AAddExecute 46 end 47 object ADelete: TAction 48 Caption = 'Delete' 49 end 50 object ARename: TAction 51 Caption = 'Rename' 52 end 53 object AShow: TAction 54 Caption = 'Show' 55 end 56 end 57 object OpenDialog1: TOpenDialog 58 left = 94 59 top = 98 60 end 21 61 end -
trunk/IDE/Forms/UFormProject.lrt
r45 r55 1 1 TFORMPROJECT.CAPTION=Project manager 2 TFORMPROJECT.AADD.CAPTION=Add 3 TFORMPROJECT.ADELETE.CAPTION=Delete 4 TFORMPROJECT.ARENAME.CAPTION=Rename 5 TFORMPROJECT.ASHOW.CAPTION=Show -
trunk/IDE/Forms/UFormProject.pas
r54 r55 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 UProject;7 Menus, ActnList, UProject; 8 8 9 9 type … … 12 12 13 13 TFormProject = class(TForm) 14 AAdd: TAction; 15 AShow: TAction; 16 ARename: TAction; 17 ADelete: TAction; 18 ActionList1: TActionList; 19 MenuItem1: TMenuItem; 20 MenuItem2: TMenuItem; 21 MenuItem3: TMenuItem; 22 MenuItem4: TMenuItem; 23 OpenDialog1: TOpenDialog; 24 PopupMenuFile: TPopupMenu; 14 25 TreeViewProject: TTreeView; 26 procedure AAddExecute(Sender: TObject); 15 27 procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode); 16 28 private … … 67 79 end; 68 80 81 procedure TFormProject.AAddExecute(Sender: TObject); 82 begin 83 if Sender is TMenuItem then 84 with TMenuItem(Sender) do begin 85 if OpenDialog1.Execute then begin 86 87 UpdateProjectTree; 88 end; 89 end; 90 end; 91 69 92 procedure TFormProject.UpdateProjectTree; 70 93 var 71 94 NewNode: TTreeNode; 72 95 begin 73 with Core, TreeViewProject, Items do begin 96 with Core, TreeViewProject, Items do 97 try 74 98 BeginUpdate; 75 99 Clear; 76 100 if Assigned(Project) then begin 77 NewNode := AddChild (nil, ExtractFileNameOnly(Project.FileName));101 NewNode := AddChildObject(nil, ExtractFileNameOnly(Project.FileName), Project); 78 102 UpdateProjectFiles(NewNode, Project.Files); 79 103 NewNode.Expand(True); 80 104 end; 81 EndUpdate;82 105 if Assigned(TreeViewProject.TopItem) and 83 106 (TreeViewProject.TopItem.Count > 0) then 84 107 TreeViewProject.TopItem.Items[0].Selected := True 85 108 else FormSourceCode.ProjectFile := nil; 109 finally 110 EndUpdate; 86 111 end; 87 112 end; … … 113 138 end; 114 139 end; 115 NewNode := TreeViewProject.Items.AddChild(SelNode, FileName); 116 NewNode.Data := Pointer(Files[I]); 140 NewNode := TreeViewProject.Items.AddChildObject(SelNode, FileName, Pointer(Files[I])); 117 141 end; 118 142 end;
Note:
See TracChangeset
for help on using the changeset viewer.