Changeset 32 for trunk/Forms
- Timestamp:
- Jun 29, 2024, 7:58:36 AM (5 months ago)
- Location:
- trunk/Forms
- Files:
-
- 3 added
- 2 deleted
- 26 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormConnect.lfm
r31 r32 1 1 object FormConnect: TFormConnect 2 Left = 7953 Height = 5424 Top = 5095 Width = 7392 Left = 590 3 Height = 470 4 Top = 269 5 Width = 641 6 6 Caption = 'Connection parameters' 7 ClientHeight = 542 8 ClientWidth = 739 9 DesignTimePPI = 144 10 OnCreate = FormCreate 11 LCLVersion = '2.2.2.0' 7 ClientHeight = 470 8 ClientWidth = 641 9 DesignTimePPI = 125 10 LCLVersion = '3.2.0.0' 12 11 object EditName: TEdit 13 Left = 2 5614 Height = 4315 Top = 2 516 Width = 31012 Left = 222 13 Height = 39 14 Top = 22 15 Width = 269 17 16 TabOrder = 0 18 17 end 19 18 object Label1: TLabel 20 Left = 1 821 Height = 2 622 Top = 3223 Width = 5619 Left = 16 20 Height = 22 21 Top = 28 22 Width = 49 24 23 Caption = 'Name:' 25 24 ParentColor = False 26 25 end 27 26 object Label2: TLabel 28 Left = 1 829 Height = 2 630 Top = 8031 Width = 1 4727 Left = 16 28 Height = 22 29 Top = 69 30 Width = 130 32 31 Caption = 'Database engine:' 33 32 ParentColor = False 34 33 end 35 34 object ComboBoxDbEngines: TComboBox 36 Left = 2 5637 Height = 4238 Top = 7239 Width = 31035 Left = 222 36 Height = 38 37 Top = 62 38 Width = 269 40 39 ItemHeight = 0 41 OnChange = ComboBoxDbEnginesChange42 40 Style = csDropDownList 43 41 TabOrder = 1 42 OnChange = ComboBoxDbEnginesChange 44 43 end 45 44 object ButtonOk: TButton 46 Left = 62447 Height = 3048 Top = 4 9649 Width = 9045 Left = 541 46 Height = 26 47 Top = 430 48 Width = 78 50 49 Anchors = [akRight, akBottom] 51 50 Caption = 'Ok' … … 54 53 end 55 54 object ButtonCancel: TButton 56 Left = 4 8857 Height = 3058 Top = 4 9659 Width = 9055 Left = 423 56 Height = 26 57 Top = 430 58 Width = 78 60 59 Anchors = [akRight, akBottom] 61 60 Caption = 'Cancel' … … 64 63 end 65 64 object PageControl1: TPageControl 66 Left = 1 867 Height = 34068 Top = 1 3969 Width = 70365 Left = 16 66 Height = 295 67 Top = 121 68 Width = 609 70 69 ActivePage = TabSheetRegistry 71 70 Anchors = [akTop, akLeft, akRight] … … 74 73 TabOrder = 4 75 74 object TabSheetXml: TTabSheet 76 ClientHeight = 33677 ClientWidth = 69375 ClientHeight = 291 76 ClientWidth = 599 78 77 object Label3: TLabel 79 Left = 1 780 Height = 2 681 Top = 2 482 Width = 6978 Left = 15 79 Height = 22 80 Top = 21 81 Width = 58 83 82 Caption = 'Xml file:' 84 83 ParentColor = False 85 84 end 86 85 object EditXml: TEdit 87 Left = 11088 Height = 4389 Top = 1 690 Width = 44686 Left = 95 87 Height = 39 88 Top = 14 89 Width = 385 91 90 Anchors = [akTop, akLeft, akRight] 92 91 TabOrder = 0 93 92 end 94 93 object ButtonXmlBrowse: TButton 95 Left = 56696 Height = 3 797 Top = 1 998 Width = 11394 Left = 489 95 Height = 32 96 Top = 16 97 Width = 98 99 98 Anchors = [akTop, akRight] 100 99 Caption = 'Browse' 100 TabOrder = 1 101 101 OnClick = ButtonXmlBrowseClick 102 TabOrder = 1103 102 end 104 103 end 105 104 object TabSheetSql: TTabSheet 106 ClientHeight = 336107 ClientWidth = 693105 ClientHeight = 291 106 ClientWidth = 599 108 107 object Label4: TLabel 109 Left = 1 9110 Height = 2 6111 Top = 1 9112 Width = 44108 Left = 16 109 Height = 22 110 Top = 16 111 Width = 38 113 112 Caption = 'Host:' 114 113 ParentColor = False 115 114 end 116 115 object EditHost: TEdit 117 Left = 1 50118 Height = 43119 Top = 1 4120 Width = 312116 Left = 130 117 Height = 39 118 Top = 12 119 Width = 271 121 120 TabOrder = 0 122 121 end 123 122 object Label5: TLabel 124 Left = 1 9125 Height = 2 6126 Top = 72127 Width = 40123 Left = 16 124 Height = 22 125 Top = 62 126 Width = 34 128 127 Caption = 'Port:' 129 128 ParentColor = False 130 129 end 131 130 object SpinEditPort: TSpinEdit 132 Left = 1 52133 Height = 43134 Top = 64135 Width = 1 33131 Left = 132 132 Height = 39 133 Top = 56 134 Width = 115 136 135 MaxValue = 65535 137 136 TabOrder = 1 … … 144 143 end 145 144 object OpenDialog1: TOpenDialog 146 Left = 632147 Top = 32145 Left = 549 146 Top = 28 148 147 end 149 148 end -
trunk/Forms/FormConnect.pas
r31 r32 1 unit UFormConnect;1 unit FormConnect; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 ComCtrls, Spin, UDatabase;7 ComCtrls, Spin, DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormConnect } 12 12 13 TFormConnect = class(TForm )13 TFormConnect = class(TFormEx) 14 14 ButtonXmlBrowse: TButton; 15 15 ButtonOk: TButton; … … 33 33 procedure ButtonXmlBrowseClick(Sender: TObject); 34 34 procedure ComboBoxDbEnginesChange(Sender: TObject); 35 procedure FormCreate(Sender: TObject); 35 private 36 FDbManager: TDbManager; 37 procedure SetDbManager(AValue: TDbManager); 36 38 public 37 39 procedure Load(ConnectProfile: TDbConnectProfile); … … 39 41 procedure ReloadDbEngines; 40 42 procedure UpdateInterface; 43 property DbManager: TDbManager read FDbManager write SetDbManager; 41 44 end; 42 45 … … 47 50 48 51 uses 49 UCore, UEngineXML, UEngineMySQL;52 EngineXML, EngineMySQL; 50 53 51 54 resourcestring … … 69 72 end; 70 73 71 procedure TFormConnect. FormCreate(Sender: TObject);74 procedure TFormConnect.SetDbManager(AValue: TDbManager); 72 75 begin 76 if FDbManager = AValue then Exit; 77 FDbManager := AValue; 73 78 ReloadDbEngines; 74 79 end; … … 110 115 try 111 116 ComboBoxDbEngines.Items.Clear; 112 for I := 0 to Core.DbManager.ClientTypes.Count - 1 do113 ComboBoxDbEngines.Items.AddObject( Core.DbManager.ClientTypes[I].Name,114 Core.DbManager.ClientTypes[I]);117 for I := 0 to DbManager.ClientTypes.Count - 1 do 118 ComboBoxDbEngines.Items.AddObject(DbManager.ClientTypes[I].Name, 119 DbManager.ClientTypes[I]); 115 120 finally 116 121 ComboBoxDbEngines.Items.Endupdate; -
trunk/Forms/FormDatabases.pas
r31 r32 1 unit UFormDatabases;1 unit FormDatabases; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, UDatabase;7 Menus, ActnList, DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormDatabases } 12 12 13 TFormDatabases = class(TForm )13 TFormDatabases = class(TFormEx) 14 14 AAdd: TAction; 15 15 AOpen: TAction; … … 39 39 public 40 40 SelectedProfile: TDbConnectProfile; 41 DbManager: TDbManager; 41 42 procedure ReloadList; 42 43 procedure UpdateInterface; … … 49 50 50 51 uses 51 UCore, UFormConnect;52 FormConnect; 52 53 53 54 resourcestring … … 76 77 if MessageDlg(SRemoveDatabaseConnection, Format(SRemoveDatabaseConnectionQuery, [ 77 78 TDbConnectProfile(ListView1.Selected.Data).Name]), mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 78 Core.DbManager.ConnectProfiles.Remove(ListView1.Selected.Data);79 DbManager.ConnectProfiles.Remove(ListView1.Selected.Data); 79 80 ReloadList; 80 81 end; … … 90 91 with TFormConnect.Create(nil) do 91 92 try 93 DbManager := Self.DbManager; 92 94 Load(NewConnectProfile); 93 95 if ShowModal = mrOk then begin 94 96 Save(NewConnectProfile); 95 Core.DbManager.ConnectProfiles.Add(NewConnectProfile);97 DbManager.ConnectProfiles.Add(NewConnectProfile); 96 98 ReloadList; 97 99 end else NewConnectProfile.Free; … … 104 106 begin 105 107 if Assigned(ListView1.Selected) then begin 108 DbManager := Self.DbManager; 106 109 with TFormConnect.Create(nil) do 107 110 try 111 DbManager := Self.DbManager; 108 112 Load(TDbConnectProfile(ListView1.Selected.Data)); 109 113 if ShowModal = mrOk then begin … … 128 132 procedure TFormDatabases.ListView1Data(Sender: TObject; Item: TListItem); 129 133 begin 130 if (Item.Index >= 0) and (Item.Index < Core.DbManager.ConnectProfiles.Count) then131 with TDbConnectProfile( Core.DbManager.ConnectProfiles[Item.Index]) do begin134 if (Item.Index >= 0) and (Item.Index < DbManager.ConnectProfiles.Count) then 135 with TDbConnectProfile(DbManager.ConnectProfiles[Item.Index]) do begin 132 136 Item.Caption := Name; 133 137 Item.SubItems.Add(ClientType.Name); 134 138 Item.SubItems.Add(Params.ConnectionString); 135 Item.Data := Core.DbManager.ConnectProfiles[Item.Index];139 Item.Data := DbManager.ConnectProfiles[Item.Index]; 136 140 end 137 141 end; … … 145 149 procedure TFormDatabases.ReloadList; 146 150 begin 147 ListView1.Items.Count := Core.DbManager.ConnectProfiles.Count;151 ListView1.Items.Count := DbManager.ConnectProfiles.Count; 148 152 ListView1.Repaint; 149 153 UpdateInterface; -
trunk/Forms/FormField.lfm
r31 r32 1 1 object FormField: TFormField 2 2 Left = 721 3 Height = 5333 Height = 463 4 4 Top = 85 5 Width = 1 1695 Width = 1015 6 6 Caption = 'Field' 7 ClientHeight = 5338 ClientWidth = 1 1699 DesignTimePPI = 1 447 ClientHeight = 463 8 ClientWidth = 1015 9 DesignTimePPI = 125 10 10 OnCreate = FormCreate 11 11 OnShow = FormShow 12 12 Position = poMainFormCenter 13 LCLVersion = ' 2.2.2.0'13 LCLVersion = '3.2.0.0' 14 14 object EditName: TEdit 15 Left = 20216 Height = 4317 Top = 1 318 Width = 31715 Left = 175 16 Height = 39 17 Top = 11 18 Width = 275 19 19 TabOrder = 0 20 20 end 21 21 object Label1: TLabel 22 Left = 20 22 Left = 17 23 Height = 22 24 Top = 22 25 Width = 49 26 Caption = 'Name:' 27 ParentColor = False 28 end 29 object ButtonOk: TButton 30 Left = 917 23 31 Height = 26 24 Top = 25 25 Width = 56 26 Caption = 'Name:' 27 ParentColor = False 28 end 29 object ButtonOk: TButton 30 Left = 1056 31 Height = 30 32 Top = 480 33 Width = 90 32 Top = 417 33 Width = 78 34 34 Anchors = [akRight, akBottom] 35 35 Caption = 'Ok' … … 38 38 end 39 39 object EditTextBefore: TEdit 40 Left = 20041 Height = 4342 Top = 10643 Width = 31840 Left = 174 41 Height = 39 42 Top = 92 43 Width = 276 44 44 TabOrder = 2 45 45 end 46 46 object Label2: TLabel 47 Left = 1 948 Height = 2 649 Top = 1 1850 Width = 10047 Left = 16 48 Height = 22 49 Top = 102 50 Width = 87 51 51 Caption = 'Text before:' 52 52 ParentColor = False 53 53 end 54 54 object EditTextAfter: TEdit 55 Left = 20056 Height = 4357 Top = 1 6358 Width = 31855 Left = 174 56 Height = 39 57 Top = 141 58 Width = 276 59 59 TabOrder = 3 60 60 end 61 61 object Label3: TLabel 62 Left = 1 963 Height = 2 664 Top = 1 7365 Width = 8462 Left = 16 63 Height = 22 64 Top = 150 65 Width = 74 66 66 Caption = 'Text after:' 67 67 ParentColor = False 68 68 end 69 69 object Label4: TLabel 70 Left = 2071 Height = 2 672 Top = 6773 Width = 8570 Left = 17 71 Height = 22 72 Top = 58 73 Width = 76 74 74 Caption = 'Data type:' 75 75 ParentColor = False 76 76 end 77 77 object ComboBoxType: TComboBox 78 Left = 20079 Height = 4280 Top = 5 881 Width = 31878 Left = 174 79 Height = 38 80 Top = 50 81 Width = 276 82 82 ItemHeight = 0 83 OnChange = ComboBoxTypeChange84 83 Style = csDropDownList 85 84 TabOrder = 4 85 OnChange = ComboBoxTypeChange 86 86 end 87 87 object ButtonCancel: TButton 88 Left = 94189 Height = 3090 Top = 4 8091 Width = 9088 Left = 817 89 Height = 26 90 Top = 417 91 Width = 78 92 92 Anchors = [akRight, akBottom] 93 93 Caption = 'Cancel' … … 96 96 end 97 97 object PageControl1: TPageControl 98 Left = 1 999 Height = 2 40100 Top = 221101 Width = 112498 Left = 16 99 Height = 209 100 Top = 192 101 Width = 976 102 102 ActivePage = TabSheetBoolean 103 103 Anchors = [akTop, akLeft, akRight, akBottom] … … 106 106 TabOrder = 6 107 107 object TabSheetString: TTabSheet 108 ClientHeight = 2 36109 ClientWidth = 1114108 ClientHeight = 205 109 ClientWidth = 966 110 110 object EditStringDefault: TEdit 111 Left = 1 92112 Height = 43113 Top = 10114 Width = 318111 Left = 167 112 Height = 39 113 Top = 9 114 Width = 276 115 115 TabOrder = 0 116 116 end 117 117 object Label5: TLabel 118 Left = 1 9119 Height = 2 6120 Top = 10121 Width = 1 16118 Left = 16 119 Height = 22 120 Top = 9 121 Width = 102 122 122 Caption = 'Default value:' 123 123 ParentColor = False … … 125 125 end 126 126 object TabSheetInteger: TTabSheet 127 ClientHeight = 2 36128 ClientWidth = 1114127 ClientHeight = 205 128 ClientWidth = 966 129 129 object Label10: TLabel 130 Left = 14 131 Height = 26 130 Left = 12 131 Height = 22 132 Top = 22 133 Width = 76 134 Caption = 'Minimum:' 135 ParentColor = False 136 end 137 object SpinEditMin: TSpinEdit 138 Left = 160 139 Height = 39 140 Top = 20 141 Width = 266 142 MaxValue = 10000000 143 TabOrder = 0 144 end 145 object SpinEditMax: TSpinEdit 146 Left = 160 147 Height = 39 148 Top = 58 149 Width = 266 150 TabOrder = 1 151 end 152 object Label11: TLabel 153 Left = 12 154 Height = 22 155 Top = 61 156 Width = 79 157 Caption = 'Maximum:' 158 ParentColor = False 159 end 160 end 161 object TabSheetDateTime: TTabSheet 162 ClientHeight = 205 163 ClientWidth = 966 164 object DateEditMin: TDateEdit 165 Left = 141 166 Height = 39 132 167 Top = 25 133 Width = 87 134 Caption = 'Minimum:' 135 ParentColor = False 136 end 137 object SpinEditMin: TSpinEdit 138 Left = 184 139 Height = 43 140 Top = 23 141 Width = 306 142 MaxValue = 10000000 143 TabOrder = 0 144 end 145 object SpinEditMax: TSpinEdit 146 Left = 184 147 Height = 43 148 Top = 67 149 Width = 306 150 TabOrder = 1 151 end 152 object Label11: TLabel 153 Left = 14 154 Height = 26 155 Top = 70 156 Width = 91 157 Caption = 'Maximum:' 158 ParentColor = False 159 end 160 end 161 object TabSheetDateTime: TTabSheet 162 ClientHeight = 236 163 ClientWidth = 1114 164 object DateEditMin: TDateEdit 165 Left = 163 166 Height = 43 167 Top = 29 168 Width = 259 168 Width = 225 169 169 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] 170 170 DateOrder = doNone 171 ButtonWidth = 2 8171 ButtonWidth = 24 172 172 NumGlyphs = 1 173 173 MaxLength = 0 … … 175 175 end 176 176 object Label6: TLabel 177 Left = 1 9178 Height = 2 6179 Top = 3 8180 Width = 87177 Left = 16 178 Height = 22 179 Top = 33 180 Width = 76 181 181 Caption = 'Minimum:' 182 182 ParentColor = False 183 183 end 184 184 object DateEditMax: TDateEdit 185 Left = 1 63186 Height = 43187 Top = 86188 Width = 2 59185 Left = 141 186 Height = 39 187 Top = 75 188 Width = 225 189 189 CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames] 190 190 DateOrder = doNone 191 ButtonWidth = 2 8191 ButtonWidth = 24 192 192 NumGlyphs = 1 193 193 MaxLength = 0 … … 195 195 end 196 196 object Label7: TLabel 197 Left = 1 9198 Height = 2 6199 Top = 96200 Width = 91197 Left = 16 198 Height = 22 199 Top = 83 200 Width = 79 201 201 Caption = 'Maximum:' 202 202 ParentColor = False … … 206 206 end 207 207 object TabSheetFloat: TTabSheet 208 ClientHeight = 2 36209 ClientWidth = 1114208 ClientHeight = 205 209 ClientWidth = 966 210 210 object FloatSpinEditMin: TFloatSpinEdit 211 Left = 1 73212 Height = 43213 Top = 1 9214 Width = 319211 Left = 150 212 Height = 39 213 Top = 16 214 Width = 277 215 215 MaxValue = 100000000 216 216 TabOrder = 0 217 217 end 218 218 object Label8: TLabel 219 Left = 10220 Height = 2 6221 Top = 30222 Width = 87219 Left = 9 220 Height = 22 221 Top = 26 222 Width = 76 223 223 Caption = 'Minimum:' 224 224 ParentColor = False 225 225 end 226 226 object FloatSpinEditMax: TFloatSpinEdit 227 Left = 1 73228 Height = 43229 Top = 77230 Width = 319227 Left = 150 228 Height = 39 229 Top = 67 230 Width = 277 231 231 MaxValue = 100 232 232 TabOrder = 1 233 233 end 234 234 object Label9: TLabel 235 Left = 10236 Height = 2 6237 Top = 88238 Width = 91235 Left = 9 236 Height = 22 237 Top = 76 238 Width = 79 239 239 Caption = 'Maximum:' 240 240 ParentColor = False -
trunk/Forms/FormField.pas
r31 r32 1 unit UFormField;1 unit FormField; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 ComCtrls, EditBtn, Spin, UDatabase;7 ComCtrls, EditBtn, Spin, DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormField } 12 12 13 TFormField = class(TForm )13 TFormField = class(TFormEx) 14 14 ButtonOk: TButton; 15 15 ButtonCancel: TButton; … … 54 54 55 55 uses 56 UDataTypes;56 DataTypes; 57 57 58 58 {$R *.lfm} -
trunk/Forms/FormFields.pas
r31 r32 1 unit UFormFields;1 unit FormFields; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, 7 ActnList, ComCtrls, Menus, UDatabase;7 ActnList, ComCtrls, Menus, DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormFields } 12 12 13 TFormFields = class(TForm )13 TFormFields = class(TFormEx) 14 14 AAdd: TAction; 15 15 AOk: TAction; … … 45 45 end; 46 46 47 47 48 implementation 48 49 49 50 uses 50 UFormField;51 FormField; 51 52 52 53 {$R *.lfm} -
trunk/Forms/FormMain.pas
r31 r32 1 unit UFormMain;1 unit FormMain; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus, 7 ComCtrls, UFormTables;7 ComCtrls, FormTables, FormEx; 8 8 9 9 type … … 11 11 { TFormMain } 12 12 13 TFormMain = class(TForm )13 TFormMain = class(TFormEx) 14 14 CoolBar1: TCoolBar; 15 15 MainMenu1: TMainMenu; … … 41 41 end; 42 42 43 var44 FormMain: TFormMain;45 46 43 47 44 implementation … … 50 47 51 48 uses 52 UCore;49 Core; 53 50 54 51 { TFormMain } … … 56 53 procedure TFormMain.FormActivate(Sender: TObject); 57 54 begin 58 Core. Init;55 Core.Core.Init; 59 56 // TODO: Toolbar height is incorrectly calculated 60 57 ToolBar1.ButtonHeight := ToolBar1.Height; … … 63 60 procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction); 64 61 begin 65 Core.Done; 66 Core.PersistentForm1.Save(Self); 62 Core.Core.Done; 67 63 end; 68 64 … … 79 75 procedure TFormMain.FormShow(Sender: TObject); 80 76 begin 81 Core.PersistentForm1.Load(Self, True);82 77 SetToolbarHints; 83 78 DockInit; … … 86 81 procedure TFormMain.DockInit; 87 82 begin 88 FormTables.ManualDock( FormMain, nil, alClient);83 FormTables.ManualDock(Self, nil, alClient); 89 84 FormTables.Align := alClient; 90 85 FormTables.Show; … … 96 91 begin 97 92 NewCaption := Application.Title; 98 if Assigned(Core. DbClient) then99 NewCaption := Core. DbClient.ConnectProfile.Name + ' - ' + NewCaption;100 FormMain.Caption := NewCaption;93 if Assigned(Core.Core.DbClient) then 94 NewCaption := Core.Core.DbClient.ConnectProfile.Name + ' - ' + NewCaption; 95 Caption := NewCaption; 101 96 FormTables.UpdateInterface; 102 97 end; -
trunk/Forms/FormPreferences.lfm
r31 r32 1 1 object FormPreferences: TFormPreferences 2 2 Left = 765 3 Height = 4223 Height = 366 4 4 Top = 230 5 Width = 5 775 Width = 501 6 6 Caption = 'Preferences' 7 ClientHeight = 422 8 ClientWidth = 577 9 DesignTimePPI = 144 10 OnClose = FormClose 11 OnShow = FormShow 12 LCLVersion = '2.2.2.0' 7 ClientHeight = 366 8 ClientWidth = 501 9 DesignTimePPI = 125 10 LCLVersion = '3.2.0.0' 13 11 object CheckBoxRememberDatabase: TCheckBox 14 Left = 1 815 Height = 3016 Top = 2017 Width = 20112 Left = 16 13 Height = 26 14 Top = 17 15 Width = 182 18 16 Caption = 'Remember database' 19 17 TabOrder = 0 20 18 end 21 19 object ButtonSave: TButton 22 Left = 4 8023 Height = 2 524 Top = 3 7625 Width = 7520 Left = 417 21 Height = 22 22 Top = 326 23 Width = 65 26 24 Anchors = [akRight, akBottom] 27 25 Caption = 'Save' … … 30 28 end 31 29 object ButtonCancel: TButton 32 Left = 3 8833 Height = 2 534 Top = 3 7535 Width = 7530 Left = 337 31 Height = 22 32 Top = 325 33 Width = 65 36 34 Anchors = [akRight, akBottom] 37 35 Caption = 'Cancel' … … 40 38 end 41 39 object ComboBoxLanguage: TComboBox 42 Left = 20043 Height = 4244 Top = 5645 Width = 2 9240 Left = 174 41 Height = 38 42 Top = 49 43 Width = 253 46 44 ItemHeight = 0 47 45 Style = csDropDownList … … 49 47 end 50 48 object Label1: TLabel 51 Left = 1 852 Height = 2 653 Top = 6554 Width = 8849 Left = 16 50 Height = 22 51 Top = 56 52 Width = 79 55 53 Caption = 'Language:' 56 54 ParentColor = False -
trunk/Forms/FormPreferences.pas
r31 r32 1 unit UFormPreferences;1 unit FormPreferences; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 UDatabase;7 DbEngine, FormEx; 8 8 9 9 type 10 10 { TFormPreferences } 11 11 12 TFormPreferences = class(TForm )12 TFormPreferences = class(TFormEx) 13 13 ButtonSave: TButton; 14 14 ButtonCancel: TButton; … … 16 16 ComboBoxLanguage: TComboBox; 17 17 Label1: TLabel; 18 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);19 procedure FormShow(Sender: TObject);20 18 public 21 19 procedure Load(Preferences: TPreferences); … … 29 27 30 28 uses 31 UCore,Languages;29 Languages; 32 30 33 31 { TFormPreferences } 34 35 procedure TFormPreferences.FormShow(Sender: TObject);36 begin37 Core.PersistentForm1.Load(Self);38 end;39 40 procedure TFormPreferences.FormClose(Sender: TObject;41 var CloseAction: TCloseAction);42 begin43 Core.PersistentForm1.Save(Self)44 end;45 32 46 33 procedure TFormPreferences.Load(Preferences: TPreferences); 47 34 begin 48 35 CheckBoxRememberDatabase.Checked := Preferences.RememberDatabase; 49 Core.Translator1.LanguageListToStrings(ComboBoxLanguage.Items); 50 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Translator1.Language); 36 TFormEx.Translator.LanguageListToStrings(ComboBoxLanguage.Items); 37 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject( 38 TFormEx.Translator.Language); 51 39 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 52 40 end; … … 56 44 Preferences.RememberDatabase := CheckBoxRememberDatabase.Checked; 57 45 if ComboBoxLanguage.ItemIndex <> -1 then 58 Core.Translator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);46 TFormEx.Translator.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]); 59 47 end; 60 48 -
trunk/Forms/FormRecord.pas
r31 r32 1 unit UFormRecord;1 unit FormRecord; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 7 ComCtrls, ActnList, StdCtrls, EditBtn, UDatabase, Spin, Generics.Collections; 7 ComCtrls, ActnList, StdCtrls, EditBtn, DbEngine, Spin, Generics.Collections, 8 FormEx; 8 9 9 10 type … … 11 12 { TFormRecord } 12 13 13 TFormRecord = class(TForm )14 TFormRecord = class(TFormEx) 14 15 ASave: TAction; 15 16 ACancel: TAction; … … 37 38 38 39 uses 39 UDataTypes, UCore;40 DataTypes; 40 41 41 42 {$R *.lfm} … … 89 90 LineHeight: Integer; 90 91 begin 91 LineHeight := Core.ScaleDPI1.ScaleY(35, Core.ScaleDPI1.DesignDPI.Y);92 LineHeight := TFormEx.ScaleDPI.ScaleY(35, TFormEx.ScaleDPI.DesignDPI.Y); 92 93 93 94 Row := DataRecord; -
trunk/Forms/FormRecords.pas
r31 r32 1 unit UFormRecords;1 unit FormRecords; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 ActnList, Menus, UDatabase;7 ActnList, Menus, DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormRecords } 12 12 13 TFormRecords = class(TForm )13 TFormRecords = class(TFormEx) 14 14 AAdd: TAction; 15 15 ActionList1: TActionList; … … 42 42 43 43 uses 44 UFormRecord;44 FormRecord; 45 45 46 46 {$R *.lfm} -
trunk/Forms/FormTable.pas
r31 r32 1 unit UFormTable;1 unit FormTable; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 7 UDatabase;7 DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormTable } 12 12 13 TFormTable = class(TForm )13 TFormTable = class(TFormEx) 14 14 ButtonOk: TButton; 15 15 ButtonCancel: TButton; -
trunk/Forms/FormTables.lfm
r31 r32 1 1 object FormTables: TFormTables 2 2 Left = 731 3 Height = 7923 Height = 688 4 4 Top = 117 5 Width = 1 1745 Width = 1019 6 6 Caption = 'Tables' 7 ClientHeight = 7928 ClientWidth = 1 1749 DesignTimePPI = 1 447 ClientHeight = 688 8 ClientWidth = 1019 9 DesignTimePPI = 125 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy 12 12 OnShow = FormShow 13 LCLVersion = ' 2.2.2.0'13 LCLVersion = '3.2.0.0' 14 14 object ListViewTables: TListView 15 Left = 516 Height = 73917 Top = 518 Width = 1 16415 Left = 4 16 Height = 643 17 Top = 4 18 Width = 1011 19 19 Align = alClient 20 BorderSpacing.Around = 520 BorderSpacing.Around = 4 21 21 Columns = < 22 22 item 23 23 Caption = 'Name' 24 Width = 60024 Width = 521 25 25 end 26 26 item 27 27 Caption = 'Records' 28 Width = 54928 Width = 477 29 29 end> 30 30 OwnerData = True … … 40 40 object ToolBar1: TToolBar 41 41 Left = 0 42 Height = 4343 Top = 74944 Width = 1 17442 Height = 37 43 Top = 651 44 Width = 1019 45 45 Align = alBottom 46 ButtonHeight = 3 847 ButtonWidth = 3 846 ButtonHeight = 33 47 ButtonWidth = 33 48 48 Images = Core.ImageList1 49 49 ParentShowHint = False … … 56 56 end 57 57 object ToolButton2: TToolButton 58 Left = 3 958 Left = 37 59 59 Top = 2 60 60 Action = AModify 61 61 end 62 62 object ToolButton3: TToolButton 63 Left = 7 763 Left = 73 64 64 Top = 2 65 65 Action = ARemove 66 66 end 67 67 object ToolButton4: TToolButton 68 Left = 1 1568 Left = 109 69 69 Top = 2 70 70 Action = AShowRecords 71 71 end 72 72 object ToolButton5: TToolButton 73 Left = 1 5373 Left = 145 74 74 Top = 2 75 75 Action = AShowFields … … 78 78 object ActionList1: TActionList 79 79 Images = Core.ImageList1 80 Left = 3 6881 Top = 1 7380 Left = 319 81 Top = 150 82 82 object AAdd: TAction 83 83 Caption = 'Add' … … 108 108 object PopupMenu1: TPopupMenu 109 109 Images = Core.ImageList1 110 Left = 557111 Top = 1 73110 Left = 484 111 Top = 150 112 112 object MenuItem4: TMenuItem 113 113 Action = AShowRecords -
trunk/Forms/FormTables.pas
r31 r32 1 unit UFormTables;1 unit FormTables; 2 2 3 3 interface … … 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 ActnList, Menus, UDatabase;7 ActnList, Menus, DbEngine, FormEx; 8 8 9 9 type … … 11 11 { TFormTables } 12 12 13 TFormTables = class(TForm )13 TFormTables = class(TFormEx) 14 14 AAdd: TAction; 15 15 AShowFields: TAction; … … 57 57 58 58 uses 59 UFormTable, UFormRecords, UFormFields;59 FormTable, FormRecords, FormFields; 60 60 61 61 {$R *.lfm}
Note:
See TracChangeset
for help on using the changeset viewer.