Repository navigation
Expand file tree
/
Copy pathEditTable.pas
More file actions
111 lines (91 loc) · 2.8 KB
/
Copy pathEditTable.pas
File metadata and controls
111 lines (91 loc) · 2.8 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
unit EditTable;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Buttons;
type
TEditTableForm = class(TForm)
Label1: TLabel;
LabelTableName: TLabel;
Label3: TLabel;
EditClassName: TEdit;
BtnCancel: TBitBtn;
BtnOK: TBitBtn;
Label2: TLabel;
EditDeployPath: TEdit;
SelectFolder: TFileOpenDialog;
BtnSelectDeployPath: TButton;
CheckBoxDeclareAsAbstract: TCheckBox;
CheckBoxRegisterEntity: TCheckBox;
procedure FormShow(Sender: TObject);
procedure BtnSelectDeployPathClick(Sender: TObject);
private
function GetClassName:string;
procedure SetTableName(Value :string);
procedure SetClassName(Value :string);
function GetDeployPath:string;
procedure SetDeployPath(Value :string);
function GetDeclareAsAbstract:string;
procedure SetDeclareAsAbstract(Value :string);
function GetRegisterEntity:string;
procedure SetRegisterEntity(Value :string);
public
property TableName :string write SetTableName;
property ClassName :string read GetClassName write SetClassName;
property DeployPath :string read GetDeployPath write SetDeployPath;
property DeclareAsAbstract :string read GetDeclareAsAbstract write SetDeclareAsAbstract;
property RegisterEntity :string read GetRegisterEntity write SetRegisterEntity;
end;
var
EditTableForm: TEditTableForm;
implementation
{$R *.dfm}
procedure TEditTableForm.BtnSelectDeployPathClick(Sender: TObject);
begin
if SelectFolder.Execute then begin
DeployPath := SelectFolder.FileName;
end;
end;
procedure TEditTableForm.FormShow(Sender: TObject);
begin
EditClassName.SetFocus;
end;
function TEditTableForm.GetClassName:string;
begin
Result := EditClassName.Text;
end;
procedure TEditTableForm.SetClassName(Value: string);
begin
EditClassName.Text := Value;
end;
procedure TEditTableForm.SetTableName(Value: string);
begin
LabelTableName.Caption := Value;
end;
function TEditTableForm.GetDeployPath:string;
begin
Result := EditDeployPath.Text;
end;
procedure TEditTableForm.SetDeployPath(Value :string);
begin
EditDeployPath.Text := Value;
end;
function TEditTableForm.GetDeclareAsAbstract:string;
begin
if CheckBoxDeclareAsAbstract.Checked then Result := 'Y'
else Result := 'N';
end;
procedure TEditTableForm.SetDeclareAsAbstract(Value :string);
begin
CheckBoxDeclareAsAbstract.Checked := Value = 'Y';
end;
function TEditTableForm.GetRegisterEntity:string;
begin
if CheckBoxRegisterEntity.Checked then Result := 'Y'
else Result := 'N';
end;
procedure TEditTableForm.SetRegisterEntity(Value :string);
begin
CheckBoxRegisterEntity.Checked := Value = 'Y';
end;
end.