Changeset 43 for trunk/Forms


Ignore:
Timestamp:
Mar 9, 2012, 1:09:52 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Selection of available protocols in profile manager.
  • Modified: Initialization of persistent data structures rewrited to more native structures.
Location:
trunk/Forms
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormItemList.lfm

    r42 r43  
    11object ItemListForm: TItemListForm
    22  Left = 320
    3   Height = 369
     3  Height = 366
    44  Top = 124
    55  Width = 502
    66  Caption = 'Item list'
    7   ClientHeight = 369
     7  ClientHeight = 366
    88  ClientWidth = 502
    99  OnCreate = FormCreate
     
    1111  OnShow = FormShow
    1212  LCLVersion = '0.9.31'
    13   object ButtonAdd: TButton
    14     Left = 8
    15     Height = 20
    16     Top = 342
    17     Width = 80
    18     Action = AItemAdd
    19     Anchors = [akLeft, akBottom]
    20     TabOrder = 0
    21   end
    22   object ButtonDelete: TButton
    23     Left = 93
    24     Height = 20
    25     Top = 342
    26     Width = 80
    27     Action = AItemDelete
    28     Anchors = [akLeft, akBottom]
    29     TabOrder = 1
    30   end
    31   object ButtonView: TButton
    32     Left = 179
    33     Height = 20
    34     Top = 342
    35     Width = 80
    36     Action = AItemView
    37     Anchors = [akLeft, akBottom]
    38     TabOrder = 2
    39   end
    40   object ButtonEdit: TButton
    41     Left = 265
    42     Height = 20
    43     Top = 342
    44     Width = 80
    45     Action = AItemEdit
    46     Anchors = [akLeft, akBottom]
    47     TabOrder = 3
    48   end
    4913  object ListView1: TListView
    50     Left = 8
    51     Height = 326
    52     Top = 8
    53     Width = 485
     14    Left = 4
     15    Height = 332
     16    Top = 4
     17    Width = 496
    5418    Anchors = [akTop, akLeft, akRight, akBottom]
    5519    Columns = <>
    5620    OwnerData = True
     21    PopupMenu = PopupMenu1
    5722    ReadOnly = True
    5823    RowSelect = True
    59     TabOrder = 4
     24    TabOrder = 0
    6025    ViewStyle = vsReport
    6126    OnData = ListView1Data
     
    6530    OnSelectItem = ListView1SelectItem
    6631  end
    67   object ButtonClose: TButton
    68     Left = 418
    69     Height = 20
    70     Top = 342
    71     Width = 75
    72     Action = AClose
    73     Anchors = [akRight, akBottom]
    74     TabOrder = 5
     32  object ToolBar1: TToolBar
     33    Left = 0
     34    Height = 26
     35    Top = 340
     36    Width = 502
     37    Align = alBottom
     38    Images = MainForm.ImageListActions
     39    ParentShowHint = False
     40    ShowHint = True
     41    TabOrder = 1
     42    object ToolButton1: TToolButton
     43      Left = 1
     44      Top = 2
     45      Action = AItemAdd
     46    end
     47    object ToolButton2: TToolButton
     48      Left = 24
     49      Top = 2
     50      Action = AItemView
     51    end
     52    object ToolButton3: TToolButton
     53      Left = 47
     54      Top = 2
     55      Action = AItemEdit
     56    end
     57    object ToolButton4: TToolButton
     58      Left = 70
     59      Top = 2
     60      Action = AItemDelete
     61    end
     62    object ToolButton5: TToolButton
     63      Left = 93
     64      Top = 2
     65      Action = AItemClone
     66    end
    7567  end
    7668  object ActionList1: TActionList
     69    Images = MainForm.ImageListActions
    7770    left = 229
    7871    top = 104
    7972    object AItemView: TAction
    8073      Caption = 'View'
     74      ImageIndex = 6
    8175      OnExecute = AItemViewExecute
    8276    end
    8377    object AItemEdit: TAction
    8478      Caption = 'Edit'
     79      ImageIndex = 2
    8580      OnExecute = AItemEditExecute
    8681    end
    8782    object AItemAdd: TAction
    8883      Caption = 'Add'
     84      ImageIndex = 3
    8985      OnExecute = AItemAddExecute
    9086    end
    9187    object AItemDelete: TAction
    9288      Caption = 'Delete'
     89      ImageIndex = 5
    9390      OnExecute = AItemDeleteExecute
    9491    end
     
    9794      OnExecute = ACloseExecute
    9895    end
     96    object AItemClone: TAction
     97      Caption = 'Clone'
     98      ImageIndex = 4
     99    end
     100  end
     101  object PopupMenu1: TPopupMenu
     102    Images = MainForm.ImageListActions
     103    left = 232
     104    top = 56
     105    object MenuItem1: TMenuItem
     106      Action = AItemView
     107      Bitmap.Data = {
     108        36040000424D3604000000000000360000002800000010000000100000000100
     109        2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
     110        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     111        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     112        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     113        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     114        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     115        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     116        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     117        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00030303000404
     118        0400040404000404040A04040435040404650404047B04040488040404880404
     119        047B04040465040404350404040A040404000404040003030300030303000404
     120        0401040404390C0C0C80545454ACAAAAAAD88C8C8CF15E5E5EFE5E5E5EFE8C8C
     121        8CF1AAAAAAD8545454AC0C0C0C80040404390404040103030300030303070404
     122        045A3A3A3AA5C6C6C6E6E7E7E7FFA2A2A2FF645D5DFF9E8484FF9E8484FF645D
     123        5DFFA2A2A2FFE7E7E7FFC6C6C6E63A3A3AA50404045A03030307030303414848
     124        48B1E2E2E2F7EAEAEAFFEAEAEAFF646464FF816F6FFF7A6767FF7A6767FF816F
     125        6FFF646464FFEAEAEAFFEAEAEAFFE2E2E2F7484848B103030341030303A07E7E
     126        7ED0F0F0F0FFF0F0F0FFF0F0F0FF434343FFBAB2B2FF352E2EFF352E2EFF6D5F
     127        5FFF434343FFF0F0F0FFF0F0F0FFF0F0F0FF7E7E7ED0030303A0030303484646
     128        46BEE9E9E9F9F6F6F6FFF6F6F6FFBDBDBDFFFFFFFFFF9E9B9BFF413C3CFF4C46
     129        46FF5C5C5CFFF6F6F6FFF6F6F6FFE9E9E9F9464646BE03030348010101080101
     130        0171353535C6CACACAF0FBFBFBFFA6A6A6FF9B9B9BFF383737FF383737FF3838
     131        38FFA6A6A6FFFBFBFBFFCACACAF0353535C60101017101010108010101000101
     132        01010000004F070707B44D4D4DD8A9A9A9EE7E7E7EF9424242FF424242FF7E7E
     133        7EF9A9A9A9EE4D4D4DD8070707B40000004F0101010101010100010101000101
     134        0100000000000000000E0000004E00000094000000B6000000C8000000C80000
     135        00B6000000940000004E0000000E000000000101010001010100FFFFFF00FFFF
     136        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     137        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     138        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     139        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     140        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     141        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     142      }
     143    end
     144    object MenuItem2: TMenuItem
     145      Action = AItemEdit
     146      Bitmap.Data = {
     147        36040000424D3604000000000000360000002800000010000000100000000100
     148        2000000000000004000064000000640000000000000000000000986B3700976A
     149        36FF966935FF966734FF956633FF946532FF946531FF936430FF92622FFF9261
     150        2EFF91602DFF90602CFF905F2BFF8F5D2AFF8E5C29FF8D5B28FF996C38FFF8F7
     151        F6FFF8F7F5FFF7F6F5FFF6F6F4FFF6F5F3FFF5F5F3FFF5F4F2FFF4F3F1FFF4F3
     152        F1FFF3F2F0FFF3F2EFFFF2F1EFFFF2F0EEFFF1F0EDFF8E5D29FF996D3AFFF9F8
     153        F7FF959594FF878787FF9B9A9AFFF7F6F4FFF6F5F3FFF6F5F3FFF5F4F2FFF4F3
     154        F1FFF4F3F1FFF3F2F0FFF3F2EFFFF2F1EFFFF2F1EEFF8F5E2AFF9A6E3BFFF9F9
     155        F8FF7C7C7CFFC4C4C4FF878787FFF7F6F5FF7A7A7AFF787878FF747474FF7171
     156        70FF6D6D6CFF696968FF656565FF616161FFF2F1EFFF905F2BFF9B6F3CFFFAF9
     157        F8FFBEBEBDFF929292FFBCBCBBFFF8F7F6FFF7F7F5FFF7F6F4FFF6F5F4FFF6F5
     158        F3FFF5F4F2FFF5F4F2FFF4F3F1FFF4F2F0FFF3F2F0FF91602DFF9C703DFFFAFA
     159        F9FFFAF9F9FFF9F9F8FFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F5
     160        F4FFF6F5F3FFF5F4F3FFF5F4F2FFF4F3F1FFF4F3F0FF92612EFF9D723EFFFBFB
     161        FAFF9F9F9EFF7F7F7FFFAEAEADFFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6
     162        F5FFF6F6F4FFF6F5F3FFF5F4F3FFF5F4F2FFF4F3F1FF92622FFF9D7340FFFCFB
     163        FBFF818181FFC4C4C4FF8F8F8FFFFAF9F8FF7B7B7AFF797979FF757574FF7271
     164        71FF6D6D6DFF696969FF666665FF626261FFF5F4F2FF936430FF9E7441FFFCFC
     165        FCFFB5B5B5FF848484FFBEBDBDFFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FFF8F8
     166        F6FFF8F7F5FFF7F6F5FFF7F6F4FFF6F5F3FFF6F5F3FF946531FF9F7542FFFDFD
     167        FCFFFCFCFCFFFCFCFBFFFBFBFAFFFBFAFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8
     168        F7FFF8F8F6FFF8F7F6FFF7F6F5FFF7F6F4FFF6F5F4FF956633FFA07643FFFEFD
     169        FDFF8C8C8CFF525252FFA4A4A4FFFBFBFAFFFBFBFAFFFAFAF9FFFAF9F8FFF9F9
     170        F8FFF9F8F7FFF8F8F6FFF8F7F6FFF7F7F5FFF7F6F4FF966734FFA17844FFFEFE
     171        FEFF5F5F5FFF949494FF535353FFFCFCFBFF7B7B7BFF797979FF757575FF7272
     172        72FF6E6E6EFF6A6A69FF666666FF626262FFF7F7F5FF966935FFA17946FFFFFF
     173        FFFF878787FF5D5D5DFFA0A0A0FFFDFCFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFA
     174        F9FFFAFAF9FFFAF9F8FFF9F8F7FFF8F8F7FFF8F7F6FF976A36FFA27A47FFFFFF
     175        FFFFFFFFFFFFFEFEFEFFFEFEFEFFFDFDFDFFFDFDFCFFFCFCFBFFFCFBFBFFFBFB
     176        FAFFFBFAF9FFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FF986B3700A37B48FFBEA2
     177        7FFFBEA17EFFBDA17DFFBDA07CFFBD9F7CFFBC9F7BFFBB9E7AFFBB9D7AFFBB9D
     178        79FFBA9C78FFB99B78FFB99A77FFB89A76FFB89975FF996C39FFA37B48FFA37B
     179        48FFA27A47FFA27946FFA17845FFA07744FFA07643FF9F7542FF9E7441FF9E73
     180        40FF9D723FFF9C713EFF9C703DFF9B6F3CFF9A6E3BFF9A6D3AFF
     181      }
     182    end
     183    object MenuItem4: TMenuItem
     184      Action = AItemClone
     185      Bitmap.Data = {
     186        36040000424D3604000000000000360000002800000010000000100000000100
     187        2000000000000004000064000000640000000000000000000000000000000000
     188        0000000000000000000000000000000000000000000000000000000000000000
     189        0000000000000000000000000000000000000000000000000000000000000000
     190        00000000000000000000000000000000000000000000840000FF840000FF8400
     191        00FF840000FF840000FF840000FF840000FF840000FF840000FF000000000000
     192        00000000000000000000000000000000000000000000840000FFFFFFFFFFFFFF
     193        FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000000000
     194        00000000000000000000000000000000000000000000840000FFFFFFFFFF0000
     195        00FF000000FF000000FF000000FF000000FFFFFFFFFF840000FF000000000000
     196        00FF000000FF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFF
     197        FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000000000
     198        00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF0000
     199        00FF000000FF000000FF000000FF000000FFFFFFFFFF840000FF000000000000
     200        00FFFFFFFFFF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFF
     201        FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FF000000000000
     202        00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF0000
     203        00FF000000FFFFFFFFFF840000FF840000FF840000FF840000FF000000000000
     204        00FFFFFFFFFF000000FF000000FF000000FF000000FF840000FFFFFFFFFFFFFF
     205        FFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF840000FF00000000000000000000
     206        00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFFFFFF
     207        FFFFFFFFFFFFFFFFFFFF840000FF840000FF0000000000000000000000000000
     208        00FFFFFFFFFF000000FF000000FFFFFFFFFF000000FF840000FF840000FF8400
     209        00FF840000FF840000FF840000FF000000000000000000000000000000000000
     210        00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFFFFFFFFF000000FF0000
     211        0000000000000000000000000000000000000000000000000000000000000000
     212        00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF000000FF000000000000
     213        0000000000000000000000000000000000000000000000000000000000000000
     214        00FF000000FF000000FF000000FF000000FF000000FF00000000000000000000
     215        0000000000000000000000000000000000000000000000000000000000000000
     216        0000000000000000000000000000000000000000000000000000000000000000
     217        0000000000000000000000000000000000000000000000000000000000000000
     218        0000000000000000000000000000000000000000000000000000000000000000
     219        0000000000000000000000000000000000000000000000000000
     220      }
     221    end
     222    object MenuItem3: TMenuItem
     223      Action = AItemDelete
     224      Bitmap.Data = {
     225        36040000424D3604000000000000360000002800000010000000100000000100
     226        2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
     227        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     228        FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000000000000
     229        0000000000000000000000000000000000000000000000000000000000000000
     230        00000000000000000000000000000000000000000000FFFFFF00000000000000
     231        0000000000000000000000000000000000000000000000000000000000000000
     232        00000000000000000000000000003A3AE2FFC0C0C0FFFFFFFF00000000000000
     233        0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000
     234        00000000000000000000000000000000000000000000FFFFFF00000000000000
     235        00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000
     236        000000000000000000003A3AE2FFC0C0C0FF0000000003030300000000000000
     237        00003A3AE2FF3A3AE2FF3A3AE2FFC0C0C0FF0000000000000000000000000000
     238        0000000000003A3AE2FFC0C0C0FF000000000000000003030300000000000000
     239        0000000000003838E0FF3838E0FF3838E0FFC0C0C0FF00000000000000000000
     240        00003838E0FF3838E0FFC0C0C0FF000000000000000003030307000000000000
     241        000000000000000000003535DDFF3535DDFF3535DDFFC0C0C0FF000000003535
     242        DDFF3535DDFFC0C0C0FF00000000000000000000000003030341000000000000
     243        00000000000000000000000000003232DAFF3232DAFF3232DAFF3232DAFF3232
     244        DAFFC0C0C0FF00000000000000000000000000000000030303A0000000000000
     245        0000000000000000000000000000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0
     246        C0FF000000000000000000000000000000000000000003030348000000000000
     247        00000000000000000000000000002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2C
     248        D4FFC0C0C0FF0000000000000000000000000000000001010108000000000000
     249        000000000000000000002929D1FF2929D1FF2929D1FFC0C0C0FF000000002929
     250        D1FFC0C0C0FF0000000000000000000000000000000001010100000000000000
     251        00002626CEFF2626CEFF2626CEFF2626CEFFC0C0C0FF00000000000000000000
     252        00002626CEFF2626CEFFC0C0C0FF000000000000000001010100000000002020
     253        C8FF2020C8FF2020C8FF2020C8FFC0C0C0FF0000000000000000000000000000
     254        0000000000002020C8FF2020C8FFC0C0C0FF00000000FFFFFF00000000001818
     255        C0FF1818C0FFC0C0C0FF00000000000000000000000000000000000000000000
     256        000000000000000000001818C0FF1818C0FFC0C0C0FFFFFFFF00000000000000
     257        0000000000000000000000000000000000000000000000000000000000000000
     258        00000000000000000000000000000000000000000000FFFFFF00
     259      }
     260    end
     261    object MenuItem5: TMenuItem
     262      Action = AItemAdd
     263      Bitmap.Data = {
     264        36040000424D3604000000000000360000002800000010000000100000000100
     265        2000000000000004000064000000640000000000000000000000000000000000
     266        0000000000000000000000000000000000000000000000000000000000000000
     267        0000000000000000000000000000000000000000000000000000000000000000
     268        000000000000000000000000000000000000D4D4D4FFB2B2B2FFB2B2B2FFD4D4
     269        D4FF000000000000000000000000000000000000000000000000000000000000
     270        0000000000000000000000000000709B70FF004A00FF004800FF4E764EFFB2B2
     271        B2FF000000000000000000000000000000000000000000000000000000000000
     272        0000000000000000000000000000004E00FF00C800FF00C400FF004800FFB2B2
     273        B2FF000000000000000000000000000000000000000000000000000000000000
     274        0000000000000000000000000000005000FF00CA00FF00C600FF004A00FFB2B2
     275        B2FF000000000000000000000000000000000000000000000000000000000000
     276        0000000000000000000000000000005300FF00CE00FF00CA00FF004C00FFB2B2
     277        B2FF00000000000000000000000000000000000000000000000000000000D4D4
     278        D4FFB2B2B2FFB2B2B2FFB2B2B2FF005400FF00D200FF00CE00FF004E00FFB2B2
     279        B2FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2B2FFD4D4D4FF0000000070A670FF005E
     280        00FF005C00FF005A00FF005800FF005600FF00D600FF00D000FF005000FF004E
     281        00FF004C00FF004A00FF004A00FF4E764EFFB2B2B2FF00000000006200FF8CFE
     282        8CFF00EA00FF00E600FF00E200FF00DE00FF00DA00FF00D400FF00D000FF00CC
     283        00FF00C800FF00C400FF00C200FF004800FFB2B2B2FF00000000006400FFECFF
     284        ECFF8CFE8CFF8CFE8CFF8CFE8CFF8CFE8CFF00DE00FF00D900FF00D400FF00D0
     285        00FF00CC00FF00C800FF00C400FF004A00FFD4D4D4FF0000000070A970FF0064
     286        00FF006400FF006200FF006000FF006000FF8CFE8CFF00DD00FF005800FF0056
     287        00FF005400FF005300FF005000FF709C70FF0000000000000000000000000000
     288        0000000000000000000000000000006000FF8CFE8CFF00E000FF005A00FFB2B2
     289        B2FF000000000000000000000000000000000000000000000000000000000000
     290        0000000000000000000000000000006200FF8CFE8CFF00E500FF005C00FFB2B2
     291        B2FF000000000000000000000000000000000000000000000000000000000000
     292        0000000000000000000000000000006400FF8CFE8CFF00E800FF005E00FFB2B2
     293        B2FF000000000000000000000000000000000000000000000000000000000000
     294        0000000000000000000000000000006400FFECFFECFF8CFE8CFF006000FFD4D4
     295        D4FF000000000000000000000000000000000000000000000000000000000000
     296        000000000000000000000000000070A970FF006400FF006200FF70A670FF0000
     297        0000000000000000000000000000000000000000000000000000
     298      }
     299    end
    99300  end
    100301end
  • trunk/Forms/UFormItemList.lrt

    r42 r43  
    55TITEMLISTFORM.AITEMDELETE.CAPTION=Delete
    66TITEMLISTFORM.ACLOSE.CAPTION=Close
     7TITEMLISTFORM.AITEMCLONE.CAPTION=Clone
  • trunk/Forms/UFormItemList.pas

    r42 r43  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   ComCtrls, ActnList, USystem;
     9  ComCtrls, ActnList, Menus, USystem;
    1010
    1111type
     
    1515  TItemListForm = class(TForm)
    1616    AClose: TAction;
     17    AItemClone: TAction;
    1718    AItemView: TAction;
    1819    AItemEdit: TAction;
     
    2021    AItemDelete: TAction;
    2122    ActionList1: TActionList;
    22     ButtonClose: TButton;
    23     ButtonAdd: TButton;
    24     ButtonDelete: TButton;
    25     ButtonEdit: TButton;
    26     ButtonView: TButton;
    2723    ListView1: TListView;
     24    MenuItem1: TMenuItem;
     25    MenuItem2: TMenuItem;
     26    MenuItem3: TMenuItem;
     27    MenuItem4: TMenuItem;
     28    MenuItem5: TMenuItem;
     29    PopupMenu1: TPopupMenu;
     30    ToolBar1: TToolBar;
     31    ToolButton1: TToolButton;
     32    ToolButton2: TToolButton;
     33    ToolButton3: TToolButton;
     34    ToolButton4: TToolButton;
     35    ToolButton5: TToolButton;
    2836    procedure ACloseExecute(Sender: TObject);
    2937    procedure AItemAddExecute(Sender: TObject);
     
    4654    SelectedItem: Integer;
    4755    procedure Reload;
     56    procedure UpdateInterface;
    4857  end;
    4958
     
    7685  ListView1Resize(Self);
    7786  ListView1SelectItem(Self, nil, False);
     87end;
     88
     89procedure TItemListForm.UpdateInterface;
     90var
     91  I: Integer;
     92begin
     93  AItemDelete.Enabled := Assigned(ListView1.Selected);
     94  AItemView.Enabled := Assigned(ListView1.Selected);
     95  AItemEdit.Enabled := Assigned(ListView1.Selected);
     96  AItemClone.Enabled := Assigned(ListView1.Selected);
     97
     98  for I := 0 to ToolBar1.ButtonCount - 1 do
     99    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
    78100end;
    79101
     
    191213  Selected: Boolean);
    192214begin
    193   ButtonDelete.Enabled := Assigned(ListView1.Selected);
    194   ButtonView.Enabled := Assigned(ListView1.Selected);
    195   ButtonEdit.Enabled := Assigned(ListView1.Selected);
     215  UpdateInterface;
    196216end;
    197217
  • trunk/Forms/UFormLogin.pas

    r42 r43  
    7979procedure TLoginForm.ButtonChangeClick(Sender: TObject);
    8080begin
    81   if LoginProfileForm.ShowModal = mrOk then begin
    82     Core.Profiles.FillStrings(ComboBoxConnection.Items);
    83     Core.LastProfile := ComboBoxConnection.ItemIndex;
    84     ComboBoxConnection.ItemIndex := Core.LastProfile;
    85     if (ComboBoxConnection.Items.Count > 0) and
    86       (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0;
     81  try
     82    LoginProfileForm := TLoginProfileForm.Create(MainForm);
     83    if LoginProfileForm.ShowModal = mrOk then begin
     84      Core.Profiles.FillStrings(ComboBoxConnection.Items);
     85      Core.LastProfile := ComboBoxConnection.ItemIndex;
     86      ComboBoxConnection.ItemIndex := Core.LastProfile;
     87      if (ComboBoxConnection.Items.Count > 0) and
     88        (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0;
     89    end;
     90  finally
     91    LoginProfileForm.Free;
    8792  end;
    8893end;
  • trunk/Forms/UFormLoginProfile.lfm

    r42 r43  
    1111  OnDestroy = FormDestroy
    1212  OnShow = FormShow
     13  Position = poScreenCenter
    1314  LCLVersion = '0.9.31'
    1415  object LabelServer: TLabel
     
    3031    TabOrder = 0
    3132  end
    32   object ListBox1: TListBox
     33  object ListBoxProfiles: TListBox
    3334    Left = 10
    3435    Height = 289
     
    3738    Anchors = [akTop, akLeft, akRight, akBottom]
    3839    ItemHeight = 0
    39     OnSelectionChange = ListBox1SelectionChange
     40    OnSelectionChange = ListBoxProfilesSelectionChange
    4041    ScrollWidth = 246
    4142    TabOrder = 1
  • trunk/Forms/UFormLoginProfile.pas

    r42 r43  
    1010
    1111type
    12   TConnectProtocol = (cpXMLRPC, cpDirect);
     12  TConnectProtocol = (cpXMLRPC, cpDirect, cpMySQL);
    1313
    1414  { TConnectProfile }
     
    5151    Label5: TLabel;
    5252    LabelServer: TLabel;
    53     ListBox1: TListBox;
     53    ListBoxProfiles: TListBox;
    5454    Panel1: TPanel;
    5555    SpinEditPort: TSpinEdit;
     
    6565    procedure FormDestroy(Sender: TObject);
    6666    procedure FormShow(Sender: TObject);
    67     procedure ListBox1SelectionChange(Sender: TObject; User: boolean);
     67    procedure ListBoxProfilesSelectionChange(Sender: TObject; User: boolean);
    6868    procedure SpinEditPortChange(Sender: TObject);
    6969  private
     
    7676  SProfile = 'Profile';
    7777  SProtocolXMLRPC = 'XML-RPC';
     78  SProtocolMySQL = 'MySQL';
     79  SProtocolDirect = 'Direct';
    7880
    7981var
    8082  LoginProfileForm: TLoginProfileForm;
     83  ProtocolTypeText: array[TConnectProtocol] of string;
     84
     85procedure UpdateTranslation;
    8186
    8287implementation
     
    123128procedure TLoginProfileForm.ComboBoxProtocolChange(Sender: TObject);
    124129begin
    125   if ListBox1.ItemIndex <> - 1 then
    126     TConnectProfile(ProfileList[ListBox1.ItemIndex]).Protocol := TConnectProtocol(ComboBoxProtocol.ItemIndex);
     130  if ListBoxProfiles.ItemIndex <> - 1 then
     131    TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]).Protocol :=
     132      TConnectProtocol(ComboBoxProtocol.Items.Objects[ComboBoxProtocol.ItemIndex]);
    127133end;
    128134
    129135procedure TLoginProfileForm.EditNameChange(Sender: TObject);
    130136begin
    131   if ListBox1.ItemIndex <> - 1 then begin
    132     TConnectProfile(ProfileList[ListBox1.ItemIndex]).Name := EditName.Text;
    133     ListBox1.Items[ListBox1.ItemIndex] := EditName.Text;
     137  if ListBoxProfiles.ItemIndex <> - 1 then begin
     138    TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]).Name := EditName.Text;
     139    ListBoxProfiles.Items[ListBoxProfiles.ItemIndex] := EditName.Text;
    134140  end;
    135141end;
     
    137143procedure TLoginProfileForm.EditDatabaseChange(Sender: TObject);
    138144begin
    139   if ListBox1.ItemIndex <> - 1 then
    140     TConnectProfile(ProfileList[ListBox1.ItemIndex]).Database := EditDatabase.Text;
     145  if ListBoxProfiles.ItemIndex <> - 1 then
     146    TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]).Database := EditDatabase.Text;
    141147end;
    142148
    143149procedure TLoginProfileForm.EditServerChange(Sender: TObject);
    144150begin
    145   if ListBox1.ItemIndex <> - 1 then
    146     TConnectProfile(ProfileList[ListBox1.ItemIndex]).HostName := EditServer.Text;
     151  if ListBoxProfiles.ItemIndex <> - 1 then
     152    TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]).HostName := EditServer.Text;
    147153end;
    148154
     
    156162begin
    157163  ProfileList.AddNew(TConnectProfile.Create);
    158   ListBox1.Items.AddObject(TConnectProfile(ProfileList.Last).Name,
     164  ListBoxProfiles.Items.AddObject(TConnectProfile(ProfileList.Last).Name,
    159165    TConnectProfile(ProfileList.Last));
    160166end;
     
    162168procedure TLoginProfileForm.ButtonDeleteClick(Sender: TObject);
    163169begin
    164   if ListBox1.ItemIndex <> - 1 then begin
    165     ProfileList.Delete(ListBox1.ItemIndex);
    166     ListBox1.Items.Delete(ListBox1.ItemIndex);
     170  if ListBoxProfiles.ItemIndex <> - 1 then begin
     171    ProfileList.Delete(ListBoxProfiles.ItemIndex);
     172    ListBoxProfiles.Items.Delete(ListBoxProfiles.ItemIndex);
    167173  end;
    168174end;
     
    178184begin
    179185  ComboBoxProtocol.Clear;
    180   ComboBoxProtocol.Items.Add(SProtocolXMLRPC);
     186  for I := 0 to Integer(High(ProtocolTypeText)) do
     187    ComboBoxProtocol.Items.AddObject(ProtocolTypeText[TConnectProtocol(I)],
     188      Pointer(I));
    181189
    182190  MainForm.PersistentForm.Load(Self);
    183191  ProfileList.Assign(Core.Profiles);
    184   ProfileList.FillStrings(ListBox1.Items);
    185   if Core.LastProfile < ListBox1.Count then
    186     ListBox1.ItemIndex := Core.LastProfile;
    187   if (ListBox1.Items.Count > 0) and
    188     (ListBox1.ItemIndex = -1) then ListBox1.ItemIndex := 0;
    189 end;
    190 
    191 procedure TLoginProfileForm.ListBox1SelectionChange(Sender: TObject;
     192  ProfileList.FillStrings(ListBoxProfiles.Items);
     193  if Core.LastProfile < ListBoxProfiles.Count then
     194    ListBoxProfiles.ItemIndex := Core.LastProfile;
     195  if (ListBoxProfiles.Items.Count > 0) and
     196    (ListBoxProfiles.ItemIndex = -1) then ListBoxProfiles.ItemIndex := 0;
     197end;
     198
     199procedure TLoginProfileForm.ListBoxProfilesSelectionChange(Sender: TObject;
    192200  User: boolean);
    193201begin
    194   if ListBox1.ItemIndex <> -1 then
    195   with TConnectProfile(ProfileList[ListBox1.ItemIndex]) do begin
     202  if ListBoxProfiles.ItemIndex <> -1 then
     203  with TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]) do begin
    196204    EditServer.Text := HostName;
    197205    EditDatabase.Text := Database;
    198     ComboBoxProtocol.ItemIndex := Integer(Protocol);
     206    ComboBoxProtocol.ItemIndex := ComboBoxProtocol.Items.IndexOfObject(Pointer(Protocol));
    199207    SpinEditPort.Value := Port;
    200208    EditName.Text := Name;
     
    204212procedure TLoginProfileForm.SpinEditPortChange(Sender: TObject);
    205213begin
    206   if ListBox1.ItemIndex <> - 1 then
    207     TConnectProfile(ProfileList[ListBox1.ItemIndex]).Port := SpinEditPort.Value;
     214  if ListBoxProfiles.ItemIndex <> - 1 then
     215    TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]).Port := SpinEditPort.Value;
    208216end;
    209217
     
    281289end;
    282290
     291procedure UpdateTranslation;
     292begin
     293  ProtocolTypeText[cpXMLRPC] := SProtocolXMLRPC;
     294  ProtocolTypeText[cpMySQL] := SProtocolMySQL;
     295  ProtocolTypeText[cpDirect] := SProtocolDirect;
     296end;
     297
    283298end.
    284299
  • trunk/Forms/UFormMain.lfm

    r42 r43  
    249249    object AExit: TAction
    250250      Caption = 'Exit'
     251      ImageIndex = 7
    251252      OnExecute = AExitExecute
    252253      ShortCut = 32883
     
    254255    object AToggleFullscreen: TAction
    255256      Caption = 'Fullscreen mode'
     257      ImageIndex = 8
    256258      OnExecute = AToggleFullscreenExecute
    257259      ShortCut = 122
     
    337339    top = 56
    338340    Bitmap = {
    339       4C69020000001000000010000000000000000000000000000000000000000000
     341      4C69090000001000000010000000000000000000000000000000000000000000
    340342      0000000000000000000000000000000000000000000000000000000000000000
    341343      000000000000000000000000000000000000000000000000000000000000F4F9
     
    401403      0000000000000000000000000000000000000000000000000000000000000000
    402404      0000000000000000000000000000000000000000000000000000000000000000
    403       0000000000000000000000000000
     405      0000000000000000000000000000A37B48FFA37B48FFA27A47FFA27946FFA178
     406      45FFA07744FFA07643FF9F7542FF9E7441FF9E7340FF9D723FFF9C713EFF9C70
     407      3DFF9B6F3CFF9A6E3BFF9A6D3AFFA37B48FFBEA27FFFBEA17EFFBDA17DFFBDA0
     408      7CFFBD9F7CFFBC9F7BFFBB9E7AFFBB9D7AFFBB9D79FFBA9C78FFB99B78FFB99A
     409      77FFB89A76FFB89975FF996C39FFA27A47FFFFFFFFFFFFFFFFFFFEFEFEFFFEFE
     410      FEFFFDFDFDFFFDFDFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFAF9FFFAFAF9FFFAF9
     411      F8FFF9F9F7FFF9F8F7FF986B3700A17946FFFFFFFFFF878787FF5D5D5DFFA0A0
     412      A0FFFDFCFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFAF9FFFAFAF9FFFAF9F8FFF9F8
     413      F7FFF8F8F7FFF8F7F6FF976A36FFA17844FFFEFEFEFF5F5F5FFF949494FF5353
     414      53FFFCFCFBFF7B7B7BFF797979FF757575FF727272FF6E6E6EFF6A6A69FF6666
     415      66FF626262FFF7F7F5FF966935FFA07643FFFEFDFDFF8C8C8CFF525252FFA4A4
     416      A4FFFBFBFAFFFBFBFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8F7FFF8F8F6FFF8F7
     417      F6FFF7F7F5FFF7F6F4FF966734FF9F7542FFFDFDFCFFFCFCFCFFFCFCFBFFFBFB
     418      FAFFFBFAFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8F7FFF8F8F6FFF8F7F6FFF7F6
     419      F5FFF7F6F4FFF6F5F4FF956633FF9E7441FFFCFCFCFFB5B5B5FF848484FFBEBD
     420      BDFFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FFF8F8F6FFF8F7F5FFF7F6F5FFF7F6
     421      F4FFF6F5F3FFF6F5F3FF946531FF9D7340FFFCFBFBFF818181FFC4C4C4FF8F8F
     422      8FFFFAF9F8FF7B7B7AFF797979FF757574FF727171FF6D6D6DFF696969FF6666
     423      65FF626261FFF5F4F2FF936430FF9D723EFFFBFBFAFF9F9F9EFF7F7F7FFFAEAE
     424      ADFFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F6F4FFF6F5F3FFF5F4
     425      F3FFF5F4F2FFF4F3F1FF92622FFF9C703DFFFAFAF9FFFAF9F9FFF9F9F8FFF9F8
     426      F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F5F4FFF6F5F3FFF5F4F3FFF5F4
     427      F2FFF4F3F1FFF4F3F0FF92612EFF9B6F3CFFFAF9F8FFBEBEBDFF929292FFBCBC
     428      BBFFF8F7F6FFF7F7F5FFF7F6F4FFF6F5F4FFF6F5F3FFF5F4F2FFF5F4F2FFF4F3
     429      F1FFF4F2F0FFF3F2F0FF91602DFF9A6E3BFFF9F9F8FF7C7C7CFFC4C4C4FF8787
     430      87FFF7F6F5FF7A7A7AFF787878FF747474FF717170FF6D6D6CFF696968FF6565
     431      65FF616161FFF2F1EFFF905F2BFF996D3AFFF9F8F7FF959594FF878787FF9B9A
     432      9AFFF7F6F4FFF6F5F3FFF6F5F3FFF5F4F2FFF4F3F1FFF4F3F1FFF3F2F0FFF3F2
     433      EFFFF2F1EFFFF2F1EEFF8F5E2AFF996C38FFF8F7F6FFF8F7F5FFF7F6F5FFF6F6
     434      F4FFF6F5F3FFF5F5F3FFF5F4F2FFF4F3F1FFF4F3F1FFF3F2F0FFF3F2EFFFF2F1
     435      EFFFF2F0EEFFF1F0EDFF8E5D29FF986B3700976A36FF966935FF966734FF9566
     436      33FF946532FF946531FF936430FF92622FFF92612EFF91602DFF90602CFF905F
     437      2BFF8F5D2AFF8E5C29FF8D5B28FF000000000000000000000000000000000000
     438      000070A970FF006400FF006200FF70A670FF0000000000000000000000000000
     439      0000000000000000000000000000000000000000000000000000000000000000
     440      0000006400FFECFFECFF8CFE8CFF006000FFD4D4D4FF00000000000000000000
     441      0000000000000000000000000000000000000000000000000000000000000000
     442      0000006400FF8CFE8CFF00E800FF005E00FFB2B2B2FF00000000000000000000
     443      0000000000000000000000000000000000000000000000000000000000000000
     444      0000006200FF8CFE8CFF00E500FF005C00FFB2B2B2FF00000000000000000000
     445      0000000000000000000000000000000000000000000000000000000000000000
     446      0000006000FF8CFE8CFF00E000FF005A00FFB2B2B2FF00000000000000000000
     447      000000000000000000000000000070A970FF006400FF006400FF006200FF0060
     448      00FF006000FF8CFE8CFF00DD00FF005800FF005600FF005400FF005300FF0050
     449      00FF709C70FF0000000000000000006400FFECFFECFF8CFE8CFF8CFE8CFF8CFE
     450      8CFF8CFE8CFF00DE00FF00D900FF00D400FF00D000FF00CC00FF00C800FF00C4
     451      00FF004A00FFD4D4D4FF00000000006200FF8CFE8CFF00EA00FF00E600FF00E2
     452      00FF00DE00FF00DA00FF00D400FF00D000FF00CC00FF00C800FF00C400FF00C2
     453      00FF004800FFB2B2B2FF0000000070A670FF005E00FF005C00FF005A00FF0058
     454      00FF005600FF00D600FF00D000FF005000FF004E00FF004C00FF004A00FF004A
     455      00FF4E764EFFB2B2B2FF0000000000000000D4D4D4FFB2B2B2FFB2B2B2FFB2B2
     456      B2FF005400FF00D200FF00CE00FF004E00FFB2B2B2FFB2B2B2FFB2B2B2FFB2B2
     457      B2FFB2B2B2FFD4D4D4FF00000000000000000000000000000000000000000000
     458      0000005300FF00CE00FF00CA00FF004C00FFB2B2B2FF00000000000000000000
     459      0000000000000000000000000000000000000000000000000000000000000000
     460      0000005000FF00CA00FF00C600FF004A00FFB2B2B2FF00000000000000000000
     461      0000000000000000000000000000000000000000000000000000000000000000
     462      0000004E00FF00C800FF00C400FF004800FFB2B2B2FF00000000000000000000
     463      0000000000000000000000000000000000000000000000000000000000000000
     464      0000709B70FF004A00FF004800FF4E764EFFB2B2B2FF00000000000000000000
     465      0000000000000000000000000000000000000000000000000000000000000000
     466      000000000000D4D4D4FFB2B2B2FFB2B2B2FFD4D4D4FF00000000000000000000
     467      0000000000000000000000000000000000000000000000000000000000000000
     468      0000000000000000000000000000000000000000000000000000000000000000
     469      0000000000000000000000000000000000000000000000000000000000000000
     470      0000000000000000000000000000000000000000000000000000000000000000
     471      0000000000000000000000000000000000000000000000000000000000000000
     472      0000000000000000000000000000000000000000000000000000000000000000
     473      000000000000000000000000000000000000000000FF000000FF000000FF0000
     474      00FF000000FF000000FF00000000000000000000000000000000000000000000
     475      000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFF
     476      FFFFFFFFFFFF000000FF000000FF000000000000000000000000000000000000
     477      000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFF
     478      FFFFFFFFFFFF000000FFFFFFFFFF000000FF0000000000000000000000000000
     479      000000000000000000000000000000000000000000FFFFFFFFFF000000FF0000
     480      00FFFFFFFFFF000000FF840000FF840000FF840000FF840000FF840000FF8400
     481      00FF00000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFF
     482      FFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8400
     483      00FF840000FF000000000000000000000000000000FFFFFFFFFF000000FF0000
     484      00FF000000FF000000FF840000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF8400
     485      00FFFFFFFFFF840000FF0000000000000000000000FFFFFFFFFFFFFFFFFFFFFF
     486      FFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF000000FF000000FFFFFFFFFF8400
     487      00FF840000FF840000FF840000FF00000000000000FFFFFFFFFF000000FF0000
     488      00FF000000FF000000FF840000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     489      FFFFFFFFFFFFFFFFFFFF840000FF00000000000000FFFFFFFFFFFFFFFFFFFFFF
     490      FFFFFFFFFFFFFFFFFFFF840000FFFFFFFFFF000000FF000000FF000000FF0000
     491      00FF000000FFFFFFFFFF840000FF00000000000000FF000000FF000000FF0000
     492      00FF000000FF000000FF840000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     493      FFFFFFFFFFFFFFFFFFFF840000FF000000000000000000000000000000000000
     494      00000000000000000000840000FFFFFFFFFF000000FF000000FF000000FF0000
     495      00FF000000FFFFFFFFFF840000FF000000000000000000000000000000000000
     496      00000000000000000000840000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     497      FFFFFFFFFFFFFFFFFFFF840000FF000000000000000000000000000000000000
     498      00000000000000000000840000FF840000FF840000FF840000FF840000FF8400
     499      00FF840000FF840000FF840000FF000000000000000000000000000000000000
     500      0000000000000000000000000000000000000000000000000000000000000000
     501      0000000000000000000000000000000000000000000000000000000000000000
     502      0000000000000000000000000000000000000000000000000000000000000000
     503      00000000000000000000FFFFFF00000000001818C0FF1818C0FFC0C0C0FF0000
     504      0000000000000000000000000000000000000000000000000000000000001818
     505      C0FF1818C0FFC0C0C0FFFFFFFF00000000002020C8FF2020C8FF2020C8FF2020
     506      C8FFC0C0C0FF00000000000000000000000000000000000000002020C8FF2020
     507      C8FFC0C0C0FF00000000FFFFFF0000000000000000002626CEFF2626CEFF2626
     508      CEFF2626CEFFC0C0C0FF0000000000000000000000002626CEFF2626CEFFC0C0
     509      C0FF000000000000000001010100000000000000000000000000000000002929
     510      D1FF2929D1FF2929D1FFC0C0C0FF000000002929D1FFC0C0C0FF000000000000
     511      0000000000000000000001010100000000000000000000000000000000000000
     512      00002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FFC0C0C0FF000000000000
     513      0000000000000000000001010108000000000000000000000000000000000000
     514      0000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0C0FF00000000000000000000
     515      0000000000000000000003030348000000000000000000000000000000000000
     516      00003232DAFF3232DAFF3232DAFF3232DAFF3232DAFFC0C0C0FF000000000000
     517      00000000000000000000030303A0000000000000000000000000000000003535
     518      DDFF3535DDFF3535DDFFC0C0C0FF000000003535DDFF3535DDFFC0C0C0FF0000
     519      00000000000000000000030303410000000000000000000000003838E0FF3838
     520      E0FF3838E0FFC0C0C0FF0000000000000000000000003838E0FF3838E0FFC0C0
     521      C0FF00000000000000000303030700000000000000003A3AE2FF3A3AE2FF3A3A
     522      E2FFC0C0C0FF00000000000000000000000000000000000000003A3AE2FFC0C0
     523      C0FF00000000000000000303030000000000000000003A3AE2FF3A3AE2FF3A3A
     524      E2FFC0C0C0FF0000000000000000000000000000000000000000000000003A3A
     525      E2FFC0C0C0FF00000000030303000000000000000000000000003A3AE2FFC0C0
     526      C0FF000000000000000000000000000000000000000000000000000000000000
     527      00000000000000000000FFFFFF00000000000000000000000000000000000000
     528      0000000000000000000000000000000000000000000000000000000000000000
     529      00003A3AE2FFC0C0C0FFFFFFFF00000000000000000000000000000000000000
     530      0000000000000000000000000000000000000000000000000000000000000000
     531      00000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     532      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     533      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     534      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     535      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     536      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     537      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     538      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     539      FF00FFFFFF00FFFFFF00FFFFFF000101010001010100000000000000000E0000
     540      004E00000094000000B6000000C8000000C8000000B6000000940000004E0000
     541      000E00000000010101000101010001010100010101010000004F070707B44D4D
     542      4DD8A9A9A9EE7E7E7EF9424242FF424242FF7E7E7EF9A9A9A9EE4D4D4DD80707
     543      07B40000004F01010101010101000101010801010171353535C6CACACAF0FBFB
     544      FBFFA6A6A6FF9B9B9BFF383737FF383737FF383838FFA6A6A6FFFBFBFBFFCACA
     545      CAF0353535C6010101710101010803030348464646BEE9E9E9F9F6F6F6FFF6F6
     546      F6FFBDBDBDFFFFFFFFFF9E9B9BFF413C3CFF4C4646FF5C5C5CFFF6F6F6FFF6F6
     547      F6FFE9E9E9F9464646BE03030348030303A07E7E7ED0F0F0F0FFF0F0F0FFF0F0
     548      F0FF434343FFBAB2B2FF352E2EFF352E2EFF6D5F5FFF434343FFF0F0F0FFF0F0
     549      F0FFF0F0F0FF7E7E7ED0030303A003030341484848B1E2E2E2F7EAEAEAFFEAEA
     550      EAFF646464FF816F6FFF7A6767FF7A6767FF816F6FFF646464FFEAEAEAFFEAEA
     551      EAFFE2E2E2F7484848B103030341030303070404045A3A3A3AA5C6C6C6E6E7E7
     552      E7FFA2A2A2FF645D5DFF9E8484FF9E8484FF645D5DFFA2A2A2FFE7E7E7FFC6C6
     553      C6E63A3A3AA50404045A030303070303030004040401040404390C0C0C805454
     554      54ACAAAAAAD88C8C8CF15E5E5EFE5E5E5EFE8C8C8CF1AAAAAAD8545454AC0C0C
     555      0C800404043904040401030303000303030004040400040404000404040A0404
     556      0435040404650404047B04040488040404880404047B04040465040404350404
     557      040A040404000404040003030300FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     558      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     559      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     560      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     561      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     562      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     563      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     564      FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
     565      FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000
     566      0000000000000000000000000000000000000000000000000000000000000000
     567      000000000000000000000000000000000000000000FF000000FF000000FF0000
     568      00FF000000FF000000FF000000FF000000FF0000000000000000000000000000
     569      000000000000000000000000000000000000000000FF000000FFFFFFFFFFFFFF
     570      FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     571      000000000000000000000000000000000000000000FF008484FF000000FFFFFF
     572      FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     573      0000840000FF000000000000000000000000000000FF008484FF008484FF0000
     574      00FFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000008400
     575      00FF840000FF000000000000000000000000000000FF008484FF008484FF0084
     576      84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000840000FF8400
     577      00FF840000FF840000FF840000FF00000000000000FF008484FF008484FF0084
     578      84FF000000FFFFFFFFFFFFFFFFFF000000FF00000000840000FF840000FF8400
     579      00FF840000FF840000FF840000FF00000000000000FF008484FF008484FF0084
     580      84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000840000FF8400
     581      00FF840000FF840000FF840000FF00000000000000FF008484FF008484FF0084
     582      84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000008400
     583      00FF840000FF000000000000000000000000000000FF008484FF008484FF0000
     584      00FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     585      0000840000FF000000000000000000000000000000FF008484FF008484FF0084
     586      84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000
     587      0000000000000000000000000000000000FF000000FF008484FF008484FF0084
     588      84FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000
     589      00FF0000000000000000000000000000000000000000000000FF008484FF0084
     590      84FF000000FF0000000000000000000000000000000000000000000000000000
     591      0000000000000000000000000000000000000000000000000000000000FF0084
     592      84FF000000FF0000000000000000000000000000000000000000000000000000
     593      0000000000000000000000000000000000000000000000000000000000000000
     594      00FF000000FF0000000000000000000000000000000000000000000000000000
     595      0000000000000000000000000000000000000000000000000000000000000000
     596      0000000000FF0000000000000000000000000000000000000000000000000000
     597      0000000000000000000000000000858A8899858A88FF858A88FF858A88FF858A
     598      88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A
     599      88FF858A88FF858A88FF858A8899858A88FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     600      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     601      FFFFFFFFFFFFFFFFFFFF858A88FF858A88FFFFFFFFFFA46534FFA46534FFA465
     602      34FFA46534FFECEEEEFFECEEEEFFEEEFEFFFEDEFEFFFA46534FFA46534FFA465
     603      34FFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46534FFA46534FFA567
     604      36FFECEEEEFFECEEEEFFECEEEFFFEEF0F0FFEEF0F0FFEEF0F0FFA56736FFA465
     605      34FFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46534FFA56736FFAA70
     606      43FFB4845FFFEEEFEFFFEEEFEFFFF0F1F1FFF0F1F1FFAE784EFFA96E40FFA568
     607      38FFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46635FFEDEFEFFFB382
     608      5CFFC39F83FFCFB6A2FFEEF0F0FFF0F2F1FFCCB099FFC0987AFFB27F57FFF1F3
     609      F3FFA56737FFFFFFFFFF858A88FF858A88FFFFFFFFFFEFF0F0FFEFF0F0FFEFF1
     610      F1FFCFB4A0FFD8C7B9FFE0D3C9FFE2D7CDFFDCCBBDFFCFB49FFFF2F4F4FFF3F4
     611      F3FFF2F4F4FFFFFFFFFF858A88FF858A88FFFFFFFFFFEFF1F1FFF0F1F1FFF0F1
     612      F2FFF0F2F1FFDFD2C7FFF0F2F2FFF2F3F4FFE2D7CEFFF3F4F5FFF3F4F5FFF3F5
     613      F5FFF4F5F4FFFFFFFFFF858A88FF858A88FFFFFFFFFFF3F5F5FFF3F5F5FFF4F5
     614      F5FFF4F5F6FFE3D7CCFFF5F5F6FFF6F7F7FFEAE1D9FFF7F8F8FFF8F9F8FFF7F9
     615      F9FFF8F8F9FFFFFFFFFF858A88FF858A88FFFFFFFFFFF5F6F6FFF4F6F6FFF6F6
     616      F7FFCAAA90FFDBC7B7FFE6DBD3FFEAE2DBFFE4D6CAFFD4BAA6FFF8F9F9FFF9FA
     617      FAFFF9F9F9FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46635FFF6F7F7FFAE77
     618      4CFFB98B67FFC9A68BFFF7F8F8FFF9F9F9FFD1B59EFFBD916FFFAE764BFFF9FA
     619      FAFFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46534FFA46636FFA76A
     620      3BFFAB7246FFF8F9F8FFF8F9F9FFFAFAFAFFFAFAFBFFAA7043FFA56737FFA465
     621      34FFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46534FFA46534FFA465
     622      34FFF9FAFAFFF9F9F9FFF9FAF9FFFBFBFBFFFBFBFCFFFBFBFCFFA46534FFA465
     623      34FFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFA46534FFA46534FFA465
     624      34FFA46534FFFAFBFBFFFAFBFBFFFCFCFDFFFDFCFCFFA46534FFA46534FFA465
     625      34FFA46534FFFFFFFFFF858A88FF858A88FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     626      FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
     627      FFFFFFFFFFFFFFFFFFFF858A88FF8186849D858A88FF858A88FF858A88FF858A
     628      88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A88FF858A
     629      88FF858A88FF858A88FF7F8382A0
    404630    }
    405631  end
    406632  object MainMenu1: TMainMenu
     633    Images = ImageListActions
    407634    left = 456
    408635    top = 120
  • trunk/Forms/UFormMain.pas

    r42 r43  
    99  StdCtrls, ActnList, Menus, ExtCtrls, USqlDatabase, DOM, XMLRead, XMLWrite,
    1010  UPersistentForm, UTreeState, SpecializedList, SpecializedDictionary,
    11   URegistry, USystem, UFormItemList;
     11  URegistry, UCoolTranslator, USystem, UFormItemList;
    1212
    1313type
     
    112112  UFormItemView, UFormItemEdit, UFormItemAdd, UFormLogin, UFormSetting, UApplicationInfo,
    113113  UCore, UFormImportStructure, UFormAbout, UFormLoginProfile, UChronisClientDirect,
    114   UChronisClient;
     114  UChronisClient, UChronisClientMySQL, UChronisClientXMLRPC;
    115115
    116116{$R *.lfm}
     
    155155procedure TMainForm.UpdateInterface;
    156156begin
    157   ADisconnect.Enabled := Core.System.Client.Connected;
    158   AConnect.Enabled := not Core.System.Client.Connected;
    159   AImportStructure.Enabled := Core.System.Client.Connected;
     157  ADisconnect.Enabled := Assigned(Core.Client) and Core.Client.Connected;
     158  AConnect.Enabled := Assigned(Core.Client) and not Core.Client.Connected;
     159  AImportStructure.Enabled := Assigned(Core.Client) and Core.Client.Connected;
    160160  if Assigned(MainPanelForm) then
    161161    Caption := MainPanelForm.Caption + ' - ' + ApplicationInfo.Name
    162     else Caption :=  ApplicationInfo.Name;
     162    else Caption := ApplicationInfo.Name;
    163163  Application.Title := Caption;
    164   if Assigned(Core.System.Client) then
    165   with Core.System.Client do
     164  if Assigned(Core.Client) then
     165  with Core.Client do
    166166    StatusBar1.Panels[0].Text := User + '@' + Host + ':' + IntToStr(Port) + '/' + Schema;
    167167end;
     
    258258procedure TMainForm.AImportStructureExecute(Sender: TObject);
    259259begin
    260   ImportStructureForm.ShowModal;
     260  try
     261    ImportStructureForm := TImportStructureForm.Create(MainForm);
     262    ImportStructureForm.ShowModal;
     263  finally
     264    ImportStructureForm.Free;
     265  end;
    261266end;
    262267
     
    268273  if LoginForm.ShowModal = mrOK then begin
    269274    with TConnectProfile(Core.Profiles[Core.LastProfile]) do begin
     275      FreeAndNil(Core.Client);
     276      if Protocol = cpMySQL then Core.Client := TChronisClientMySQL.Create
     277        else if Protocol = cpDirect then Core.Client := TChronisClientDirect.Create
     278        else if Protocol = cpXMLRPC then Core.Client := TChronisClientXMLRPC.Create;
     279      Core.System.Client := Core.Client;
    270280      Core.System.Client.Host := HostName;
    271281      Core.System.Client.Schema := Database;
     
    273283      Core.System.Client.Password := Core.LastPassword;
    274284      Core.System.Client.Port := Port;
    275       if Protocol = cpDirect then Core.Client := TChronisClientDirect.Create;
    276285    end;
    277286    try
     
    292301procedure TMainForm.ADisconnectExecute(Sender: TObject);
    293302begin
     303  if Assigned(Core.System.Client) then
    294304  if Core.System.Client.Connected then begin
    295305    Core.System.Client.Disconnect;
Note: See TracChangeset for help on using the changeset viewer.