Changeset 26 for trunk/Forms


Ignore:
Timestamp:
Sep 10, 2022, 8:03:08 PM (20 months ago)
Author:
chronos
Message:
  • Removed: TemplateGenerics as required package. Used Generics.Collections instead.
Location:
trunk
Files:
9 added
8 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        77heaptrclog.trc
        88MyData.exe
         9MyData.dbg
         10
  • trunk/Forms/UFormConnect.lfm

    r20 r26  
    11object FormConnect: TFormConnect
    22  Left = 795
    3   Height = 452
     3  Height = 542
    44  Top = 509
    5   Width = 616
     5  Width = 739
    66  Caption = 'Connection parameters:'
    7   ClientHeight = 452
    8   ClientWidth = 616
    9   DesignTimePPI = 120
     7  ClientHeight = 542
     8  ClientWidth = 739
     9  DesignTimePPI = 144
    1010  OnShow = FormShow
    11   LCLVersion = '1.8.0.6'
     11  LCLVersion = '2.2.2.0'
    1212  object EditName: TEdit
    13     Left = 211
    14     Height = 28
    15     Top = 21
    16     Width = 261
     13    Left = 253
     14    Height = 43
     15    Top = 25
     16    Width = 313
    1717    TabOrder = 0
    1818  end
    1919  object Label1: TLabel
    20     Left = 16
    21     Height = 20
    22     Top = 26
    23     Width = 43
     20    Left = 19
     21    Height = 26
     22    Top = 31
     23    Width = 56
    2424    Caption = 'Name:'
    2525    ParentColor = False
    2626  end
    2727  object Label2: TLabel
    28     Left = 16
    29     Height = 20
    30     Top = 67
    31     Width = 115
     28    Left = 19
     29    Height = 26
     30    Top = 80
     31    Width = 147
    3232    Caption = 'Database engine:'
    3333    ParentColor = False
    3434  end
    3535  object ComboBox1: TComboBox
    36     Left = 213
    37     Height = 28
    38     Top = 67
    39     Width = 260
    40     ItemHeight = 20
     36    Left = 256
     37    Height = 42
     38    Top = 80
     39    Width = 312
     40    ItemHeight = 0
    4141    OnChange = ComboBox1Change
    4242    Style = csDropDownList
     
    4444  end
    4545  object ButtonOk: TButton
    46     Left = 460
    47     Height = 25
    48     Top = 402
    49     Width = 75
     46    Left = 552
     47    Height = 30
     48    Top = 482
     49    Width = 90
    5050    Anchors = [akRight, akBottom]
    5151    Caption = 'Ok'
     
    5454  end
    5555  object ButtonCancel: TButton
    56     Left = 336
    57     Height = 25
    58     Top = 400
    59     Width = 75
     56    Left = 403
     57    Height = 30
     58    Top = 480
     59    Width = 90
    6060    Anchors = [akRight, akBottom]
    6161    Caption = 'Cancel'
     
    6464  end
    6565  object PageControl1: TPageControl
    66     Left = 15
    67     Height = 250
    68     Top = 116
    69     Width = 586
     66    Left = 18
     67    Height = 300
     68    Top = 139
     69    Width = 703
    7070    ActivePage = TabSheetRegistry
    7171    Anchors = [akTop, akLeft, akRight]
     
    7474    TabOrder = 4
    7575    object TabSheetXml: TTabSheet
    76       ClientHeight = 242
    77       ClientWidth = 578
     76      ClientHeight = 296
     77      ClientWidth = 693
    7878      object Label3: TLabel
    79         Left = 14
    80         Height = 20
    81         Top = 20
    82         Width = 54
     79        Left = 17
     80        Height = 26
     81        Top = 24
     82        Width = 69
    8383        Caption = 'Xml file:'
    8484        ParentColor = False
    8585      end
    8686      object EditXml: TEdit
    87         Left = 92
    88         Height = 28
    89         Top = 21
    90         Width = 372
     87        Left = 110
     88        Height = 43
     89        Top = 25
     90        Width = 446
    9191        Anchors = [akTop, akLeft, akRight]
    9292        TabOrder = 0
    9393      end
    9494      object ButtonXmlBrowse: TButton
    95         Left = 472
    96         Height = 31
    97         Top = 16
    98         Width = 94
     95        Left = 566
     96        Height = 37
     97        Top = 19
     98        Width = 113
    9999        Anchors = [akTop, akRight]
    100100        Caption = 'Browse'
     
    104104    end
    105105    object TabSheetSql: TTabSheet
    106       ClientHeight = 242
    107       ClientWidth = 578
     106      ClientHeight = 296
     107      ClientWidth = 693
    108108      object Label4: TLabel
    109         Left = 14
    110         Height = 20
    111         Top = 16
    112         Width = 34
     109        Left = 17
     110        Height = 26
     111        Top = 19
     112        Width = 44
    113113        Caption = 'Host:'
    114114        ParentColor = False
    115115      end
    116116      object EditHost: TEdit
    117         Left = 125
    118         Height = 28
    119         Top = 12
    120         Width = 260
     117        Left = 150
     118        Height = 43
     119        Top = 14
     120        Width = 312
    121121        TabOrder = 0
    122122      end
    123123      object Label5: TLabel
    124         Left = 16
    125         Height = 20
    126         Top = 48
    127         Width = 30
     124        Left = 19
     125        Height = 26
     126        Top = 58
     127        Width = 40
    128128        Caption = 'Port:'
    129129        ParentColor = False
    130130      end
    131131      object SpinEditPort: TSpinEdit
    132         Left = 125
    133         Height = 28
    134         Top = 48
    135         Width = 111
     132        Left = 150
     133        Height = 43
     134        Top = 58
     135        Width = 133
    136136        MaxValue = 65535
    137137        TabOrder = 1
     
    146146  end
    147147  object OpenDialog1: TOpenDialog
    148     left = 528
    149     top = 32
     148    Left = 632
     149    Top = 32
    150150  end
    151151end
  • trunk/Forms/UFormConnect.pas

    r20 r26  
    11unit UFormConnect;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3634    procedure ComboBox1Change(Sender: TObject);
    3735    procedure FormShow(Sender: TObject);
    38   private
    3936  public
    4037    procedure Load(ConnectProfile: TDbConnectProfile);
  • trunk/Forms/UFormDatabases.lfm

    r20 r26  
    11object FormDatabases: TFormDatabases
    22  Left = 592
    3   Height = 515
     3  Height = 618
    44  Top = 429
    5   Width = 908
     5  Width = 1090
    66  Caption = 'Connection profiles'
    7   ClientHeight = 515
    8   ClientWidth = 908
    9   DesignTimePPI = 120
     7  ClientHeight = 618
     8  ClientWidth = 1090
     9  DesignTimePPI = 144
    1010  OnShow = FormShow
    1111  Position = poMainFormCenter
    12   LCLVersion = '1.8.0.6'
     12  LCLVersion = '2.2.2.0'
    1313  object ListView1: TListView
    14     Left = 4
    15     Height = 471
    16     Top = 4
    17     Width = 900
     14    Left = 5
     15    Height = 565
     16    Top = 5
     17    Width = 1080
    1818    Align = alClient
    19     BorderSpacing.Around = 4
     19    BorderSpacing.Around = 5
    2020    Columns = <   
    2121      item
    2222        Caption = 'Name'
    23         Width = 200
     23        Width = 240
    2424      end   
    2525      item
    2626        Caption = 'Type'
    27         Width = 200
     27        Width = 240
    2828      end   
    2929      item
    3030        Caption = 'Connection string'
    31         Width = 483
     31        Width = 585
    3232      end>
    3333    OwnerData = True
     
    4343  object ToolBar1: TToolBar
    4444    Left = 0
    45     Height = 36
    46     Top = 479
    47     Width = 908
     45    Height = 43
     46    Top = 575
     47    Width = 1090
    4848    Align = alBottom
    49     ButtonHeight = 32
    50     ButtonWidth = 32
     49    ButtonHeight = 38
     50    ButtonWidth = 38
    5151    Images = Core.ImageList1
    5252    ParentShowHint = False
     
    5959    end
    6060    object ToolButton2: TToolButton
    61       Left = 37
     61      Left = 39
    6262      Top = 2
    6363      Action = AModify
    6464    end
    6565    object ToolButton3: TToolButton
    66       Left = 73
     66      Left = 77
    6767      Top = 2
    6868      Action = ARemove
    6969    end
    7070    object ToolButton4: TToolButton
    71       Left = 109
     71      Left = 115
    7272      Top = 2
    7373      Action = AOpen
     
    7676  object PopupMenu1: TPopupMenu
    7777    Images = Core.ImageList1
    78     left = 569
    79     top = 136
     78    Left = 704
     79    Top = 168
    8080    object MenuItem1: TMenuItem
    8181      Action = AAdd
     
    9494  object ActionList1: TActionList
    9595    Images = Core.ImageList1
    96     left = 392
    97     top = 136
     96    Left = 470
     97    Top = 163
    9898    object AAdd: TAction
    9999      Caption = 'New'
  • trunk/Forms/UFormDatabases.pas

    r20 r26  
    11unit UFormDatabases;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3937    procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
    4038      Selected: Boolean);
    41   private
    4239  public
    4340    SelectedProfile: TDbConnectProfile;
  • trunk/Forms/UFormField.pas

    r20 r26  
    11unit UFormField;
    2 
    3 {$mode delphi}
    42
    53interface
     
    4745    procedure FormCreate(Sender: TObject);
    4846    procedure FormShow(Sender: TObject);
    49   private
    50     { private declarations }
    5147  public
    5248    procedure Load(Field: TField);
     
    5652var
    5753  FormField: TFormField;
     54
    5855
    5956implementation
  • trunk/Forms/UFormFields.pas

    r24 r26  
    11unit UFormFields;
    2 
    3 {$mode delphi}
    42
    53interface
     
    4038    procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
    4139      Selected: Boolean);
    42   private
    43     { private declarations }
    4440  public
    4541    Fields: TFields;
     
    166162  Fields.Table.DbClient.Query('SELECT * FROM ModelField WHERE Model = ' + Fields.Table.Name, DbRows);
    167163  for I := 0 to DbRows.Count - 1 do begin
    168     NewField := Fields.AddNew(DbRows[I].Values['Name'], Fields.Table.DbClient.DbManager.DataTypes.SearchByName(DbRows[I].Values['DataType']));
    169     NewField.TextBefore := DbRows[I].Values['Caption'];
     164    NewField := Fields.AddNew(DbRows[I].Items['Name'],
     165      Fields.Table.DbClient.DbManager.DataTypes.SearchByName(DbRows[I].Items['DataType']));
     166    NewField.TextBefore := DbRows[I].Items['Caption'];
    170167  end;
    171168  DbRows.Free;
  • trunk/Forms/UFormMain.pas

    r22 r26  
    11unit UFormMain;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3331    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    3432    procedure FormShow(Sender: TObject);
    35   private
    36     { private declarations }
    3733  public
    3834    procedure DockInit;
  • trunk/Forms/UFormPreferences.lfm

    r19 r26  
    1010  OnClose = FormClose
    1111  OnShow = FormShow
    12   LCLVersion = '1.8.2.0'
     12  LCLVersion = '2.2.2.0'
    1313  object CheckBoxRememberDatabase: TCheckBox
    1414    Left = 18
    15     Height = 29
     15    Height = 30
    1616    Top = 20
    17     Width = 194
     17    Width = 201
    1818    Caption = 'Remember database'
    1919    TabOrder = 0
     
    4040  end
    4141  object ComboBoxLanguage: TComboBox
    42     Left = 192
    43     Height = 33
    44     Top = 64
     42    Left = 200
     43    Height = 42
     44    Top = 56
    4545    Width = 292
    46     ItemHeight = 25
     46    ItemHeight = 0
    4747    Style = csDropDownList
    4848    TabOrder = 3
     
    5050  object Label1: TLabel
    5151    Left = 18
    52     Height = 25
     52    Height = 26
    5353    Top = 65
    54     Width = 81
     54    Width = 88
    5555    Caption = 'Language:'
    5656    ParentColor = False
  • trunk/Forms/UFormPreferences.pas

    r25 r26  
    11unit UFormPreferences;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2018    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    2119    procedure FormShow(Sender: TObject);
    22   private
    23     { private declarations }
    2420  public
    2521    procedure Load(Preferences: TPreferences);
  • trunk/Forms/UFormRecord.pas

    r14 r26  
    11unit UFormRecord;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2523    procedure FormDestroy(Sender: TObject);
    2624    procedure FormShow(Sender: TObject);
    27   private
    28     { private declarations }
    2925  public
    3026    Table: TTable;
  • trunk/Forms/UFormRecords.pas

    r15 r26  
    11unit UFormRecords;
    2 
    3 {$mode delphi}
    42
    53interface
     
    3432    procedure ListView1SelectItem(Sender: TObject; Item: TListItem;
    3533      Selected: Boolean);
    36   private
    37     { private declarations }
    3834  public
    3935    Table: TTable;
  • trunk/Forms/UFormTable.pas

    r4 r26  
    11unit UFormTable;
    2 
    3 {$mode delphi}
    42
    53interface
     
    2018    Label1: TLabel;
    2119    Label2: TLabel;
    22   private
    23     { private declarations }
    2420  public
    2521    procedure Load(Table: TTable);
     
    2925var
    3026  FormTable: TFormTable;
     27
    3128
    3229implementation
  • trunk/Forms/UFormTables.lfm

    r21 r26  
    11object FormTables: TFormTables
    22  Left = 731
    3   Height = 660
     3  Height = 792
    44  Top = 117
    5   Width = 978
     5  Width = 1174
    66  Caption = 'Tables'
    7   ClientHeight = 660
    8   ClientWidth = 978
    9   DesignTimePPI = 120
    10   OnActivate = FormActivate
    11   OnClose = FormClose
     7  ClientHeight = 792
     8  ClientWidth = 1174
     9  DesignTimePPI = 144
    1210  OnCreate = FormCreate
    1311  OnDestroy = FormDestroy
    1412  OnShow = FormShow
    15   LCLVersion = '1.8.0.6'
     13  LCLVersion = '2.2.2.0'
    1614  object ListView1: TListView
    17     Left = 4
    18     Height = 616
    19     Top = 4
    20     Width = 970
     15    Left = 5
     16    Height = 739
     17    Top = 5
     18    Width = 1164
    2119    Align = alClient
    22     BorderSpacing.Around = 4
     20    BorderSpacing.Around = 5
    2321    Columns = <   
    2422      item
    2523        Caption = 'Name'
    26         Width = 500
     24        Width = 600
    2725      end   
    2826      item
    2927        Caption = 'Records'
    30         Width = 453
     28        Width = 549
    3129      end>
    3230    OwnerData = True
     
    4240  object ToolBar1: TToolBar
    4341    Left = 0
    44     Height = 36
    45     Top = 624
    46     Width = 978
     42    Height = 43
     43    Top = 749
     44    Width = 1174
    4745    Align = alBottom
    48     ButtonHeight = 32
    49     ButtonWidth = 32
     46    ButtonHeight = 38
     47    ButtonWidth = 38
    5048    Images = Core.ImageList1
    5149    ParentShowHint = False
     
    5856    end
    5957    object ToolButton2: TToolButton
    60       Left = 37
     58      Left = 39
    6159      Top = 2
    6260      Action = AModify
    6361    end
    6462    object ToolButton3: TToolButton
    65       Left = 73
     63      Left = 77
    6664      Top = 2
    6765      Action = ARemove
    6866    end
    6967    object ToolButton4: TToolButton
    70       Left = 109
     68      Left = 115
    7169      Top = 2
    7270      Action = AShowRecords
    7371    end
    7472    object ToolButton5: TToolButton
    75       Left = 145
     73      Left = 153
    7674      Top = 2
    7775      Action = AShowFields
     
    8078  object ActionList1: TActionList
    8179    Images = Core.ImageList1
    82     left = 322
    83     top = 142
     80    Left = 368
     81    Top = 173
    8482    object AAdd: TAction
    8583      Caption = 'Add'
     
    110108  object PopupMenu1: TPopupMenu
    111109    Images = Core.ImageList1
    112     left = 464
    113     top = 144
     110    Left = 557
     111    Top = 173
    114112    object MenuItem4: TMenuItem
    115113      Action = AShowRecords
  • trunk/Forms/UFormTables.pas

    r24 r26  
    11unit UFormTables;
    2 
    3 {$mode delphi}{$H+}
    42
    53interface
     
    75uses
    86  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,
    9   ActnList, Menus, UDatabase, SpecializedDictionary;
     7  ActnList, Menus, UDatabase;
    108
    119type
     
    3836    procedure AShowFieldsExecute(Sender: TObject);
    3937    procedure AShowRecordsExecute(Sender: TObject);
    40     procedure FormActivate(Sender: TObject);
    41     procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    4238    procedure FormCreate(Sender: TObject);
    4339    procedure FormDestroy(Sender: TObject);
     
    6056  FormTables: TFormTables;
    6157
     58
    6259implementation
    6360
     
    7168  SRemoveTableConfirm = 'Do you want to really remove table ''%s'' ?';
    7269  SNewTable = 'New table';
    73 
    7470
    7571{ TFormTables }
     
    202198end;
    203199
    204 procedure TFormTables.FormActivate(Sender: TObject);
    205 begin
    206 end;
    207 
    208 procedure TFormTables.FormClose(Sender: TObject; var CloseAction: TCloseAction);
    209 begin
    210 end;
    211 
    212200procedure TFormTables.FormCreate(Sender: TObject);
    213201begin
     
    217205procedure TFormTables.FormDestroy(Sender: TObject);
    218206begin
    219   FTables.Free;
     207  FreeAndNil(FTables);
    220208end;
    221209
     
    241229    DbClient.Query('SELECT * FROM Model', DbRows);
    242230    for I := 0 to DbRows.Count - 1 do begin
    243       NewTable := Tables.AddNew(TDictionaryStringString(DbRows[I]).Values['Name']);
    244       NewTable.Caption := TDictionaryStringString(DbRows[I]).Values['Caption'];
     231      NewTable := Tables.AddNew(DbRows[I].Items['Name']);
     232      NewTable.Caption := DbRows[I].Items['Caption'];
    245233    end;
    246234    DbRows.Free;
Note: See TracChangeset for help on using the changeset viewer.