|
Last change
on this file was 75, checked in by chronos, 19 months ago |
- Modified: Removed U prefix from unit names.
- Modified: Updated Common package.
|
|
File size:
1.2 KB
|
| Line | |
|---|
| 1 | unit FormOptions;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
|
|---|
| 7 |
|
|---|
| 8 | type
|
|---|
| 9 |
|
|---|
| 10 | { TFormOptions }
|
|---|
| 11 |
|
|---|
| 12 | TFormOptions = class(TForm)
|
|---|
| 13 | ButtonCancel: TButton;
|
|---|
| 14 | ButtonOk: TButton;
|
|---|
| 15 | CheckBoxReopenProject: TCheckBox;
|
|---|
| 16 | ComboBoxLanguage: TComboBox;
|
|---|
| 17 | Label3: TLabel;
|
|---|
| 18 | procedure ButtonOkClick(Sender: TObject);
|
|---|
| 19 | procedure FormShow(Sender: TObject);
|
|---|
| 20 | private
|
|---|
| 21 | { private declarations }
|
|---|
| 22 | public
|
|---|
| 23 | { public declarations }
|
|---|
| 24 | end;
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 | implementation
|
|---|
| 28 |
|
|---|
| 29 | {$R *.lfm}
|
|---|
| 30 |
|
|---|
| 31 | uses
|
|---|
| 32 | Core, Languages;
|
|---|
| 33 |
|
|---|
| 34 | { TFormOptions }
|
|---|
| 35 |
|
|---|
| 36 | procedure TFormOptions.ButtonOkClick(Sender: TObject);
|
|---|
| 37 | begin
|
|---|
| 38 | if ComboBoxLanguage.ItemIndex <> -1 then
|
|---|
| 39 | Core.Core.Translator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
|
|---|
| 40 | Core.Core.ReopenLastOpenedFile := CheckBoxReopenProject.Checked;
|
|---|
| 41 | end;
|
|---|
| 42 |
|
|---|
| 43 | procedure TFormOptions.FormShow(Sender: TObject);
|
|---|
| 44 | begin
|
|---|
| 45 | Core.Core.Translator1.LanguageListToStrings(ComboBoxLanguage.Items);
|
|---|
| 46 | ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Core.Translator1.Language);
|
|---|
| 47 | if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
|
|---|
| 48 | CheckBoxReopenProject.Checked := Core.Core.ReopenLastOpenedFile;
|
|---|
| 49 | end;
|
|---|
| 50 |
|
|---|
| 51 | end.
|
|---|
| 52 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.