Ignore:
Timestamp:
Mar 21, 2012, 6:18:39 PM (14 years ago)
Author:
chronos
Message:
  • Fixed: Translation of runtime craeted forms.
  • Fixed: Do not enable controls if condition not met.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.