Changeset 32 for trunk/Forms


Ignore:
Timestamp:
Jun 29, 2024, 7:58:36 AM (5 months ago)
Author:
chronos
Message:
  • Modified: Removed U prefix from units names.
  • Modified: Use TFormEx for all forms.
Location:
trunk/Forms
Files:
3 added
2 deleted
26 moved

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormConnect.lfm

    r31 r32  
    11object FormConnect: TFormConnect
    2   Left = 795
    3   Height = 542
    4   Top = 509
    5   Width = 739
     2  Left = 590
     3  Height = 470
     4  Top = 269
     5  Width = 641
    66  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'
    1211  object EditName: TEdit
    13     Left = 256
    14     Height = 43
    15     Top = 25
    16     Width = 310
     12    Left = 222
     13    Height = 39
     14    Top = 22
     15    Width = 269
    1716    TabOrder = 0
    1817  end
    1918  object Label1: TLabel
    20     Left = 18
    21     Height = 26
    22     Top = 32
    23     Width = 56
     19    Left = 16
     20    Height = 22
     21    Top = 28
     22    Width = 49
    2423    Caption = 'Name:'
    2524    ParentColor = False
    2625  end
    2726  object Label2: TLabel
    28     Left = 18
    29     Height = 26
    30     Top = 80
    31     Width = 147
     27    Left = 16
     28    Height = 22
     29    Top = 69
     30    Width = 130
    3231    Caption = 'Database engine:'
    3332    ParentColor = False
    3433  end
    3534  object ComboBoxDbEngines: TComboBox
    36     Left = 256
    37     Height = 42
    38     Top = 72
    39     Width = 310
     35    Left = 222
     36    Height = 38
     37    Top = 62
     38    Width = 269
    4039    ItemHeight = 0
    41     OnChange = ComboBoxDbEnginesChange
    4240    Style = csDropDownList
    4341    TabOrder = 1
     42    OnChange = ComboBoxDbEnginesChange
    4443  end
    4544  object ButtonOk: TButton
    46     Left = 624
    47     Height = 30
    48     Top = 496
    49     Width = 90
     45    Left = 541
     46    Height = 26
     47    Top = 430
     48    Width = 78
    5049    Anchors = [akRight, akBottom]
    5150    Caption = 'Ok'
     
    5453  end
    5554  object ButtonCancel: TButton
    56     Left = 488
    57     Height = 30
    58     Top = 496
    59     Width = 90
     55    Left = 423
     56    Height = 26
     57    Top = 430
     58    Width = 78
    6059    Anchors = [akRight, akBottom]
    6160    Caption = 'Cancel'
     
    6463  end
    6564  object PageControl1: TPageControl
    66     Left = 18
    67     Height = 340
    68     Top = 139
    69     Width = 703
     65    Left = 16
     66    Height = 295
     67    Top = 121
     68    Width = 609
    7069    ActivePage = TabSheetRegistry
    7170    Anchors = [akTop, akLeft, akRight]
     
    7473    TabOrder = 4
    7574    object TabSheetXml: TTabSheet
    76       ClientHeight = 336
    77       ClientWidth = 693
     75      ClientHeight = 291
     76      ClientWidth = 599
    7877      object Label3: TLabel
    79         Left = 17
    80         Height = 26
    81         Top = 24
    82         Width = 69
     78        Left = 15
     79        Height = 22
     80        Top = 21
     81        Width = 58
    8382        Caption = 'Xml file:'
    8483        ParentColor = False
    8584      end
    8685      object EditXml: TEdit
    87         Left = 110
    88         Height = 43
    89         Top = 16
    90         Width = 446
     86        Left = 95
     87        Height = 39
     88        Top = 14
     89        Width = 385
    9190        Anchors = [akTop, akLeft, akRight]
    9291        TabOrder = 0
    9392      end
    9493      object ButtonXmlBrowse: TButton
    95         Left = 566
    96         Height = 37
    97         Top = 19
    98         Width = 113
     94        Left = 489
     95        Height = 32
     96        Top = 16
     97        Width = 98
    9998        Anchors = [akTop, akRight]
    10099        Caption = 'Browse'
     100        TabOrder = 1
    101101        OnClick = ButtonXmlBrowseClick
    102         TabOrder = 1
    103102      end
    104103    end
    105104    object TabSheetSql: TTabSheet
    106       ClientHeight = 336
    107       ClientWidth = 693
     105      ClientHeight = 291
     106      ClientWidth = 599
    108107      object Label4: TLabel
    109         Left = 19
    110         Height = 26
    111         Top = 19
    112         Width = 44
     108        Left = 16
     109        Height = 22
     110        Top = 16
     111        Width = 38
    113112        Caption = 'Host:'
    114113        ParentColor = False
    115114      end
    116115      object EditHost: TEdit
    117         Left = 150
    118         Height = 43
    119         Top = 14
    120         Width = 312
     116        Left = 130
     117        Height = 39
     118        Top = 12
     119        Width = 271
    121120        TabOrder = 0
    122121      end
    123122      object Label5: TLabel
    124         Left = 19
    125         Height = 26
    126         Top = 72
    127         Width = 40
     123        Left = 16
     124        Height = 22
     125        Top = 62
     126        Width = 34
    128127        Caption = 'Port:'
    129128        ParentColor = False
    130129      end
    131130      object SpinEditPort: TSpinEdit
    132         Left = 152
    133         Height = 43
    134         Top = 64
    135         Width = 133
     131        Left = 132
     132        Height = 39
     133        Top = 56
     134        Width = 115
    136135        MaxValue = 65535
    137136        TabOrder = 1
     
    144143  end
    145144  object OpenDialog1: TOpenDialog
    146     Left = 632
    147     Top = 32
     145    Left = 549
     146    Top = 28
    148147  end
    149148end
  • trunk/Forms/FormConnect.pas

    r31 r32  
    1 unit UFormConnect;
     1unit FormConnect;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   ComCtrls, Spin, UDatabase;
     7  ComCtrls, Spin, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormConnect }
    1212
    13   TFormConnect = class(TForm)
     13  TFormConnect = class(TFormEx)
    1414    ButtonXmlBrowse: TButton;
    1515    ButtonOk: TButton;
     
    3333    procedure ButtonXmlBrowseClick(Sender: TObject);
    3434    procedure ComboBoxDbEnginesChange(Sender: TObject);
    35     procedure FormCreate(Sender: TObject);
     35  private
     36    FDbManager: TDbManager;
     37    procedure SetDbManager(AValue: TDbManager);
    3638  public
    3739    procedure Load(ConnectProfile: TDbConnectProfile);
     
    3941    procedure ReloadDbEngines;
    4042    procedure UpdateInterface;
     43    property DbManager: TDbManager read FDbManager write SetDbManager;
    4144  end;
    4245
     
    4750
    4851uses
    49   UCore, UEngineXML, UEngineMySQL;
     52  EngineXML, EngineMySQL;
    5053
    5154resourcestring
     
    6972end;
    7073
    71 procedure TFormConnect.FormCreate(Sender: TObject);
     74procedure TFormConnect.SetDbManager(AValue: TDbManager);
    7275begin
     76  if FDbManager = AValue then Exit;
     77  FDbManager := AValue;
    7378  ReloadDbEngines;
    7479end;
     
    110115  try
    111116    ComboBoxDbEngines.Items.Clear;
    112     for I := 0 to Core.DbManager.ClientTypes.Count - 1 do
    113       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]);
    115120  finally
    116121    ComboBoxDbEngines.Items.Endupdate;
  • trunk/Forms/FormDatabases.pas

    r31 r32  
    1 unit UFormDatabases;
     1unit FormDatabases;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    7   Menus, ActnList, UDatabase;
     7  Menus, ActnList, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormDatabases }
    1212
    13   TFormDatabases = class(TForm)
     13  TFormDatabases = class(TFormEx)
    1414    AAdd: TAction;
    1515    AOpen: TAction;
     
    3939  public
    4040    SelectedProfile: TDbConnectProfile;
     41    DbManager: TDbManager;
    4142    procedure ReloadList;
    4243    procedure UpdateInterface;
     
    4950
    5051uses
    51   UCore, UFormConnect;
     52  FormConnect;
    5253
    5354resourcestring
     
    7677    if MessageDlg(SRemoveDatabaseConnection, Format(SRemoveDatabaseConnectionQuery, [
    7778    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);
    7980      ReloadList;
    8081    end;
     
    9091  with TFormConnect.Create(nil) do
    9192  try
     93    DbManager := Self.DbManager;
    9294    Load(NewConnectProfile);
    9395    if ShowModal = mrOk then begin
    9496      Save(NewConnectProfile);
    95       Core.DbManager.ConnectProfiles.Add(NewConnectProfile);
     97      DbManager.ConnectProfiles.Add(NewConnectProfile);
    9698      ReloadList;
    9799    end else NewConnectProfile.Free;
     
    104106begin
    105107  if Assigned(ListView1.Selected) then begin
     108    DbManager := Self.DbManager;
    106109    with TFormConnect.Create(nil) do
    107110    try
     111      DbManager := Self.DbManager;
    108112      Load(TDbConnectProfile(ListView1.Selected.Data));
    109113      if ShowModal = mrOk then begin
     
    128132procedure TFormDatabases.ListView1Data(Sender: TObject; Item: TListItem);
    129133begin
    130   if (Item.Index >= 0) and (Item.Index < Core.DbManager.ConnectProfiles.Count) then
    131   with TDbConnectProfile(Core.DbManager.ConnectProfiles[Item.Index]) do begin
     134  if (Item.Index >= 0) and (Item.Index < DbManager.ConnectProfiles.Count) then
     135  with TDbConnectProfile(DbManager.ConnectProfiles[Item.Index]) do begin
    132136    Item.Caption := Name;
    133137    Item.SubItems.Add(ClientType.Name);
    134138    Item.SubItems.Add(Params.ConnectionString);
    135     Item.Data := Core.DbManager.ConnectProfiles[Item.Index];
     139    Item.Data := DbManager.ConnectProfiles[Item.Index];
    136140  end
    137141end;
     
    145149procedure TFormDatabases.ReloadList;
    146150begin
    147   ListView1.Items.Count := Core.DbManager.ConnectProfiles.Count;
     151  ListView1.Items.Count := DbManager.ConnectProfiles.Count;
    148152  ListView1.Repaint;
    149153  UpdateInterface;
  • trunk/Forms/FormField.lfm

    r31 r32  
    11object FormField: TFormField
    22  Left = 721
    3   Height = 533
     3  Height = 463
    44  Top = 85
    5   Width = 1169
     5  Width = 1015
    66  Caption = 'Field'
    7   ClientHeight = 533
    8   ClientWidth = 1169
    9   DesignTimePPI = 144
     7  ClientHeight = 463
     8  ClientWidth = 1015
     9  DesignTimePPI = 125
    1010  OnCreate = FormCreate
    1111  OnShow = FormShow
    1212  Position = poMainFormCenter
    13   LCLVersion = '2.2.2.0'
     13  LCLVersion = '3.2.0.0'
    1414  object EditName: TEdit
    15     Left = 202
    16     Height = 43
    17     Top = 13
    18     Width = 317
     15    Left = 175
     16    Height = 39
     17    Top = 11
     18    Width = 275
    1919    TabOrder = 0
    2020  end
    2121  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
    2331    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
    3434    Anchors = [akRight, akBottom]
    3535    Caption = 'Ok'
     
    3838  end
    3939  object EditTextBefore: TEdit
    40     Left = 200
    41     Height = 43
    42     Top = 106
    43     Width = 318
     40    Left = 174
     41    Height = 39
     42    Top = 92
     43    Width = 276
    4444    TabOrder = 2
    4545  end
    4646  object Label2: TLabel
    47     Left = 19
    48     Height = 26
    49     Top = 118
    50     Width = 100
     47    Left = 16
     48    Height = 22
     49    Top = 102
     50    Width = 87
    5151    Caption = 'Text before:'
    5252    ParentColor = False
    5353  end
    5454  object EditTextAfter: TEdit
    55     Left = 200
    56     Height = 43
    57     Top = 163
    58     Width = 318
     55    Left = 174
     56    Height = 39
     57    Top = 141
     58    Width = 276
    5959    TabOrder = 3
    6060  end
    6161  object Label3: TLabel
    62     Left = 19
    63     Height = 26
    64     Top = 173
    65     Width = 84
     62    Left = 16
     63    Height = 22
     64    Top = 150
     65    Width = 74
    6666    Caption = 'Text after:'
    6767    ParentColor = False
    6868  end
    6969  object Label4: TLabel
    70     Left = 20
    71     Height = 26
    72     Top = 67
    73     Width = 85
     70    Left = 17
     71    Height = 22
     72    Top = 58
     73    Width = 76
    7474    Caption = 'Data type:'
    7575    ParentColor = False
    7676  end
    7777  object ComboBoxType: TComboBox
    78     Left = 200
    79     Height = 42
    80     Top = 58
    81     Width = 318
     78    Left = 174
     79    Height = 38
     80    Top = 50
     81    Width = 276
    8282    ItemHeight = 0
    83     OnChange = ComboBoxTypeChange
    8483    Style = csDropDownList
    8584    TabOrder = 4
     85    OnChange = ComboBoxTypeChange
    8686  end
    8787  object ButtonCancel: TButton
    88     Left = 941
    89     Height = 30
    90     Top = 480
    91     Width = 90
     88    Left = 817
     89    Height = 26
     90    Top = 417
     91    Width = 78
    9292    Anchors = [akRight, akBottom]
    9393    Caption = 'Cancel'
     
    9696  end
    9797  object PageControl1: TPageControl
    98     Left = 19
    99     Height = 240
    100     Top = 221
    101     Width = 1124
     98    Left = 16
     99    Height = 209
     100    Top = 192
     101    Width = 976
    102102    ActivePage = TabSheetBoolean
    103103    Anchors = [akTop, akLeft, akRight, akBottom]
     
    106106    TabOrder = 6
    107107    object TabSheetString: TTabSheet
    108       ClientHeight = 236
    109       ClientWidth = 1114
     108      ClientHeight = 205
     109      ClientWidth = 966
    110110      object EditStringDefault: TEdit
    111         Left = 192
    112         Height = 43
    113         Top = 10
    114         Width = 318
     111        Left = 167
     112        Height = 39
     113        Top = 9
     114        Width = 276
    115115        TabOrder = 0
    116116      end
    117117      object Label5: TLabel
    118         Left = 19
    119         Height = 26
    120         Top = 10
    121         Width = 116
     118        Left = 16
     119        Height = 22
     120        Top = 9
     121        Width = 102
    122122        Caption = 'Default value:'
    123123        ParentColor = False
     
    125125    end
    126126    object TabSheetInteger: TTabSheet
    127       ClientHeight = 236
    128       ClientWidth = 1114
     127      ClientHeight = 205
     128      ClientWidth = 966
    129129      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
    132167        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
    169169        CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
    170170        DateOrder = doNone
    171         ButtonWidth = 28
     171        ButtonWidth = 24
    172172        NumGlyphs = 1
    173173        MaxLength = 0
     
    175175      end
    176176      object Label6: TLabel
    177         Left = 19
    178         Height = 26
    179         Top = 38
    180         Width = 87
     177        Left = 16
     178        Height = 22
     179        Top = 33
     180        Width = 76
    181181        Caption = 'Minimum:'
    182182        ParentColor = False
    183183      end
    184184      object DateEditMax: TDateEdit
    185         Left = 163
    186         Height = 43
    187         Top = 86
    188         Width = 259
     185        Left = 141
     186        Height = 39
     187        Top = 75
     188        Width = 225
    189189        CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
    190190        DateOrder = doNone
    191         ButtonWidth = 28
     191        ButtonWidth = 24
    192192        NumGlyphs = 1
    193193        MaxLength = 0
     
    195195      end
    196196      object Label7: TLabel
    197         Left = 19
    198         Height = 26
    199         Top = 96
    200         Width = 91
     197        Left = 16
     198        Height = 22
     199        Top = 83
     200        Width = 79
    201201        Caption = 'Maximum:'
    202202        ParentColor = False
     
    206206    end
    207207    object TabSheetFloat: TTabSheet
    208       ClientHeight = 236
    209       ClientWidth = 1114
     208      ClientHeight = 205
     209      ClientWidth = 966
    210210      object FloatSpinEditMin: TFloatSpinEdit
    211         Left = 173
    212         Height = 43
    213         Top = 19
    214         Width = 319
     211        Left = 150
     212        Height = 39
     213        Top = 16
     214        Width = 277
    215215        MaxValue = 100000000
    216216        TabOrder = 0
    217217      end
    218218      object Label8: TLabel
    219         Left = 10
    220         Height = 26
    221         Top = 30
    222         Width = 87
     219        Left = 9
     220        Height = 22
     221        Top = 26
     222        Width = 76
    223223        Caption = 'Minimum:'
    224224        ParentColor = False
    225225      end
    226226      object FloatSpinEditMax: TFloatSpinEdit
    227         Left = 173
    228         Height = 43
    229         Top = 77
    230         Width = 319
     227        Left = 150
     228        Height = 39
     229        Top = 67
     230        Width = 277
    231231        MaxValue = 100
    232232        TabOrder = 1
    233233      end
    234234      object Label9: TLabel
    235         Left = 10
    236         Height = 26
    237         Top = 88
    238         Width = 91
     235        Left = 9
     236        Height = 22
     237        Top = 76
     238        Width = 79
    239239        Caption = 'Maximum:'
    240240        ParentColor = False
  • trunk/Forms/FormField.pas

    r31 r32  
    1 unit UFormField;
     1unit FormField;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   ComCtrls, EditBtn, Spin, UDatabase;
     7  ComCtrls, EditBtn, Spin, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormField }
    1212
    13   TFormField = class(TForm)
     13  TFormField = class(TFormEx)
    1414    ButtonOk: TButton;
    1515    ButtonCancel: TButton;
     
    5454
    5555uses
    56   UDataTypes;
     56  DataTypes;
    5757
    5858{$R *.lfm}
  • trunk/Forms/FormFields.pas

    r31 r32  
    1 unit UFormFields;
     1unit FormFields;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
    7   ActnList, ComCtrls, Menus, UDatabase;
     7  ActnList, ComCtrls, Menus, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormFields }
    1212
    13   TFormFields = class(TForm)
     13  TFormFields = class(TFormEx)
    1414    AAdd: TAction;
    1515    AOk: TAction;
     
    4545  end;
    4646
     47
    4748implementation
    4849
    4950uses
    50   UFormField;
     51  FormField;
    5152
    5253{$R *.lfm}
  • trunk/Forms/FormMain.pas

    r31 r32  
    1 unit UFormMain;
     1unit FormMain;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    7   ComCtrls, UFormTables;
     7  ComCtrls, FormTables, FormEx;
    88
    99type
     
    1111  { TFormMain }
    1212
    13   TFormMain = class(TForm)
     13  TFormMain = class(TFormEx)
    1414    CoolBar1: TCoolBar;
    1515    MainMenu1: TMainMenu;
     
    4141  end;
    4242
    43 var
    44   FormMain: TFormMain;
    45 
    4643
    4744implementation
     
    5047
    5148uses
    52   UCore;
     49  Core;
    5350
    5451{ TFormMain }
     
    5653procedure TFormMain.FormActivate(Sender: TObject);
    5754begin
    58   Core.Init;
     55  Core.Core.Init;
    5956  // TODO: Toolbar height is incorrectly calculated
    6057  ToolBar1.ButtonHeight := ToolBar1.Height;
     
    6360procedure TFormMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    6461begin
    65   Core.Done;
    66   Core.PersistentForm1.Save(Self);
     62  Core.Core.Done;
    6763end;
    6864
     
    7975procedure TFormMain.FormShow(Sender: TObject);
    8076begin
    81   Core.PersistentForm1.Load(Self, True);
    8277  SetToolbarHints;
    8378  DockInit;
     
    8681procedure TFormMain.DockInit;
    8782begin
    88   FormTables.ManualDock(FormMain, nil, alClient);
     83  FormTables.ManualDock(Self, nil, alClient);
    8984  FormTables.Align := alClient;
    9085  FormTables.Show;
     
    9691begin
    9792  NewCaption := Application.Title;
    98   if Assigned(Core.DbClient) then
    99     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;
    10196  FormTables.UpdateInterface;
    10297end;
  • trunk/Forms/FormPreferences.lfm

    r31 r32  
    11object FormPreferences: TFormPreferences
    22  Left = 765
    3   Height = 422
     3  Height = 366
    44  Top = 230
    5   Width = 577
     5  Width = 501
    66  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'
    1311  object CheckBoxRememberDatabase: TCheckBox
    14     Left = 18
    15     Height = 30
    16     Top = 20
    17     Width = 201
     12    Left = 16
     13    Height = 26
     14    Top = 17
     15    Width = 182
    1816    Caption = 'Remember database'
    1917    TabOrder = 0
    2018  end
    2119  object ButtonSave: TButton
    22     Left = 480
    23     Height = 25
    24     Top = 376
    25     Width = 75
     20    Left = 417
     21    Height = 22
     22    Top = 326
     23    Width = 65
    2624    Anchors = [akRight, akBottom]
    2725    Caption = 'Save'
     
    3028  end
    3129  object ButtonCancel: TButton
    32     Left = 388
    33     Height = 25
    34     Top = 375
    35     Width = 75
     30    Left = 337
     31    Height = 22
     32    Top = 325
     33    Width = 65
    3634    Anchors = [akRight, akBottom]
    3735    Caption = 'Cancel'
     
    4038  end
    4139  object ComboBoxLanguage: TComboBox
    42     Left = 200
    43     Height = 42
    44     Top = 56
    45     Width = 292
     40    Left = 174
     41    Height = 38
     42    Top = 49
     43    Width = 253
    4644    ItemHeight = 0
    4745    Style = csDropDownList
     
    4947  end
    5048  object Label1: TLabel
    51     Left = 18
    52     Height = 26
    53     Top = 65
    54     Width = 88
     49    Left = 16
     50    Height = 22
     51    Top = 56
     52    Width = 79
    5553    Caption = 'Language:'
    5654    ParentColor = False
  • trunk/Forms/FormPreferences.pas

    r31 r32  
    1 unit UFormPreferences;
     1unit FormPreferences;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   UDatabase;
     7  DbEngine, FormEx;
    88
    99type
    1010  { TFormPreferences }
    1111
    12   TFormPreferences = class(TForm)
     12  TFormPreferences = class(TFormEx)
    1313    ButtonSave: TButton;
    1414    ButtonCancel: TButton;
     
    1616    ComboBoxLanguage: TComboBox;
    1717    Label1: TLabel;
    18     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    19     procedure FormShow(Sender: TObject);
    2018  public
    2119    procedure Load(Preferences: TPreferences);
     
    2927
    3028uses
    31   UCore, Languages;
     29  Languages;
    3230
    3331{ TFormPreferences }
    34 
    35 procedure TFormPreferences.FormShow(Sender: TObject);
    36 begin
    37   Core.PersistentForm1.Load(Self);
    38 end;
    39 
    40 procedure TFormPreferences.FormClose(Sender: TObject;
    41   var CloseAction: TCloseAction);
    42 begin
    43   Core.PersistentForm1.Save(Self)
    44 end;
    4532
    4633procedure TFormPreferences.Load(Preferences: TPreferences);
    4734begin
    4835  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);
    5139  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    5240end;
     
    5644  Preferences.RememberDatabase := CheckBoxRememberDatabase.Checked;
    5745  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]);
    5947end;
    6048
  • trunk/Forms/FormRecord.pas

    r31 r32  
    1 unit UFormRecord;
     1unit FormRecord;
    22
    33interface
     
    55uses
    66  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;
    89
    910type
     
    1112  { TFormRecord }
    1213
    13   TFormRecord = class(TForm)
     14  TFormRecord = class(TFormEx)
    1415    ASave: TAction;
    1516    ACancel: TAction;
     
    3738
    3839uses
    39   UDataTypes, UCore;
     40  DataTypes;
    4041
    4142{$R *.lfm}
     
    8990  LineHeight: Integer;
    9091begin
    91   LineHeight := Core.ScaleDPI1.ScaleY(35, Core.ScaleDPI1.DesignDPI.Y);
     92  LineHeight := TFormEx.ScaleDPI.ScaleY(35, TFormEx.ScaleDPI.DesignDPI.Y);
    9293
    9394  Row := DataRecord;
  • trunk/Forms/FormRecords.pas

    r31 r32  
    1 unit UFormRecords;
     1unit FormRecords;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    7   ActnList, Menus, UDatabase;
     7  ActnList, Menus, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormRecords }
    1212
    13   TFormRecords = class(TForm)
     13  TFormRecords = class(TFormEx)
    1414    AAdd: TAction;
    1515    ActionList1: TActionList;
     
    4242
    4343uses
    44   UFormRecord;
     44  FormRecord;
    4545
    4646{$R *.lfm}
  • trunk/Forms/FormTable.pas

    r31 r32  
    1 unit UFormTable;
     1unit FormTable;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    7   UDatabase;
     7  DbEngine, FormEx;
    88
    99type
     
    1111  { TFormTable }
    1212
    13   TFormTable = class(TForm)
     13  TFormTable = class(TFormEx)
    1414    ButtonOk: TButton;
    1515    ButtonCancel: TButton;
  • trunk/Forms/FormTables.lfm

    r31 r32  
    11object FormTables: TFormTables
    22  Left = 731
    3   Height = 792
     3  Height = 688
    44  Top = 117
    5   Width = 1174
     5  Width = 1019
    66  Caption = 'Tables'
    7   ClientHeight = 792
    8   ClientWidth = 1174
    9   DesignTimePPI = 144
     7  ClientHeight = 688
     8  ClientWidth = 1019
     9  DesignTimePPI = 125
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
    1212  OnShow = FormShow
    13   LCLVersion = '2.2.2.0'
     13  LCLVersion = '3.2.0.0'
    1414  object ListViewTables: TListView
    15     Left = 5
    16     Height = 739
    17     Top = 5
    18     Width = 1164
     15    Left = 4
     16    Height = 643
     17    Top = 4
     18    Width = 1011
    1919    Align = alClient
    20     BorderSpacing.Around = 5
     20    BorderSpacing.Around = 4
    2121    Columns = <   
    2222      item
    2323        Caption = 'Name'
    24         Width = 600
     24        Width = 521
    2525      end   
    2626      item
    2727        Caption = 'Records'
    28         Width = 549
     28        Width = 477
    2929      end>
    3030    OwnerData = True
     
    4040  object ToolBar1: TToolBar
    4141    Left = 0
    42     Height = 43
    43     Top = 749
    44     Width = 1174
     42    Height = 37
     43    Top = 651
     44    Width = 1019
    4545    Align = alBottom
    46     ButtonHeight = 38
    47     ButtonWidth = 38
     46    ButtonHeight = 33
     47    ButtonWidth = 33
    4848    Images = Core.ImageList1
    4949    ParentShowHint = False
     
    5656    end
    5757    object ToolButton2: TToolButton
    58       Left = 39
     58      Left = 37
    5959      Top = 2
    6060      Action = AModify
    6161    end
    6262    object ToolButton3: TToolButton
    63       Left = 77
     63      Left = 73
    6464      Top = 2
    6565      Action = ARemove
    6666    end
    6767    object ToolButton4: TToolButton
    68       Left = 115
     68      Left = 109
    6969      Top = 2
    7070      Action = AShowRecords
    7171    end
    7272    object ToolButton5: TToolButton
    73       Left = 153
     73      Left = 145
    7474      Top = 2
    7575      Action = AShowFields
     
    7878  object ActionList1: TActionList
    7979    Images = Core.ImageList1
    80     Left = 368
    81     Top = 173
     80    Left = 319
     81    Top = 150
    8282    object AAdd: TAction
    8383      Caption = 'Add'
     
    108108  object PopupMenu1: TPopupMenu
    109109    Images = Core.ImageList1
    110     Left = 557
    111     Top = 173
     110    Left = 484
     111    Top = 150
    112112    object MenuItem4: TMenuItem
    113113      Action = AShowRecords
  • trunk/Forms/FormTables.pas

    r31 r32  
    1 unit UFormTables;
     1unit FormTables;
    22
    33interface
     
    55uses
    66  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    7   ActnList, Menus, UDatabase;
     7  ActnList, Menus, DbEngine, FormEx;
    88
    99type
     
    1111  { TFormTables }
    1212
    13   TFormTables = class(TForm)
     13  TFormTables = class(TFormEx)
    1414    AAdd: TAction;
    1515    AShowFields: TAction;
     
    5757
    5858uses
    59   UFormTable, UFormRecords, UFormFields;
     59  FormTable, FormRecords, FormFields;
    6060
    6161{$R *.lfm}
Note: See TracChangeset for help on using the changeset viewer.