Changeset 11 for trunk/Forms
- Timestamp:
- Feb 16, 2015, 10:42:24 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 6 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormDatabases.lfm
r9 r11 48 48 ButtonHeight = 32 49 49 ButtonWidth = 32 50 Caption = 'ToolBar1'51 50 Images = Core.ImageList1 51 ParentShowHint = False 52 ShowHint = True 52 53 TabOrder = 1 53 54 object ToolButton1: TToolButton -
trunk/Forms/UFormDatabases.pas
r9 r11 109 109 110 110 procedure TFormDatabases.FormShow(Sender: TObject); 111 var 112 I: Integer; 111 113 begin 114 for I := 0 to ToolBar1.ButtonCount - 1 do 115 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 112 116 ReloadList; 113 117 end; -
trunk/Forms/UFormFields.lfm
r8 r11 18 18 ButtonHeight = 32 19 19 ButtonWidth = 32 20 Caption = 'ToolBar1'21 20 Images = Core.ImageList1 21 ParentShowHint = False 22 ShowHint = True 22 23 TabOrder = 0 23 24 object ToolButton1: TToolButton -
trunk/Forms/UFormFields.pas
r8 r11 59 59 {$R *.lfm} 60 60 61 resourcestring 62 SNewField = 'New field'; 63 SFieldsNotSet = 'Fields not set'; 64 STableFields = 'Table fields - %s'; 65 61 66 { TFormFields } 62 67 63 68 procedure TFormFields.FormShow(Sender: TObject); 69 var 70 I: Integer; 64 71 begin 72 for I := 0 to ToolBar1.ButtonCount - 1 do 73 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 65 74 if not Assigned(Fields) then 66 raise Exception.Create( 'Fields not set');67 Caption := 'Table fields - ' + TableName;75 raise Exception.Create(SFieldsNotSet); 76 Caption := Format(STableFields, [TableName]); 68 77 UpdateInterface; 69 78 ReloadList; … … 76 85 NewField := TField.Create; 77 86 NewField.Table := Fields.Table; 78 NewField.Name := 'New field'; 87 NewField.Name := SNewField; 88 if Fields.Table.Database.Engine.DataTypes.Count > 0 then 89 NewField.DataType := TDataType(Fields.Table.Database.Engine.DataTypes[0]); 79 90 FormField.Load(NewField); 80 91 if FormField.ShowModal = mrOk then begin -
trunk/Forms/UFormMain.lfm
r9 r11 21 21 object MainMenu1: TMainMenu 22 22 Images = Core.ImageList1 23 left = 8 7024 top = 2 0023 left = 824 24 top = 216 25 25 object MenuItem1: TMenuItem 26 26 Caption = 'Database' -
trunk/Forms/UFormRecords.lfm
r9 r11 44 44 ButtonHeight = 32 45 45 ButtonWidth = 32 46 Caption = 'ToolBar1'47 46 Images = Core.ImageList1 47 ParentShowHint = False 48 ShowHint = True 48 49 TabOrder = 1 49 50 object ToolButton1: TToolButton -
trunk/Forms/UFormRecords.pas
r4 r11 52 52 {$R *.lfm} 53 53 54 resourcestring 55 STable = 'Table'; 56 SRemoveRecord = 'Remove record'; 57 SRemoveRecordConfirm = 'Do you want to remove record?'; 58 54 59 { TFormRecords } 55 60 56 61 procedure TFormRecords.FormShow(Sender: TObject); 62 var 63 I: Integer; 57 64 begin 58 Caption := 'Table - ' + Table.Caption; 65 for I := 0 to ToolBar1.ButtonCount - 1 do 66 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 67 Caption := STable + ' - ' + Table.Caption; 59 68 ReloadList; 60 69 end; … … 94 103 procedure TFormRecords.ARemoveExecute(Sender: TObject); 95 104 begin 96 if Assigned(ListView1.Selected) then begin 105 if Assigned(ListView1.Selected) then 106 if MessageDlg(SRemoveRecord, SRemoveRecordConfirm, 107 mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 97 108 Table.Records.Remove(ListView1.Selected.Data); 98 109 ReloadList; -
trunk/Forms/UFormTables.lfm
r9 r11 45 45 ButtonHeight = 32 46 46 ButtonWidth = 32 47 Caption = 'ToolBar1'48 47 Images = Core.ImageList1 48 ParentShowHint = False 49 ShowHint = True 49 50 TabOrder = 1 50 51 object ToolButton1: TToolButton -
trunk/Forms/UFormTables.pas
r9 r11 64 64 {$R *.lfm} 65 65 66 resourcestring 67 SRemoveTable = 'Remove table'; 68 SRemoveTableConfirm = 'Do you want to really remove table ''%s'' ?'; 69 SNewTable = 'New table'; 70 71 66 72 { TFormTables } 67 73 … … 104 110 begin 105 111 NewTable := TTable.Create; 106 NewTable.Name := 'New table';112 NewTable.Name := SNewTable; 107 113 NewTable.Database := Database; 108 114 FormTable.Load(NewTable); … … 128 134 begin 129 135 if Assigned(ListView1.Selected) then begin 130 if MessageDlg( 'Remove table', 'Do you want to really remove table ' +131 TTable(ListView1.Selected.Data).Name,mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin136 if MessageDlg(SRemoveTable, Format(SRemoveTableConfirm, [TTable(ListView1.Selected.Data).Name]), 137 mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 132 138 Database.Tables.Remove(ListView1.Selected.Data); 133 139 ReloadList; … … 200 206 201 207 procedure TFormTables.FormShow(Sender: TObject); 202 begin 208 var 209 I: Integer; 210 begin 211 for I := 0 to ToolBar1.ButtonCount - 1 do 212 ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption; 203 213 UpdateInterface; 204 214 end;
Note:
See TracChangeset
for help on using the changeset viewer.