63 lines
1.6 KiB
Plaintext
63 lines
1.6 KiB
Plaintext
type t_code_format_mgr=class(tdcreateform)
|
|
uses tslvcl;
|
|
label1:tlabel;
|
|
label2:tlabel;
|
|
label3:tlabel;
|
|
label4:tlabel;
|
|
label5:tlabel;
|
|
faligncmt:tcombobox;
|
|
fcharct:tcombobox;
|
|
farraytype:tcombobox;
|
|
fsyncheck:tcheckbtn;
|
|
fselectcheck:tcheckbtn;
|
|
btn1:tbtn;
|
|
function Create(AOwner);override;//构造
|
|
begin
|
|
inherited;
|
|
end
|
|
function DoOKClick(o;e);virtual;
|
|
begin
|
|
calldatafunction(FOnOkClick,self,e);
|
|
end
|
|
function tformatinfownd1_close(o;e);virtual;
|
|
begin
|
|
e.skip := true;
|
|
o.Visible := false;
|
|
end
|
|
function Recycling();override;//回收变量
|
|
begin
|
|
inherited;
|
|
ci := self.classinfo();
|
|
//将成员变量赋值为nil避免循环引用
|
|
for i,v in ci["members"]do
|
|
begin
|
|
invoke(self,v["name"],nil);
|
|
end
|
|
end
|
|
function GetData();
|
|
begin
|
|
r := array();
|
|
r["cmt"]:= faligncmt.Checked;
|
|
r["arraytype"]:= array("普通":1,"默认":0,"宽松":3)[farraytype.getCurrentItemText()];
|
|
r["syn"]:= fsyncheck.checked;
|
|
r["sel"]:= fselectcheck.checked;
|
|
return r;
|
|
end
|
|
function SetData(d);
|
|
begin
|
|
//"50" "80" "100" "130"
|
|
// "50" "100" "130" "150" "200" "250" "300"
|
|
//"默认" "普通" "宽松"
|
|
if ifarray(d) then
|
|
begin
|
|
faligncmt.Checked := (d["cmt"]=1);
|
|
farraytype.ItemIndex := (array(0:0,1:1,3:2))[d["arraytype"]];
|
|
fsyncheck.Checked := d["syn"];
|
|
fselectcheck.Checked := d["sel"];
|
|
end
|
|
end
|
|
property OnOkClicked read FOnOkClick write FOnOkClick;
|
|
private
|
|
[weakref] FOnOkClick;
|
|
end
|