Delphi Refactor 重构

时间:2023-03-09 18:41:31
Delphi  Refactor 重构

delphi refactor

procedure TCameraComponentForm.btnRefreshConfigClick(Sender: TObject);
var
a:string;
begin
a:=CameraComponent1.CaptureSetting.Width.ToString; Memo1.Lines.Add( a);
end;

Delphi  Refactor 重构

不仅可以重构成 过程

还可以重构函数参数,真强大!

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;