Changeset 50


Ignore:
Timestamp:
Mar 21, 2012, 6:18:39 PM (13 years ago)
Author:
chronos
Message:
  • Fixed: Translation of runtime craeted forms.
  • Fixed: Do not enable controls if condition not met.
Location:
trunk/Client
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Client/Forms/UFormLogin.lfm

    r46 r50  
    11object LoginForm: TLoginForm
    2   Left = 288
    3   Height = 177
    4   Top = 243
    5   Width = 451
     2  Left = 262
     3  Height = 182
     4  Top = 238
     5  Width = 477
    66  BorderIcons = [biSystemMenu]
    77  BorderStyle = bsDialog
    88  Caption = 'Login'
    9   ClientHeight = 177
    10   ClientWidth = 451
     9  ClientHeight = 182
     10  ClientWidth = 477
    1111  OnClose = FormClose
    1212  OnShow = FormShow
     
    1515  object Label1: TLabel
    1616    Left = 16
    17     Height = 14
    18     Top = 64
    19     Width = 53
     17    Height = 18
     18    Top = 60
     19    Width = 72
    2020    Caption = 'Username:'
    2121    ParentColor = False
     
    2323  object Label2: TLabel
    2424    Left = 16
    25     Height = 14
    26     Top = 96
    27     Width = 51
     25    Height = 18
     26    Top = 92
     27    Width = 66
    2828    Caption = 'Password:'
    2929    ParentColor = False
    3030  end
    3131  object ButtonCancel: TButton
    32     Left = 112
     32    Left = 144
    3333    Height = 25
    34     Top = 144
     34    Top = 143
    3535    Width = 75
    3636    Caption = 'Close'
     
    4040  end
    4141  object ButtonLogin: TButton
    42     Left = 16
     42    Left = 40
    4343    Height = 25
    4444    Top = 144
     
    5151  end
    5252  object EditUserName: TEdit
    53     Left = 88
    54     Height = 21
    55     Top = 64
     53    Left = 104
     54    Height = 27
     55    Top = 56
    5656    Width = 104
    5757    TabOrder = 2
     
    5959  object Label3: TLabel
    6060    Left = 16
    61     Height = 14
     61    Height = 18
    6262    Top = 12
    63     Width = 59
     63    Width = 78
    6464    Caption = 'Connection:'
    6565    ParentColor = False
    6666  end
    6767  object ComboBoxConnection: TComboBox
    68     Left = 88
    69     Height = 21
    70     Top = 12
     68    Left = 104
     69    Height = 27
     70    Top = 7
    7171    Width = 105
    72     ItemHeight = 13
     72    ItemHeight = 0
    7373    Style = csDropDownList
    7474    TabOrder = 0
    7575  end
    7676  object ButtonChange: TButton
    77     Left = 198
     77    Left = 216
    7878    Height = 25
    79     Top = 9
     79    Top = 7
    8080    Width = 67
    8181    Caption = 'Change'
     
    8484  end
    8585  object Image1: TImage
    86     Left = 272
     86    Left = 296
    8787    Height = 156
    8888    Top = 12
     
    9090  end
    9191  object EditPassword: TEdit
    92     Left = 89
    93     Height = 21
    94     Top = 96
     92    Left = 105
     93    Height = 27
     94    Top = 88
    9595    Width = 104
    9696    EchoMode = emPassword
     
    100100  object CheckBoxRememberPassword: TCheckBox
    101101    Left = 16
    102     Height = 17
     102    Height = 19
    103103    Top = 121
    104     Width = 120
     104    Width = 157
    105105    Caption = 'Remember password'
    106106    TabOrder = 4
  • trunk/Client/Forms/UFormLogin.pas

    r46 r50  
    3232  private
    3333  public
     34    procedure UpdateInterface;
    3435  end;
    3536
     
    7071  if (ComboBoxConnection.Items.Count > 0) and
    7172    (ComboBoxConnection.ItemIndex = -1) then ComboBoxConnection.ItemIndex := 0;
     73  UpdateInterface;
     74end;
     75
     76procedure TLoginForm.UpdateInterface;
     77begin
     78  ButtonLogin.Enabled := ComboBoxConnection.ItemIndex >= 0;
    7279end;
    7380
     
    8188  try
    8289    LoginProfileForm := TLoginProfileForm.Create(MainForm);
     90    Core.CoolTranslator1.TranslateComponentRecursive(LoginProfileForm);
    8391    if LoginProfileForm.ShowModal = mrOk then begin
    8492      Core.Profiles.FillStrings(ComboBoxConnection.Items);
     
    9199    LoginProfileForm.Free;
    92100  end;
     101  UpdateInterface;
    93102end;
    94103
  • trunk/Client/Forms/UFormLoginProfile.lfm

    r46 r50  
    1414  LCLVersion = '0.9.31'
    1515  object LabelServer: TLabel
    16     Left = 278
    17     Height = 14
     16    Left = 262
     17    Height = 18
    1818    Top = 63
    19     Width = 37
     19    Width = 47
    2020    Anchors = [akTop, akRight]
    2121    Caption = 'Server:'
     
    2424  object EditServer: TEdit
    2525    Left = 345
    26     Height = 21
     26    Height = 27
    2727    Top = 56
    2828    Width = 178
     
    3535    Height = 289
    3636    Top = 25
    37     Width = 256
     37    Width = 240
    3838    Anchors = [akTop, akLeft, akRight, akBottom]
    3939    ItemHeight = 0
    4040    OnSelectionChange = ListBoxProfilesSelectionChange
    41     ScrollWidth = 246
     41    ScrollWidth = 236
    4242    TabOrder = 1
     43    TopIndex = -1
    4344  end
    4445  object ButtonOk: TButton
     
    5556  object Label1: TLabel
    5657    Left = 10
    57     Height = 14
     58    Height = 18
    5859    Top = 9
    59     Width = 40
     60    Width = 53
    6061    Caption = 'Profiles:'
    6162    ParentColor = False
     
    7374  object SpinEditPort: TSpinEdit
    7475    Left = 345
    75     Height = 21
     76    Height = 27
    7677    Top = 84
    7778    Width = 178
     
    8283  end
    8384  object Label2: TLabel
    84     Left = 278
    85     Height = 14
     85    Left = 262
     86    Height = 18
    8687    Top = 91
    87     Width = 25
     88    Width = 31
    8889    Anchors = [akTop, akRight]
    8990    Caption = 'Port:'
     
    9192  end
    9293  object Label3: TLabel
    93     Left = 278
    94     Height = 14
    95     Top = 120
    96     Width = 44
     94    Left = 262
     95    Height = 18
     96    Top = 117
     97    Width = 58
    9798    Anchors = [akTop, akRight]
    9899    Caption = 'Protocol:'
     
    101102  object ComboBoxProtocol: TComboBox
    102103    Left = 345
    103     Height = 21
     104    Height = 27
    104105    Top = 113
    105106    Width = 178
    106107    Anchors = [akTop, akRight]
    107     ItemHeight = 13
     108    ItemHeight = 0
    108109    OnChange = ComboBoxProtocolChange
    109110    Style = csDropDownList
     
    111112  end
    112113  object Label4: TLabel
    113     Left = 278
    114     Height = 14
     114    Left = 262
     115    Height = 18
    115116    Top = 152
    116     Width = 51
     117    Width = 67
    117118    Anchors = [akTop, akRight]
    118119    Caption = 'Database:'
     
    121122  object EditDatabase: TEdit
    122123    Left = 345
    123     Height = 21
     124    Height = 27
    124125    Top = 145
    125126    Width = 178
     
    159160  end
    160161  object EditName: TEdit
    161     Left = 344
    162     Height = 21
     162    Left = 343
     163    Height = 27
    163164    Top = 26
    164165    Width = 179
     
    168169  end
    169170  object Label5: TLabel
    170     Left = 278
    171     Height = 14
    172     Top = 33
    173     Width = 32
     171    Left = 262
     172    Height = 18
     173    Top = 30
     174    Width = 44
    174175    Anchors = [akTop, akRight]
    175176    Caption = 'Name:'
  • trunk/Client/Forms/UFormLoginProfile.pas

    r46 r50  
    7171    ProfileList: TProfileList;
    7272  public
     73    procedure UpdateInterface;
    7374  end;
    7475
     
    157158begin
    158159  MainForm.PersistentForm.Save(Self);
     160  Core.Profiles.SaveToRegistry(Core.RegistryRootKey, Core.RegistryKey);
    159161end;
    160162
     
    195197  if (ListBoxProfiles.Items.Count > 0) and
    196198    (ListBoxProfiles.ItemIndex = -1) then ListBoxProfiles.ItemIndex := 0;
     199  UpdateInterface;
    197200end;
    198201
     
    209212    EditName.Text := Name;
    210213    SelectedProfile := TConnectProfile(ProfileList[ListBoxProfiles.ItemIndex]);
     214    UpdateInterface;
    211215  end;
    212216end;
     
    216220  if Assigned(SelectedProfile) then
    217221    SelectedProfile.Port := SpinEditPort.Value;
     222end;
     223
     224procedure TLoginProfileForm.UpdateInterface;
     225begin
     226  EditName.Enabled := ListBoxProfiles.ItemIndex <> -1;
     227  EditServer.Enabled := ListBoxProfiles.ItemIndex <> -1;
     228  EditDatabase.Enabled := ListBoxProfiles.ItemIndex <> -1;
     229  SpinEditPort.Enabled := ListBoxProfiles.ItemIndex <> -1;
     230  ComboBoxProtocol.Enabled := ListBoxProfiles.ItemIndex <> -1;
    218231end;
    219232
  • trunk/Client/Forms/UFormMain.lfm

    r49 r50  
    66  ActiveControl = PanelMenu
    77  Caption = 'ChronIS'
    8   ClientHeight = 427
     8  ClientHeight = 421
    99  ClientWidth = 640
    1010  Icon.Data = {
     
    153153  object PanelMenu: TPanel
    154154    Left = 0
    155     Height = 381
     155    Height = 374
    156156    Top = 26
    157157    Width = 184
     
    162162  object PanelData: TPanel
    163163    Left = 189
    164     Height = 381
     164    Height = 374
    165165    Top = 26
    166166    Width = 451
     
    171171  object Splitter1: TSplitter
    172172    Left = 184
    173     Height = 381
     173    Height = 374
    174174    Top = 26
    175175    Width = 5
     
    177177  object StatusBar1: TStatusBar
    178178    Left = 0
    179     Height = 20
    180     Top = 407
     179    Height = 21
     180    Top = 400
    181181    Width = 640
    182182    Panels = <   
  • trunk/Client/Forms/UFormMain.pas

    r49 r50  
    182182  try
    183183    SettingForm := TSettingForm.Create(nil);
     184    Core.CoolTranslator1.TranslateComponentRecursive(SettingForm);
    184185    SettingForm.ShowModal;
    185186  finally
     
    224225  try
    225226    ImportStructureForm := TImportStructureForm.Create(MainForm);
     227    Core.CoolTranslator1.TranslateComponentRecursive(ImportStructureForm);
    226228    ImportStructureForm.ShowModal;
    227229  finally
     
    234236  try
    235237    LoginForm := TLoginForm.Create(MainForm);
     238    Core.CoolTranslator1.TranslateComponentRecursive(LoginForm);
    236239    Core.Profiles.LoadFromRegistry(Core.RegistryRootKey, Core.RegistryKey);
    237240    if LoginForm.ShowModal = mrOK then begin
     
    274277  try
    275278    AboutForm := TAboutForm.Create(nil);
     279    Core.CoolTranslator1.TranslateComponentRecursive(AboutForm);
    276280    AboutForm.ShowModal;
    277281  finally
  • trunk/Client/chronis.lpi

    r49 r50  
    3030          <SearchPaths>
    3131            <IncludeFiles Value="$(ProjOutDir)"/>
    32             <Libraries Value="/usr/lib/mysql;/usr/lib64/mysql"/>
     32            <Libraries Value="/usr/lib/mysql/;/usr/lib64/mysql/"/>
    3333            <OtherUnitFiles Value="Common;Forms"/>
    3434            <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
     
    284284    <SearchPaths>
    285285      <IncludeFiles Value="$(ProjOutDir)"/>
    286       <Libraries Value="/usr/lib/mysql;/usr/lib64/mysql"/>
     286      <Libraries Value="/usr/lib/mysql/;/usr/lib64/mysql/"/>
    287287      <OtherUnitFiles Value="Common;Forms;Application;Module;Application/Clients"/>
    288288      <UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
Note: See TracChangeset for help on using the changeset viewer.