Changeset 13 for trunk/StudioPackage/Forms
- Timestamp:
- Aug 3, 2012, 4:03:59 PM (12 years ago)
- Location:
- trunk/StudioPackage/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/StudioPackage/Forms/UFormMain.lfm
r11 r13 715 715 Caption = 'New...' 716 716 ImageIndex = 4 717 OnExecute = AFileNewExecute 717 718 ShortCut = 16462 718 719 end -
trunk/StudioPackage/Forms/UFormMain.pas
r11 r13 105 105 procedure AExitExecute(Sender: TObject); 106 106 procedure AFileCloseExecute(Sender: TObject); 107 procedure AFileNewExecute(Sender: TObject); 107 108 procedure AFileOpenExecute(Sender: TObject); 108 109 procedure AViewModulesExecute(Sender: TObject); … … 115 116 procedure DockInit; 116 117 public 117 procedure Open FileExecute(OpenedFile: TOpenedFile);118 procedure OpenedFileChange(Sender: TObject); 118 119 end; 119 120 … … 137 138 procedure TFormMain.AFileCloseExecute(Sender: TObject); 138 139 begin 139 // DataModule1.OpenedFiles.Close(DataModule1.OpenedFiles.Selected); 140 DataModule1.OpenedFiles.CloseFile(DataModule1.OpenedFiles.Selected.FileName); 141 end; 142 143 procedure TFormMain.AFileNewExecute(Sender: TObject); 144 begin 145 DataModule1.OpenedFiles.NewFile; 140 146 end; 141 147 … … 185 191 }end; 186 192 187 procedure TFormMain.Open FileExecute(OpenedFile: TOpenedFile);193 procedure TFormMain.OpenedFileChange(Sender: TObject); 188 194 var 189 195 NewTabSheet: TTabSheet; 190 begin 191 NewTabSheet := PageControlCenter.AddTabSheet; 192 OpenedFile.Form.ManualDock(NewTabSheet, nil, alClient); 193 OpenedFile.Form.Align := alClient; 194 OpenedFile.Form.Show; 196 I: Integer; 197 begin 198 with DataModule1.OpenedFiles do begin 199 for I := 0 to Count - 1 do 200 with TOpenedFile(Items[I]) do begin 201 if not Assigned(Form.Parent) then begin 202 NewTabSheet := PageControlCenter.AddTabSheet; 203 NewTabSheet.Caption := ExtractFileName(FileName); 204 //NewTabSheet.PopupMenu := ; 205 Form.ManualDock(NewTabSheet, nil, alClient); 206 Form.Align := alClient; 207 Form.Show; 208 end; 209 end; 210 end; 195 211 end; 196 212
Note:
See TracChangeset
for help on using the changeset viewer.