Changeset 75 for trunk/IDE/Forms/FormProject.pas
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/IDE/Forms/FormProject.pas
r74 r75 1 unit UFormProject;1 unit FormProject; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,7 Menus, ActnList, UProject;6 Classes, SysUtils, LazFileUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, Project; 8 8 9 9 type 10 TShowProjectEvent = procedure (ProjectFile: TProjectFile) of object; 10 11 11 12 { TFormProject } … … 31 32 procedure TreeViewProjectDblClick(Sender: TObject); 32 33 private 33 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFileList); 34 FOnShowProject: TShowProjectEvent; 35 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFiles); 34 36 public 35 37 procedure UpdateProjectTree; 36 38 procedure UpdateInterface; 39 property OnShowProject: TShowProjectEvent read FOnShowProject write FOnShowProject; 37 40 end; 38 41 39 42 var 40 43 FormProject: TFormProject; 44 41 45 42 46 implementation … … 45 49 46 50 uses 47 UCore, UFormMain, UFormSourceCode, UFormTargetCode, UFormCodeTree;51 Core, FormMain, FormSourceCode, FormTargetCode, FormCodeTree; 48 52 49 53 resourcestring … … 56 60 ); 57 61 begin 58 with FormMain, FormSourceCode do59 62 if Assigned(Node) then begin 60 63 if TProjectFile(Node.Data) is TProjectFile then begin … … 107 110 begin 108 111 if Assigned(TreeViewProject.Selected) then 109 Core. Project.Files.Remove(TreeViewProject.Selected.Data);112 Core.Core.Project.Files.Remove(TreeViewProject.Selected.Data); 110 113 UpdateProjectTree; 111 114 end; … … 126 129 begin 127 130 if Assigned(TreeViewProject.Selected) then begin 128 FormMain.TabSheetSource.Show;129 FormSourceCode.ProjectFile := TProjectFile(TreeViewProject.Selected.Data);131 if Assigned(FOnShowProject) then 132 FOnShowProject(TProjectFile(TreeViewProject.Selected.Data)); 130 133 end; 131 134 end; … … 135 138 NewNode: TTreeNode; 136 139 begin 137 with Core , TreeViewProject, Items do140 with Core.Core, TreeViewProject, Items do 138 141 try 139 142 BeginUpdate; … … 147 150 (TreeViewProject.TopItem.Count > 0) then 148 151 TreeViewProject.TopItem.Items[0].Selected := True 149 else FormSourceCode.ProjectFile := nil; 152 else begin 153 if Assigned(FOnShowProject) then 154 FOnShowProject(nil); 155 end; 150 156 finally 151 157 EndUpdate; … … 158 164 end; 159 165 160 procedure TFormProject.UpdateProjectFiles(Node: TTreeNode; Files: TProjectFile List);166 procedure TFormProject.UpdateProjectFiles(Node: TTreeNode; Files: TProjectFiles); 161 167 var 162 168 I: Integer;
Note:
See TracChangeset
for help on using the changeset viewer.