function GetPropertyValue(Instance: TObject; PropInfo: PPropInfo): string;
var
ClassName : string;
begin
Result := '';
if PropInfo <> nil then
begin
ClassName := PropInfo^.PropType^.Name;
if ClassName = 'TDateTime' then
begin
if GetFloatProp(Instance, PropInfo) <> 0 then
Result := FormatDateTime('yyyy''年''m''月''d''日''h''时''n''分''',
GetFloatProp(Instance, PropInfo))
end
else
if ClassName = 'TPicture' then
Result := 'TPicture'
else
if ClassName = 'Double' then
Result := FloatToStr(GetFloatProp(Instance, PropInfo))
else
Result := GetStrProp(Instance, PropInfo);
end;
end;
procedure GetPropertyNames(pti: PTypeInfo; sList: TStrings);
var
ppi : PPropInfo;
pProps : PPropList;
nProps, i : Integer;
ptd : PTypeData;
begin
ptd := GetTypeData(pti);
nProps := ptd^.PropCount;
if nProps > 0 then
begin