通过方法名称,调用方法,并传参数!
TStringExec = procedure(const Value:String) of object;
procedure TBaseClass.ExecMethod(Sender:TObject;methodName: string;const value:string);
var
Routine: TMethod;
Exec: TStringExec;
begin
Routine.Data := Pointer(Sender) ;
Routine.Code := self.MethodAddress(MethodName) ;
if NOT Assigned(Routine.Code) then Exit;
Exec := TStringExec(Routine) ;
Exec(value);
end;