source: trunk/IDE/Forms/FormOptions.pas

Last change on this file was 75, checked in by chronos, 6 months ago
  • Modified: Removed U prefix from unit names.
  • Modified: Updated Common package.
File size: 1.2 KB
Line 
1unit FormOptions;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls;
7
8type
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
27implementation
28
29{$R *.lfm}
30
31uses
32 Core, Languages;
33
34{ TFormOptions }
35
36procedure TFormOptions.ButtonOkClick(Sender: TObject);
37begin
38 if ComboBoxLanguage.ItemIndex <> -1 then
39 Core.Core.Translator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
40 Core.Core.ReopenLastOpenedFile := CheckBoxReopenProject.Checked;
41end;
42
43procedure TFormOptions.FormShow(Sender: TObject);
44begin
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;
49end;
50
51end.
52
Note: See TracBrowser for help on using the repository browser.