Changeset 44 for trunk/Forms/UFormMain.pas
- Timestamp:
- Jun 25, 2012, 1:17:58 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r41 r44 173 173 procedure UpdateToolBarHints; 174 174 procedure DockInit; 175 procedure LastOpenedListChange(Sender: TObject); 175 176 public 176 177 Modified: Boolean; … … 213 214 begin 214 215 PageControlMain.TabIndex := 0; 215 if OpenProjectOnStart and (LastOpenedList. Count > 0) then216 ProjectOpen(LastOpenedList [0])216 if OpenProjectOnStart and (LastOpenedList.Items.Count > 0) then 217 ProjectOpen(LastOpenedList.Items[0]) 217 218 else AProjectNew.Execute; 218 219 UpdateInterface; … … 333 334 PageControlRight.Width := MainForm.Width div 2; 334 335 PageControlBottom.Height := MainForm.Height div 5; 336 end; 337 338 procedure TMainForm.LastOpenedListChange(Sender: TObject); 339 begin 340 LastOpenedList.LoadToMenuItem(MenuItemOpenRecent); 335 341 end; 336 342 … … 438 444 Targets.Add(TTargetJava.Create); 439 445 UpdateTargetList; 440 LastOpenedList := TLastOpenedList.Create ;441 LastOpenedList. MenuItem := MenuItemOpenRecent;446 LastOpenedList := TLastOpenedList.Create(nil); 447 LastOpenedList.OnChange := LastOpenedListChange; 442 448 LastOpenedList.ClickAction := AProjectOpenRecentExecute; 443 449 LoadFromRegistry(RegistryRoot, ApplicationInfo.RegistryKey); … … 681 687 procedure TMainForm.AProjectOpenRecentExecute(Sender: TObject); 682 688 begin 683 ProjectOpen(LastOpenedList [TMenuItem(Sender).MenuIndex]);689 ProjectOpen(LastOpenedList.Items[TMenuItem(Sender).MenuIndex]); 684 690 end; 685 691 … … 698 704 MemoSource.Lines.SaveToFile(UTF8Decode(SaveDialog1.FileName)); 699 705 ProjectFileName := SaveDialog1.FileName; 700 LastOpenedList.Add (SaveDialog1.FileName);706 LastOpenedList.AddItem(SaveDialog1.FileName); 701 707 Modified := False; 702 708 UpdateInterface;
Note:
See TracChangeset
for help on using the changeset viewer.