Changeset 15 for trunk/UOptionsForm.pas
- Timestamp:
- Feb 11, 2012, 6:45:36 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UOptionsForm.pas
r14 r15 16 16 ButtonOk: TButton; 17 17 ButtonCancel: TButton; 18 ComboBoxLanguage: TComboBox; 18 19 Label1: TLabel; 19 20 Label2: TLabel; 21 Label3: TLabel; 20 22 SpinEditCellSize: TSpinEdit; 21 23 SpinEditMemorySize: TSpinEdit; 24 procedure ButtonOkClick(Sender: TObject); 25 procedure FormShow(Sender: TObject); 22 26 private 23 27 { private declarations } … … 34 38 {$R *.lfm} 35 39 40 uses 41 UMainForm, ULanguages; 42 36 43 { TOptionsForm } 44 45 procedure TOptionsForm.FormShow(Sender: TObject); 46 begin 47 MainForm.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items); 48 ComboBoxLanguage.ItemIndex := MainForm.CoolTranslator1.Languages.IndexOf(MainForm.CoolTranslator1.Language); 49 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 50 end; 51 52 procedure TOptionsForm.ButtonOkClick(Sender: TObject); 53 begin 54 if ComboBoxLanguage.ItemIndex <> -1 then 55 MainForm.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]); 56 end; 37 57 38 58 procedure TOptionsForm.LoadFromInterpretter(Interpretter: TBrainFuckInterpretter
Note:
See TracChangeset
for help on using the changeset viewer.