Changeset 6 for trunk/Forms/UFormMain.pas
- Timestamp:
- May 6, 2015, 11:19:49 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r5 r6 23 23 MenuItem15: TMenuItem; 24 24 MenuItem16: TMenuItem; 25 MenuItemOpenRecent: TMenuItem; 25 26 MenuItem2: TMenuItem; 26 27 MenuItem3: TMenuItem; … … 35 36 StatusBar1: TStatusBar; 36 37 ToolBarMain: TToolBar; 38 procedure FormActivate(Sender: TObject); 39 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 40 procedure FormShow(Sender: TObject); 37 41 private 38 { private declarations }42 Initialized: Boolean; 39 43 public 44 procedure OpenRecentExecute(Sender: TObject); 40 45 procedure UpdateInterface; 46 procedure DockInit; 41 47 end; 42 48 … … 49 55 50 56 uses 51 UCore ;57 UCore, UFormBrowse; 52 58 53 59 { TFormMain } 60 61 procedure TFormMain.FormShow(Sender: TObject); 62 begin 63 DockInit; 64 end; 65 66 procedure TFormMain.OpenRecentExecute(Sender: TObject); 67 begin 68 Core.ProjectOpen(Core.LastOpenedList1.Items[TMenuItem(Sender).MenuIndex]); 69 end; 70 71 procedure TFormMain.FormActivate(Sender: TObject); 72 begin 73 if not Initialized then begin 74 Initialized := True; 75 Core.Init; 76 end; 77 end; 78 79 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 80 begin 81 Core.Done; 82 end; 54 83 55 84 procedure TFormMain.UpdateInterface; … … 59 88 if Assigned(Core.Project) then 60 89 Caption := Core.Project.Directory + ' - ' + AppName 61 else Caption := AppName 90 else Caption := AppName; 91 end; 92 93 procedure TFormMain.DockInit; 94 begin 95 FormBrowse.ManualDock(Self, nil, alClient); 96 FormBrowse.Align := alClient; 97 FormBrowse.Show; 62 98 end; 63 99
Note:
See TracChangeset
for help on using the changeset viewer.