Changeset 41 for trunk/Forms/UMainForm.pas
- Timestamp:
- Mar 9, 2012, 9:40:05 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UMainForm.pas
r40 r41 86 86 procedure LoadFromRegistry; 87 87 procedure SaveToRegistry; 88 procedure InitDock; 88 89 public 89 MainPanelForm: T Form;90 MainPanelForm: TItemListForm; 90 91 PersistentForm: TPersistentForm; 91 92 TreeState: TTreeState; … … 93 94 procedure UpdateInterface; 94 95 procedure LoadTree; 95 procedure SetMainPanelForm(Form: TForm);96 96 end; 97 97 … … 146 146 end; 147 147 148 procedure TMainForm.InitDock; 149 begin 150 MainPanelForm := TItemListForm.Create(Self); 151 MainPanelForm.ManualDock(PanelData, nil, alClient); 152 MainPanelForm.Align := alClient; 153 end; 154 148 155 procedure TMainForm.UpdateInterface; 149 156 begin … … 154 161 Caption := MainPanelForm.Caption + ' - ' + ApplicationInfo.Name 155 162 else Caption := ApplicationInfo.Name; 163 Application.Title := Caption; 156 164 if Assigned(Core.System.Client) then 157 165 with Core.System.Client do … … 170 178 procedure TMainForm.FormDestroy(Sender: TObject); 171 179 begin 180 FreeAndNil(MainPanelForm); 172 181 FreeAndNil(Report); 173 182 FreeAndNil(TreeState); … … 306 315 PersistentForm.Load(Self); 307 316 LoadFromRegistry; 317 InitDock; 308 318 AConnect.Execute; 309 319 end; … … 341 351 342 352 procedure TMainForm.TreeView1DblClick(Sender: TObject); 343 var344 NewItemListForm: TItemListForm;345 353 begin 346 354 if Assigned(TreeView1.Selected) then begin 347 NewItemListForm := TItemListForm.Create(Self); 348 NewItemListForm.SelectedObject.Load(Integer(TreeView1.Selected.Data)); 349 NewItemListForm.Caption := NewItemListForm.SelectedObject.Name; 350 SetMainPanelForm(NewItemListForm); 355 MainPanelForm.SelectedObject.Load(Integer(TreeView1.Selected.Data)); 356 MainPanelForm.Caption := MainPanelForm.SelectedObject.Name; 357 MainPanelForm.Show; 358 MainPanelForm.Reload; 359 UpdateInterface; 351 360 end; 352 361 end; … … 407 416 end; 408 417 409 procedure TMainForm.SetMainPanelForm(Form: TForm);410 begin411 MainPanelForm.Free;412 MainPanelForm := Form;413 MainPanelForm.ManualDock(PanelData, nil, alClient);414 MainPanelForm.Align := alClient;415 MainPanelForm.Show;416 UpdateInterface;417 end;418 419 418 end. 420 419
Note:
See TracChangeset
for help on using the changeset viewer.