source: branches/generator/Forms/UFormLookupTable.pas

Last change on this file was 192, checked in by chronos, 6 years ago
  • Modified: Apply interface language to all forms.
File size: 1.3 KB
Line 
1unit UFormLookupTable;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
9 UGrammer;
10
11type
12
13 { TFormLookupTable }
14
15 TFormLookupTable = class(TForm)
16 ButtonCancel: TButton;
17 ButtonOk: TButton;
18 EditName: TEdit;
19 Label1: TLabel;
20 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
21 procedure FormCreate(Sender: TObject);
22 procedure FormShow(Sender: TObject);
23 private
24
25 public
26 procedure LoadData(LookupTable: TLookupTable);
27 procedure SaveData(LookupTable: TLookupTable);
28 end;
29
30var
31 FormLookupTable: TFormLookupTable;
32
33implementation
34
35{$R *.lfm}
36
37uses
38 UCore;
39
40{ TFormLookupTable }
41
42procedure TFormLookupTable.FormClose(Sender: TObject;
43 var CloseAction: TCloseAction);
44begin
45 Core.PersistentForm1.Save(Self);
46end;
47
48procedure TFormLookupTable.FormCreate(Sender: TObject);
49begin
50 Core.CoolTranslator1.TranslateComponentRecursive(Self);
51end;
52
53procedure TFormLookupTable.FormShow(Sender: TObject);
54begin
55 Core.PersistentForm1.Load(Self);
56end;
57
58procedure TFormLookupTable.LoadData(LookupTable: TLookupTable);
59begin
60 EditName.Text := LookupTable.Name;
61end;
62
63procedure TFormLookupTable.SaveData(LookupTable: TLookupTable);
64begin
65 LookupTable.Grammer.Modified := True;
66 LookupTable.Name := EditName.Text;
67end;
68
69end.
70
Note: See TracBrowser for help on using the repository browser.