delphi refactor
procedure TCameraComponentForm.btnRefreshConfigClick(Sender: TObject);
var
a:string;
begin
a:=CameraComponent1.CaptureSetting.Width.ToString; Memo1.Lines.Add( a);
end;
不仅可以重构成 过程
还可以重构函数参数,真强大!
procedure TCameraComponentForm.btnRefreshConfigClick(Sender: TObject);
var
a:string;
begin
a:=CameraComponent1.CaptureSetting.Width.ToString;
AddLog(a);
end; procedure TCameraComponentForm.AddLog(a: string);
begin
Memo1.Lines.Add(a);
end;