Changeset 10 for trunk/Forms/UFormPreferences.pas
- Timestamp:
- Jan 25, 2015, 9:54:33 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormPreferences.pas
r9 r10 16 16 ButtonCancel: TButton; 17 17 CheckBoxRememberDatabase: TCheckBox; 18 ComboBoxLanguage: TComboBox; 19 Label1: TLabel; 18 20 private 19 21 { private declarations } … … 30 32 {$R *.lfm} 31 33 34 uses 35 UCore, ULanguages; 36 32 37 { TFormPreferences } 33 38 … … 35 40 begin 36 41 CheckBoxRememberDatabase.Checked := Preferences.RememberDatabase; 42 Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items); 43 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language); 44 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 37 45 end; 38 46 … … 40 48 begin 41 49 Preferences.RememberDatabase := CheckBoxRememberDatabase.Checked; 50 if ComboBoxLanguage.ItemIndex <> -1 then 51 Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]); 42 52 end; 43 53
Note:
See TracChangeset
for help on using the changeset viewer.