Changeset 41 for trunk/Forms
- Timestamp:
- Mar 9, 2012, 9:40:05 AM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UItemAdd.lfm
r22 r41 11 11 OnCreate = FormCreate 12 12 OnDestroy = FormDestroy 13 OnKeyPress = FormKeyPress 13 14 OnShow = FormShow 14 15 LCLVersion = '0.9.31' -
trunk/Forms/UItemAdd.pas
r40 r41 23 23 procedure FormCreate(Sender: TObject); 24 24 procedure FormDestroy(Sender: TObject); 25 procedure FormKeyPress(Sender: TObject; var Key: char); 25 26 procedure FormShow(Sender: TObject); 26 27 private … … 100 101 end; 101 102 103 procedure TItemAddForm.FormKeyPress(Sender: TObject; var Key: char); 104 begin 105 if Key = #27 then Close; 106 end; 107 102 108 procedure TItemAddForm.FormShow(Sender: TObject); 103 109 begin … … 124 130 Panel1.Controls[I].Free; 125 131 126 //Report.Load(SelectedObject, SelectedObject.PrimaryKey + ' = ' +127 //IntToStr(SelectedItemId));132 Report.Load(SelectedObject, SelectedObject.PrimaryKey + ' = ' + 133 IntToStr(SelectedItemId)); 128 134 129 135 // Load column names -
trunk/Forms/UItemList.pas
r40 r41 42 42 private 43 43 Report: TReport; 44 procedure LoadItemList;45 44 public 46 45 SelectedObject: TChronisObject; 47 46 SelectedItem: Integer; 47 procedure Reload; 48 48 end; 49 49 … … 60 60 { TItemListForm } 61 61 62 procedure TItemListForm. LoadItemList;62 procedure TItemListForm.Reload; 63 63 var 64 64 NewColumn: TListColumn; … … 110 110 procedure TItemListForm.FormShow(Sender: TObject); 111 111 begin 112 LoadItemList;112 Reload; 113 113 end; 114 114 -
trunk/Forms/ULoginForm.lfm
r40 r41 1 1 object LoginForm: TLoginForm 2 Left = 3122 Left = 288 3 3 Height = 177 4 Top = 1864 Top = 243 5 5 Width = 451 6 6 BorderIcons = [biSystemMenu] -
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.