-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCognates.pas
50 lines (41 loc) · 1.13 KB
/
Cognates.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
unit Cognates;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Buttons, MyUtils;
type
TCognatesForm = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
LangEdit: TEdit;
AbbrEdit: TEdit;
CodeEdit: TEdit;
NonLatinCheckBox: TCheckBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
DeleteBtn: TBitBtn;
private
public
function ShowModalEx(ALang, AAbbr, ACode: string; ANonLatin, ShowDelete: Boolean): Integer;
function MenuHint: string;
end;
var
CognatesForm: TCognatesForm;
implementation
{$R *.DFM}
function TCognatesForm.ShowModalEx(ALang, AAbbr, ACode: string; ANonLatin, ShowDelete: Boolean): Integer;
begin
LangEdit.Text:=ALang;
AbbrEdit.Text:=AAbbr;
CodeEdit.Text:=ACode;
NonLatinCheckBox.Checked:=ANonLatin;
DeleteBtn.Visible:=ShowDelete;
ActiveControl:=LangEdit;
Result:=ShowModal;
end; {ShowModalEx}
function TCognatesForm.MenuHint: string;
begin
Result:=IfThen(NonLatinCheckBox.Checked, '+', '-')+Trim(AbbrEdit.Text)+','+Trim(CodeEdit.Text);
end; {MenuHint}
end.