Changeset 22 for trunk/Forms
- Timestamp:
- Jun 16, 2011, 12:18:21 PM (13 years ago)
- Location:
- trunk/Forms
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UImportStructureForm.lfm
r20 r22 1 1 object ImportStructureForm: TImportStructureForm 2 Left = 32 13 Height = 46 54 Top = 14 55 Width = 5 532 Left = 323 3 Height = 461 4 Top = 147 5 Width = 549 6 6 Caption = 'Import structure' 7 ClientHeight = 46 58 ClientWidth = 5 537 ClientHeight = 461 8 ClientWidth = 549 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy … … 72 72 end 73 73 object Button1: TButton 74 Left = 4 7374 Left = 469 75 75 Height = 25 76 Top = 4 3376 Top = 429 77 77 Width = 75 78 78 Anchors = [akRight, akBottom] … … 83 83 object Memo1: TMemo 84 84 Left = 184 85 Height = 4 1285 Height = 408 86 86 Top = 8 87 Width = 3 6087 Width = 356 88 88 Anchors = [akTop, akLeft, akRight, akBottom] 89 89 ScrollBars = ssAutoBoth -
trunk/Forms/UItemAdd.lfm
r20 r22 1 1 object ItemAddForm: TItemAddForm 2 Left = 40 13 Height = 41 94 Top = 13 15 Width = 56 52 Left = 403 3 Height = 415 4 Top = 133 5 Width = 561 6 6 ActiveControl = Panel1 7 7 Caption = 'Add item' 8 ClientHeight = 41 99 ClientWidth = 56 58 ClientHeight = 415 9 ClientWidth = 561 10 10 OnClose = FormClose 11 11 OnCreate = FormCreate … … 15 15 object Panel1: TPanel 16 16 Left = 0 17 Height = 3 8217 Height = 378 18 18 Top = 0 19 Width = 56 519 Width = 561 20 20 Align = alTop 21 21 Anchors = [akLeft, akRight, akBottom] … … 24 24 end 25 25 object ButtonCancel: TButton 26 Left = 3 8226 Left = 378 27 27 Height = 25 28 Top = 3 9028 Top = 386 29 29 Width = 75 30 30 Anchors = [akRight, akBottom] … … 34 34 end 35 35 object ButtonSave: TButton 36 Left = 4 7036 Left = 466 37 37 Height = 25 38 Top = 3 9038 Top = 386 39 39 Width = 75 40 40 Anchors = [akRight, akBottom] -
trunk/Forms/UItemAdd.pas
r21 r22 29 29 public 30 30 Report: TReport; 31 ControlList: TListObject; 32 end; 31 end; 33 32 34 33 var … … 59 58 Data := TDictionaryStringString.Create; 60 59 for I := 0 to Report.Columns.Count - 1 do 61 if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin 60 if not (TReportColumn(Report.Columns[I]).CustomType is TDataTypeRelationMany) then 61 if TReportColumn(Report.Columns[I]).ColumnName <> MainForm.SelectedObject.PrimaryKey then begin 62 62 DataType := TReportColumn(Report.Columns[I]).CustomType; 63 Data.Add(TReportColumn(Report.Columns[I]).ColumnName, DataType.GetControlValue(TWinControl(ControlList[I]))); 63 Data.Add(TReportColumn(Report.Columns[I]).ColumnName, 64 DataType.GetControlValue(TWinControl(TReportColumn(Report.Columns[I]).Control))); 64 65 end; 65 66 Database.Insert(MainForm.SelectedObject.Table, Data, MainForm.SelectedObject.Schema); … … 81 82 Report := TReport.Create; 82 83 Report.Base := Core.System; 83 ControlList := TListObject.Create;84 ControlList.OwnsObjects := False;85 84 end; 86 85 … … 88 87 begin 89 88 Report.Free; 90 ControlList.Free;91 89 end; 92 90 … … 119 117 120 118 // Load column names 121 ControlList.Clear;122 119 for I := 0 to Report.Columns.Count - 1 do 123 120 if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin … … 138 135 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 139 136 NewControl.Width := (Width div ColumnCount) div 2 - 20; 140 ControlList.Add(NewControl);137 TReportColumn(Report.Columns[I]).Control := NewControl; 141 138 142 139 Column := (Column + 1) mod 2; 143 140 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 144 141 end; 145 end else ControlList.Add(nil);142 end; 146 143 end; 147 144 -
trunk/Forms/UItemEdit.lfm
r20 r22 1 1 object ItemEditForm: TItemEditForm 2 Left = 29 63 Height = 42 74 Top = 12 35 Width = 55 62 Left = 298 3 Height = 423 4 Top = 125 5 Width = 552 6 6 ActiveControl = Panel1 7 7 Caption = 'Edit item' 8 ClientHeight = 42 79 ClientWidth = 55 68 ClientHeight = 423 9 ClientWidth = 552 10 10 OnClose = FormClose 11 11 OnCreate = FormCreate … … 15 15 object Panel1: TPanel 16 16 Left = 0 17 Height = 38 417 Height = 380 18 18 Top = 0 19 Width = 55 619 Width = 552 20 20 Align = alTop 21 21 Anchors = [akLeft, akRight, akBottom] … … 24 24 end 25 25 object ButtonCancel: TButton 26 Left = 3 8226 Left = 378 27 27 Height = 25 28 Top = 39 828 Top = 394 29 29 Width = 75 30 30 Anchors = [akRight, akBottom] … … 34 34 end 35 35 object ButtonSave: TButton 36 Left = 4 7036 Left = 466 37 37 Height = 25 38 Top = 39 838 Top = 394 39 39 Width = 75 40 40 Anchors = [akRight, akBottom] -
trunk/Forms/UItemEdit.pas
r21 r22 28 28 public 29 29 Report: TReport; 30 ControlList: TListObject;31 30 procedure BuildControls; 32 31 end; … … 59 58 Data := TDictionaryStringString.Create; 60 59 for I := 0 to Report.Columns.Count - 1 do 61 if TReportColumn(Report.Columns[I]).ColumnName <> 'Id' then begin 60 if not (TReportColumn(Report.Columns[I]).CustomType is TDataTypeRelationMany) then 61 if TReportColumn(Report.Columns[I]).ColumnName <> MainForm.SelectedObject.PrimaryKey then begin 62 62 DataType := TReportColumn(Report.Columns[I]).CustomType; 63 Data.Add(TReportColumn(Report.Columns[I]).ColumnName, DataType.GetControlValue(TWinControl(ControlList[I]))); 63 Data.Add(TReportColumn(Report.Columns[I]).ColumnName, 64 DataType.GetControlValue(TWinControl(TReportColumn(Report.Columns[I]).Control))); 64 65 end; 65 66 Database.Update(MainForm.SelectedObject.Table, Data, 66 '` Id` = ' + IntToStr(MainForm.SelectedItem), MainForm.SelectedObject.Schema);67 '`' + MainForm.SelectedObject.PrimaryKey + '` = ' + IntToStr(MainForm.SelectedItem), MainForm.SelectedObject.Schema); 67 68 finally 68 69 Data.Free; … … 85 86 Report := TReport.Create; 86 87 Report.Base := Core.System; 87 ControlList := TListObject.Create;88 ControlList.OwnsObjects := False;89 88 end; 90 89 91 90 procedure TItemEditForm.FormDestroy(Sender: TObject); 92 91 begin 93 ControlList.Free;94 92 Report.Free; 95 93 end; … … 141 139 NewControl.Left := Column * Width div ColumnCount + (Width div ColumnCount) div 2; 142 140 NewControl.Width := (Width div ColumnCount) div 2 - 20; 143 ControlList.Add(NewControl);141 TReportColumn(Report.Columns[I]).Control := NewControl; 144 142 145 143 Column := (Column + 1) mod 2; 146 144 if Column = 0 then LastTop := LastTop + NewControl.Height + 4; 147 145 end; 148 end else ControlList.Add(nil);146 end; 149 147 end; 150 148 -
trunk/Forms/UItemSelect.lfm
r21 r22 1 1 object ItemSelectForm: TItemSelectForm 2 Left = 34 43 Height = 3 504 Top = 15 15 Width = 49 52 Left = 346 3 Height = 346 4 Top = 153 5 Width = 491 6 6 Caption = 'Item select' 7 ClientHeight = 3 508 ClientWidth = 49 57 ClientHeight = 346 8 ClientWidth = 491 9 9 OnCreate = FormCreate 10 10 OnDestroy = FormDestroy … … 13 13 object ListView1: TListView 14 14 Left = 8 15 Height = 30 415 Height = 300 16 16 Top = 8 17 Width = 4 8217 Width = 478 18 18 Anchors = [akTop, akLeft, akRight, akBottom] 19 19 Columns = <> … … 27 27 end 28 28 object ButtonSelect: TButton 29 Left = 41 729 Left = 413 30 30 Height = 25 31 Top = 3 2031 Top = 316 32 32 Width = 75 33 33 Anchors = [akRight, akBottom] … … 37 37 end 38 38 object ButtonCancel: TButton 39 Left = 32 839 Left = 324 40 40 Height = 25 41 Top = 3 2041 Top = 316 42 42 Width = 75 43 43 Anchors = [akRight, akBottom] -
trunk/Forms/UItemView.lfm
r20 r22 1 1 object ItemViewForm: TItemViewForm 2 Left = 31 23 Height = 46 74 Top = 11 15 Width = 62 42 Left = 314 3 Height = 463 4 Top = 113 5 Width = 620 6 6 Caption = 'View item' 7 ClientHeight = 46 78 ClientWidth = 62 47 ClientHeight = 463 8 ClientWidth = 620 9 9 OnClose = FormClose 10 10 OnCreate = FormCreate … … 14 14 LCLVersion = '0.9.31' 15 15 object ButtonClose: TButton 16 Left = 54 416 Left = 540 17 17 Height = 25 18 Top = 43 718 Top = 433 19 19 Width = 75 20 20 Anchors = [akRight, akBottom] … … 24 24 end 25 25 object ButtonEdit: TButton 26 Left = 45 626 Left = 452 27 27 Height = 25 28 Top = 43 728 Top = 433 29 29 Width = 75 30 30 Anchors = [akRight, akBottom] … … 35 35 object Panel1: TPanel 36 36 Left = 0 37 Height = 4 3137 Height = 427 38 38 Top = 0 39 Width = 62 439 Width = 620 40 40 Align = alTop 41 41 Anchors = [akTop, akLeft, akRight, akBottom] 42 42 BevelOuter = bvNone 43 ClientHeight = 4 3144 ClientWidth = 62 443 ClientHeight = 427 44 ClientWidth = 620 45 45 TabOrder = 2 46 46 object Panel2: TPanel 47 47 Left = 0 48 48 Height = 200 49 Top = 2 3150 Width = 62 449 Top = 227 50 Width = 620 51 51 Align = alBottom 52 52 BevelOuter = bvNone 53 53 ClientHeight = 200 54 ClientWidth = 62 454 ClientWidth = 620 55 55 TabOrder = 0 56 56 object TabControl1: TTabControl … … 58 58 Height = 24 59 59 Top = 0 60 Width = 62 460 Width = 620 61 61 Align = alTop 62 62 OnChange = TabControl1Change … … 74 74 Height = 176 75 75 Top = 24 76 Width = 62 476 Width = 620 77 77 Align = alClient 78 78 Columns = <> … … 89 89 Left = 0 90 90 Height = 3 91 Top = 22 892 Width = 62 491 Top = 224 92 Width = 620 93 93 Align = alBottom 94 94 ResizeAnchor = akBottom … … 96 96 object PanelControls: TPanel 97 97 Left = 0 98 Height = 22 898 Height = 224 99 99 Top = 0 100 Width = 62 4100 Width = 620 101 101 Align = alClient 102 102 Anchors = [akLeft, akRight, akBottom] -
trunk/Forms/ULoginForm.lfm
r20 r22 1 1 object LoginForm: TLoginForm 2 Left = 48 03 Height = 17 54 Top = 25 65 Width = 4032 Left = 482 3 Height = 171 4 Top = 258 5 Width = 399 6 6 BorderIcons = [biSystemMenu] 7 7 BorderStyle = bsDialog 8 8 Caption = 'Login' 9 ClientHeight = 17 510 ClientWidth = 4039 ClientHeight = 171 10 ClientWidth = 399 11 11 LCLVersion = '0.9.31' 12 12 object Label1: TLabel -
trunk/Forms/UMainForm.lfm
r21 r22 1 1 object MainForm: TMainForm 2 Left = 2 693 Height = 4 504 Top = 15 75 Width = 64 42 Left = 271 3 Height = 447 4 Top = 159 5 Width = 640 6 6 ActiveControl = Panel1 7 7 Caption = 'ChronIS' 8 ClientHeight = 4 319 ClientWidth = 64 48 ClientHeight = 427 9 ClientWidth = 640 10 10 Menu = MainMenu1 11 11 OnClose = FormClose … … 16 16 object Panel1: TPanel 17 17 Left = 0 18 Height = 4 3118 Height = 427 19 19 Top = 0 20 20 Width = 184 21 21 Align = alLeft 22 22 BevelOuter = bvNone 23 ClientHeight = 4 3123 ClientHeight = 427 24 24 ClientWidth = 184 25 25 TabOrder = 0 … … 34 34 object TreeView1: TTreeView 35 35 Left = 4 36 Height = 40 736 Height = 403 37 37 Top = 19 38 38 Width = 180 … … 48 48 object Panel2: TPanel 49 49 Left = 189 50 Height = 4 3150 Height = 427 51 51 Top = 0 52 Width = 45 552 Width = 451 53 53 Align = alClient 54 54 BevelOuter = bvNone 55 ClientHeight = 4 3156 ClientWidth = 45 555 ClientHeight = 427 56 ClientWidth = 451 57 57 TabOrder = 1 58 58 object Label2: TLabel … … 66 66 object ListView1: TListView 67 67 Left = 2 68 Height = 37 568 Height = 371 69 69 Top = 19 70 Width = 4 5170 Width = 447 71 71 Anchors = [akTop, akLeft, akRight, akBottom] 72 72 Columns = <> … … 86 86 Left = 3 87 87 Height = 25 88 Top = 40288 Top = 398 89 89 Width = 75 90 90 Action = AItemAdd … … 95 95 Left = 83 96 96 Height = 25 97 Top = 40297 Top = 398 98 98 Width = 75 99 99 Action = AItemDelete … … 104 104 object Splitter1: TSplitter 105 105 Left = 184 106 Height = 4 31106 Height = 427 107 107 Top = 0 108 108 Width = 5 -
trunk/Forms/USettingForm.lfm
r20 r22 1 1 object SettingForm: TSettingForm 2 Left = 37 23 Height = 32 64 Top = 1 395 Width = 44 42 Left = 374 3 Height = 322 4 Top = 141 5 Width = 440 6 6 Caption = 'Settings' 7 ClientHeight = 32 68 ClientWidth = 44 47 ClientHeight = 322 8 ClientWidth = 440 9 9 OnClose = FormClose 10 10 OnShow = FormShow … … 26 26 end 27 27 object ButtonSave: TButton 28 Left = 36 628 Left = 362 29 29 Height = 25 30 Top = 29 430 Top = 290 31 31 Width = 75 32 32 Anchors = [akRight, akBottom] … … 36 36 end 37 37 object ButtonCancel: TButton 38 Left = 27 838 Left = 274 39 39 Height = 25 40 Top = 29 440 Top = 290 41 41 Width = 75 42 42 Anchors = [akRight, akBottom]
Note:
See TracChangeset
for help on using the changeset viewer.